Panda3D
|
Class representing an animated character. More...
#include "daeCharacter.h"
Classes | |
struct | Joint |
Public Types | |
typedef pmap< string, Joint > | JointMap |
typedef epvector< Joint > | Joints |
Public Member Functions | |
DaeCharacter (EggGroup *node_group, const FCDControllerInstance *controller_instance) | |
void | adjust_joints (FCDSceneNode *node, const JointMap &joint_map, const LMatrix4d &transform=LMatrix4d::ident_mat()) |
Traverses through the character hierarchy in order to bind the mesh to the character. More... | |
void | bind_joints (JointMap &joint_map) |
Binds the joints to the character. More... | |
void | build_table (EggTable *parent, FCDSceneNode *node, const pset< float > &keys) |
Processes a joint node and its transforms. More... | |
void | collect_keys (pset< float > &keys) |
Collects all animation keys of animations applied to this character. More... | |
virtual TypeHandle | force_init_type () |
virtual TypeHandle | get_type () const |
void | influence_vertex (int index, EggVertex *vertex) |
Adds the influences for the given vertex. More... | |
PT (EggGroup) _node_group | |
void | r_collect_keys (FCDSceneNode *node, pset< float > &keys) |
Collects all animation keys found for the given node tree. More... | |
![]() | |
TypedReferenceCount (const TypedReferenceCount ©) | |
void | operator= (const TypedReferenceCount ©) |
![]() | |
TypedObject (const TypedObject ©) | |
TypedObject * | as_typed_object () |
Returns the object, upcast (if necessary) to a TypedObject pointer. More... | |
const TypedObject * | as_typed_object () const |
Returns the object, upcast (if necessary) to a TypedObject pointer. More... | |
int | get_best_parent_from_Set (const std::set< int > &) const |
int | get_type_index () const |
Returns the internal index number associated with this object's TypeHandle, a unique number for each different type. More... | |
bool | is_exact_type (TypeHandle handle) const |
Returns true if the current object is the indicated type exactly. More... | |
bool | is_of_type (TypeHandle handle) const |
Returns true if the current object is or derives from the indicated type. More... | |
void | operator= (const TypedObject ©) |
![]() | |
int | get_ref_count () const |
Returns the current reference count. More... | |
WeakReferenceList * | get_weak_list () const |
Returns the WeakReferenceList associated with this ReferenceCount object. More... | |
bool | has_weak_list () const |
Returns true if this particular ReferenceCount object has a WeakReferenceList created, false otherwise. More... | |
void | local_object () |
This function should be called, once, immediately after creating a new instance of some ReferenceCount-derived object on the stack. More... | |
void | ref () const |
Explicitly increments the reference count. More... | |
bool | test_ref_count_integrity () const |
Does some easy checks to make sure that the reference count isn't completely bogus. More... | |
bool | test_ref_count_nonzero () const |
Does some easy checks to make sure that the reference count isn't zero, or completely bogus. More... | |
virtual bool | unref () const |
Explicitly decrements the reference count. More... | |
void | weak_ref (WeakPointerToVoid *ptv) |
Adds the indicated PointerToVoid as a weak reference to this object. More... | |
void | weak_unref (WeakPointerToVoid *ptv) |
Removes the indicated PointerToVoid as a weak reference to this object. More... | |
Static Public Member Functions | |
static TypeHandle | get_class_type () |
static void | init_type () |
![]() | |
static TypeHandle | get_class_type () |
static void | init_type () |
![]() | |
static TypeHandle | get_class_type () |
static void | init_type () |
This function is declared non-inline to work around a compiler bug in g++ 2.96. More... | |
![]() | |
static TypeHandle | get_class_type () |
static void | init_type () |
Public Attributes | |
LMatrix4d | _bind_shape_mat |
const FCDControllerInstance * | _instance |
const FCDGeometryMesh * | _skin_mesh |
Class representing an animated character.
Definition at line 37 of file daeCharacter.h.
void DaeCharacter::adjust_joints | ( | FCDSceneNode * | node, |
const JointMap & | joint_map, | ||
const LMatrix4d & | transform = LMatrix4d::ident_mat() |
||
) |
Traverses through the character hierarchy in order to bind the mesh to the character.
This involves reorienting the joints to match the bind pose.
It is important that this is called only once.
Definition at line 132 of file daeCharacter.cxx.
References influence_vertex().
Referenced by bind_joints(), and DAEToEggConverter::convert_file().
void DaeCharacter::bind_joints | ( | JointMap & | joint_map | ) |
Binds the joints to the character.
This means changing them to the bind pose. It is necessary to call this before process_skin_geometry.
Returns the root group.
Definition at line 76 of file daeCharacter.cxx.
References adjust_joints(), LMatrix4d::almost_equal(), and LMatrix4d::invert_from().
Referenced by DAEToEggConverter::convert_file().
void DaeCharacter::build_table | ( | EggTable * | parent, |
FCDSceneNode * | node, | ||
const pset< float > & | keys | ||
) |
Processes a joint node and its transforms.
Definition at line 264 of file daeCharacter.cxx.
References EggGroupNode::add_child().
Referenced by DAEToEggConverter::convert_file(), and r_collect_keys().
void DaeCharacter::collect_keys | ( | pset< float > & | keys | ) |
Collects all animation keys of animations applied to this character.
Definition at line 210 of file daeCharacter.cxx.
References r_collect_keys().
Referenced by DAEToEggConverter::convert_file(), and influence_vertex().
void DaeCharacter::influence_vertex | ( | int | index, |
EggVertex * | vertex | ||
) |
Adds the influences for the given vertex.
Definition at line 185 of file daeCharacter.cxx.
References collect_keys(), and EggGroup::ref_vertex().
Referenced by adjust_joints(), and DAEToEggConverter::get_input_units().
void DaeCharacter::r_collect_keys | ( | FCDSceneNode * | node, |
pset< float > & | keys | ||
) |
Collects all animation keys found for the given node tree.
Definition at line 230 of file daeCharacter.cxx.
References build_table().
Referenced by collect_keys().