Panda3D
|
Describes a complete tree of soft nodes for conversion. More...
#include "softNodeTree.h"
Public Member Functions | |
bool | build_complete_hierarchy (SAA_Scene &scene, SAA_Database &database) |
Walks through the complete Soft hierarchy and builds up the corresponding tree. | |
SoftNodeDesc * | build_node (SAA_Scene *scene, SAA_Elem *model) |
Returns a pointer to the node corresponding to the indicated dag_path object, creating it first if necessary. | |
void | clear_egg (EggData *egg_data, EggGroupNode *egg_root, EggGroupNode *skeleton_node) |
Removes all of the references to generated egg structures from the tree, and prepares the tree for generating new egg structures. | |
EggXfmSAnim * | get_egg_anim (SoftNodeDesc *node_desc) |
Returns the anim table corresponding to the joint for the indicated node. | |
EggGroup * | get_egg_group (SoftNodeDesc *node_desc) |
Returns the EggGroupNode corresponding to the group or joint for the indicated node. | |
EggGroupNode * | get_egg_root () |
EggTable * | get_egg_table (SoftNodeDesc *node_desc) |
Returns the EggTable corresponding to the joint for the indicated node. | |
SoftNodeDesc * | get_node (int n) const |
Returns the nth node in the hierarchy, in an arbitrary ordering. | |
SoftNodeDesc * | get_node (string name) const |
Returns the node named 'name' in the hierarchy, in an arbitrary ordering. | |
int | get_num_nodes () const |
Returns the total number of nodes in the hierarchy, not counting the root node. | |
char * | GetFullName (SAA_Scene *scene, SAA_Elem *element) |
Given an element, return a copy of the element's name complete with prefix. | |
char * | GetModelNoteInfo (SAA_Scene *, SAA_Elem *) |
Given an element, return a string containing the contents of its MODEL NOTE entry. | |
char * | GetName (SAA_Scene *scene, SAA_Elem *element) |
Given an element, return a copy of the element's name WITHOUT prefix. | |
char * | GetRootName (const char *) |
Given a string, return a copy of the string up to the first occurence of '-'. | |
void | handle_null (SAA_Scene *scene, SoftNodeDesc *node_desc, const char *node_name) |
Sets joint information for MNILL node. | |
PT (SoftNodeDesc) _root | |
Public Attributes | |
PN_stdfloat | _fps |
char * | _search_prefix |
int | _use_prefix |
Describes a complete tree of soft nodes for conversion.
Definition at line 35 of file softNodeTree.h.
bool SoftNodeTree::build_complete_hierarchy | ( | SAA_Scene & | scene, |
SAA_Database & | database | ||
) |
Walks through the complete Soft hierarchy and builds up the corresponding tree.
Definition at line 167 of file softNodeTree.cxx.
References build_node(), and SoftNodeDesc::set_parent().
Referenced by SoftToEggConverter::convert_soft().
SoftNodeDesc * SoftNodeTree::build_node | ( | SAA_Scene * | scene, |
SAA_Elem * | model | ||
) |
Returns a pointer to the node corresponding to the indicated dag_path object, creating it first if necessary.
Definition at line 499 of file softNodeTree.cxx.
References SoftNodeDesc::get_model(), GetFullName(), GetName(), handle_null(), SoftNodeDesc::is_joint(), SoftNodeDesc::set_joint(), and SoftNodeDesc::set_model().
Referenced by build_complete_hierarchy().
void SoftNodeTree::clear_egg | ( | EggData * | egg_data, |
EggGroupNode * | egg_root, | ||
EggGroupNode * | skeleton_node | ||
) |
Removes all of the references to generated egg structures from the tree, and prepares the tree for generating new egg structures.
Definition at line 335 of file softNodeTree.cxx.
EggXfmSAnim * SoftNodeTree::get_egg_anim | ( | SoftNodeDesc * | node_desc | ) |
Returns the anim table corresponding to the joint for the indicated node.
Creates the table node if it has not already been created.
Definition at line 441 of file softNodeTree.cxx.
References get_egg_table().
EggGroup * SoftNodeTree::get_egg_group | ( | SoftNodeDesc * | node_desc | ) |
Returns the EggGroupNode corresponding to the group or joint for the indicated node.
Creates the group node if it has not already been created.
Definition at line 351 of file softNodeTree.cxx.
References EggGroupNode::add_child(), and SoftNodeDesc::is_joint().
EggTable * SoftNodeTree::get_egg_table | ( | SoftNodeDesc * | node_desc | ) |
Returns the EggTable corresponding to the joint for the indicated node.
Creates the table node if it has not already been created.
Definition at line 395 of file softNodeTree.cxx.
References EggGroupNode::add_child(), EggData::get_coordinate_system(), and SoftNodeDesc::is_joint().
Referenced by get_egg_anim().
SoftNodeDesc * SoftNodeTree::get_node | ( | int | n | ) | const |
Returns the nth node in the hierarchy, in an arbitrary ordering.
Definition at line 308 of file softNodeTree.cxx.
Referenced by SoftToEggConverter::find_node().
SoftNodeDesc * SoftNodeTree::get_node | ( | string | name | ) | const |
Returns the node named 'name' in the hierarchy, in an arbitrary ordering.
Definition at line 320 of file softNodeTree.cxx.
int SoftNodeTree::get_num_nodes | ( | ) | const |
Returns the total number of nodes in the hierarchy, not counting the root node.
Definition at line 297 of file softNodeTree.cxx.
char * SoftNodeTree::GetFullName | ( | SAA_Scene * | scene, |
SAA_Elem * | element | ||
) |
Given an element, return a copy of the element's name complete with prefix.
Definition at line 73 of file softNodeTree.cxx.
Referenced by build_node().
char * SoftNodeTree::GetModelNoteInfo | ( | SAA_Scene * | scene, |
SAA_Elem * | model | ||
) |
Given an element, return a string containing the contents of its MODEL NOTE entry.
Definition at line 105 of file softNodeTree.cxx.
char * SoftNodeTree::GetName | ( | SAA_Scene * | scene, |
SAA_Elem * | element | ||
) |
Given an element, return a copy of the element's name WITHOUT prefix.
Definition at line 54 of file softNodeTree.cxx.
Referenced by build_node().
char * SoftNodeTree::GetRootName | ( | const char * | name | ) |
Given a string, return a copy of the string up to the first occurence of '-'.
Definition at line 140 of file softNodeTree.cxx.
Referenced by SoftToEggConverter::convert_soft().
void SoftNodeTree::handle_null | ( | SAA_Scene * | scene, |
SoftNodeDesc * | node_desc, | ||
const char * | node_name | ||
) |
Sets joint information for MNILL node.
Definition at line 452 of file softNodeTree.cxx.
References SoftNodeDesc::get_model(), and SoftNodeDesc::set_joint().
Referenced by build_node().