Main Page   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members   File Members  

CharacterMaker Class Reference

Converts an EggGroup hierarchy, beginning with a group with set, to a character node with joints. More...

#include <characterMaker.h>

List of all members.

Public Member Functions

 CharacterMaker (EggGroup *root, EggLoader &loader)
Charactermake_node ()
PartGroupegg_to_part (EggNode *egg_node) const
 Returns the PartGroup node associated with the given egg node.

int egg_to_index (EggNode *egg_node) const
 Returns the index number associated with the PartGroup node for the given egg node, or -1.

PandaNodepart_to_node (PartGroup *part) const
 Returns the scene graph node associated with the given PartGroup node, if there is one.

int create_slider (const string &name)
 Creates a new morph slider of the given name, and returns its index.


Private Types

typedef pmap< EggNode *, int > NodeMap
typedef vector_PartGroupStar Parts

Private Member Functions

CharacterJointBundlemake_bundle ()
void build_joint_hierarchy (EggNode *egg_node, PartGroup *part)
void parent_joint_nodes (PartGroup *part)
 Walks the joint hierarchy, and parents any explicit nodes created for the joints under the character node.

void make_geometry (EggNode *egg_node)
void make_static_primitive (EggPrimitive *egg_primitive, EggGroupNode *prim_home)
void make_dynamic_primitive (EggPrimitive *egg_primitive, EggGroupNode *prim_home)
EggGroupNodedetermine_primitive_home (EggPrimitive *egg_primitive)

Private Attributes

NodeMap _node_map
Parts _parts
EggLoader_loader
EggGroup_egg_root
Character_character_node
CharacterJointBundle_bundle
ComputedVerticesMaker _comp_verts_maker
PartGroup_morph_root
PartGroup_skeleton_root


Detailed Description

Converts an EggGroup hierarchy, beginning with a group with set, to a character node with joints.

Definition at line 56 of file characterMaker.h.


Member Typedef Documentation

typedef pmap<EggNode *, int> CharacterMaker::NodeMap [private]
 

Definition at line 81 of file characterMaker.h.

typedef vector_PartGroupStar CharacterMaker::Parts [private]
 

Definition at line 84 of file characterMaker.h.


Constructor & Destructor Documentation

CharacterMaker::CharacterMaker EggGroup root,
EggLoader loader
 

Definition at line 44 of file characterMaker.cxx.

References NULL.


Member Function Documentation

void CharacterMaker::build_joint_hierarchy EggNode egg_node,
PartGroup part
[private]
 

Definition at line 196 of file characterMaker.cxx.

References EggGroupNode::const_iterator.

int CharacterMaker::create_slider const string &  name  ) 
 

Creates a new morph slider of the given name, and returns its index.

This is actually called by ComputedVerticesMaker, which is responsible for identifying all the unique morph target names.

Definition at line 156 of file characterMaker.cxx.

References DCAST, EggGroup::get_class_type(), EggGroup::get_group_type(), EggGroup::GT_joint, and TypedObject::is_of_type().

EggGroupNode * CharacterMaker::determine_primitive_home EggPrimitive egg_primitive  )  [private]
 

Definition at line 352 of file characterMaker.cxx.

References NULL.

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 106 of file characterMaker.cxx.

References _character_node, DCAST, CharacterJoint::get_class_type(), TypedObject::is_of_type(), and NULL.

Referenced by make_node().

PartGroup * CharacterMaker::egg_to_part EggNode egg_node  )  const
 

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 84 of file characterMaker.cxx.

References _node_map.

CharacterJointBundle * CharacterMaker::make_bundle  )  [private]
 

Definition at line 175 of file characterMaker.cxx.

References EggTransform3d::get_transform().

void CharacterMaker::make_dynamic_primitive EggPrimitive egg_primitive,
EggGroupNode prim_home
[private]
 

Definition at line 333 of file characterMaker.cxx.

References EggNode::get_parent().

void CharacterMaker::make_geometry EggNode egg_node  )  [private]
 

Definition at line 276 of file characterMaker.cxx.

References _loader.

Character * CharacterMaker::make_node  ) 
 

Definition at line 62 of file characterMaker.cxx.

References _bundle, _parts, egg_to_index(), nassertr, and NULL.

Referenced by EggLoader::make_node().

void CharacterMaker::make_static_primitive EggPrimitive egg_primitive,
EggGroupNode prim_home
[private]
 

Definition at line 313 of file characterMaker.cxx.

References EggPrimitive::const_iterator, and NULL.

void CharacterMaker::parent_joint_nodes PartGroup part  )  [private]
 

Walks the joint hierarchy, and parents any explicit nodes created for the joints under the character node.

Definition at line 252 of file characterMaker.cxx.

PandaNode * CharacterMaker::part_to_node PartGroup part  )  const
 

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 129 of file characterMaker.cxx.

References _morph_root.


Member Data Documentation

CharacterJointBundle* CharacterMaker::_bundle [private]
 

Definition at line 90 of file characterMaker.h.

Referenced by make_node().

Character* CharacterMaker::_character_node [private]
 

Definition at line 89 of file characterMaker.h.

Referenced by egg_to_index().

ComputedVerticesMaker CharacterMaker::_comp_verts_maker [private]
 

Definition at line 91 of file characterMaker.h.

EggGroup* CharacterMaker::_egg_root [private]
 

Definition at line 88 of file characterMaker.h.

EggLoader& CharacterMaker::_loader [private]
 

Definition at line 87 of file characterMaker.h.

Referenced by make_geometry().

PartGroup* CharacterMaker::_morph_root [private]
 

Definition at line 92 of file characterMaker.h.

Referenced by part_to_node().

NodeMap CharacterMaker::_node_map [private]
 

Definition at line 82 of file characterMaker.h.

Referenced by egg_to_part().

Parts CharacterMaker::_parts [private]
 

Definition at line 85 of file characterMaker.h.

Referenced by make_node().

PartGroup* CharacterMaker::_skeleton_root [private]
 

Definition at line 93 of file characterMaker.h.


The documentation for this class was generated from the following files:
Generated on Fri May 2 00:48:15 2003 for Panda by doxygen1.3