Panda3D
|
Converts an EggGroup hierarchy, beginning with a group with <Dart> set, to a character node with joints. More...
#include "characterMaker.h"
Public Member Functions | |
CharacterMaker (EggGroup *root, EggLoader &loader, bool structured=false) | |
int | create_slider (const std::string &name) |
Creates a new morph slider of the given name, and returns its index. | |
int | egg_to_index (EggNode *egg_node) const |
Returns the index number associated with the PartGroup node for the given egg node, or -1. | |
PartGroup * | egg_to_part (EggNode *egg_node) const |
Returns the PartGroup node associated with the given egg node. | |
VertexSlider * | egg_to_slider (const std::string &name) |
Returns the VertexSlider corresponding to the indicated egg slider name. | |
VertexTransform * | egg_to_transform (EggNode *egg_node) |
Returns a JointVertexTransform suitable for applying the animation associated with the given egg node (which should be a joint). | |
std::string | get_name () const |
Returns the name of the character. | |
Character * | make_node () |
PandaNode * | part_to_node (PartGroup *part, const std::string &name) const |
Returns the scene graph node associated with the given PartGroup node, if there is one. | |
Converts an EggGroup hierarchy, beginning with a group with <Dart> set, to a character node with joints.
Definition at line 45 of file characterMaker.h.
Definition at line 42 of file characterMaker.cxx.
int CharacterMaker::create_slider | ( | const std::string & | name | ) |
Creates a new morph slider of the given name, and returns its index.
Definition at line 168 of file characterMaker.cxx.
Referenced by egg_to_slider().
int CharacterMaker::egg_to_index | ( | EggNode * | egg_node | ) | const |
Returns the index number associated with the PartGroup node for the given egg node, or -1.
Definition at line 121 of file characterMaker.cxx.
Referenced by egg_to_part(), and egg_to_transform().
Returns the PartGroup node associated with the given egg node.
If the egg node is not a node in the character's hierarchy, returns the top of the character's hierarchy.
Definition at line 76 of file characterMaker.cxx.
References egg_to_index().
VertexSlider * CharacterMaker::egg_to_slider | ( | const std::string & | name | ) |
Returns the VertexSlider corresponding to the indicated egg slider name.
Definition at line 182 of file characterMaker.cxx.
References create_slider().
Referenced by PT().
VertexTransform * CharacterMaker::egg_to_transform | ( | EggNode * | egg_node | ) |
Returns a JointVertexTransform suitable for applying the animation associated with the given egg node (which should be a joint).
Returns an identity transform if the egg node is not a joint in the character's hierarchy.
Definition at line 94 of file characterMaker.cxx.
References egg_to_index().
string CharacterMaker::get_name | ( | ) | const |
Returns the name of the character.
Definition at line 66 of file characterMaker.cxx.
Referenced by PT().
Character * CharacterMaker::make_node | ( | ) |
Definition at line 57 of file characterMaker.cxx.
Returns the scene graph node associated with the given PartGroup node, if there is one.
If the PartGroup does not have an associated node, returns the character's top node.
Definition at line 135 of file characterMaker.cxx.
References PandaNode::get_child, PandaNode::get_num_children, PartGroup::is_character_joint(), and PandaNode::is_geom_node().