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. More... | |
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. More... | |
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. More... | |
EggXfmSAnim * | get_egg_anim (SoftNodeDesc *node_desc) |
Returns the anim table corresponding to the joint for the indicated node. More... | |
EggGroup * | get_egg_group (SoftNodeDesc *node_desc) |
Returns the EggGroupNode corresponding to the group or joint for the indicated node. More... | |
EggGroupNode * | get_egg_root () |
EggTable * | get_egg_table (SoftNodeDesc *node_desc) |
Returns the EggTable corresponding to the joint for the indicated node. More... | |
SoftNodeDesc * | get_node (int n) const |
Returns the nth node in the hierarchy, in an arbitrary ordering. More... | |
SoftNodeDesc * | get_node (string name) const |
Returns the node named 'name' in the hierarchy, in an arbitrary ordering. More... | |
int | get_num_nodes () const |
Returns the total number of nodes in the hierarchy, not counting the root node. More... | |
char * | GetFullName (SAA_Scene *scene, SAA_Elem *element) |
Given an element, return a copy of the element's name complete with prefix. More... | |
char * | GetModelNoteInfo (SAA_Scene *, SAA_Elem *) |
Given an element, return a string containing the contents of its MODEL NOTE entry. More... | |
char * | GetName (SAA_Scene *scene, SAA_Elem *element) |
Given an element, return a copy of the element's name WITHOUT prefix. More... | |
char * | GetRootName (const char *) |
Given a string, return a copy of the string up to the first occurence of '-'. More... | |
void | handle_null (SAA_Scene *scene, SoftNodeDesc *node_desc, const char *node_name) |
Sets joint information for MNILL node. More... | |
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(), get_num_nodes(), and SoftNodeDesc::set_parent().
Referenced by GetRootName().
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(), SoftNodeDesc::set_model(), and SoftNodeDesc::set_parent().
Referenced by build_complete_hierarchy(), and handle_null().
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.
References get_egg_group().
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(), and handle_null().
Referenced by 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(), get_egg_table(), and SoftNodeDesc::is_joint().
Referenced by clear_egg().
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(), get_egg_anim(), and SoftNodeDesc::is_joint().
Referenced by get_egg_anim(), and get_egg_group().
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 get_num_nodes().
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.
References get_node().
Referenced by build_complete_hierarchy().
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.
References GetModelNoteInfo().
Referenced by build_node(), and GetName().
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.
References GetRootName().
Referenced by GetFullName().
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.
References GetFullName().
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.
References build_complete_hierarchy().
Referenced by GetModelNoteInfo().
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 build_node(), SoftNodeDesc::get_model(), and SoftNodeDesc::set_joint().
Referenced by build_node(), and get_egg_anim().