Panda3D

Classes | Public Types | Public Member Functions | Static Public Member Functions | Public Attributes | List of all members
DaeCharacter Class Reference

Class representing an animated character. More...

`#include "daeCharacter.h"`

Inheritance diagram for DaeCharacter:

## Classes
struct | Joint

## Public Types
typedef pmap< std::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...
Public Member Functions inherited from TypedReferenceCount
| TypedReferenceCount (const TypedReferenceCount &copy)
void | operator= (const TypedReferenceCount &copy)
Public Member Functions inherited from TypedObject
| TypedObject (const TypedObject &copy)=default
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...
TypedObject & | operator= (const TypedObject &copy)=default
Public Member Functions inherited from MemoryBase
void | operator delete (void *, void *)
void | operator delete (void *ptr)
void | operator delete[] (void *, void *)
void | operator delete[] (void *ptr)
void * | operator new (size_t size)
void * | operator new (size_t size, void *ptr)
void * | operator new[] (size_t size)
void * | operator new[] (size_t size, void *ptr)
Public Member Functions inherited from ReferenceCount
int | get_ref_count () const
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 | ref_if_nonzero () const
| Atomically increases the reference count of this object if it is not zero. 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...
bool | unref_if_one () const
| Atomically decreases the reference count of this object if it is one. More...
WeakReferenceList * | weak_ref ()
| Adds the indicated PointerToVoid as a weak reference to this object. More...
void | weak_unref ()
| 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 Public Member Functions inherited from TypedReferenceCount
static TypeHandle | get_class_type ()
static void | init_type ()
Static Public Member Functions inherited from TypedObject
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 Public Member Functions inherited from ReferenceCount
static TypeHandle | get_class_type ()
static void | init_type ()

## Public Attributes
LMatrix4d | _bind_shape_mat
const FCDControllerInstance * | _instance
const FCDGeometryMesh * | _skin_mesh
Public Attributes inherited from TypedObject
| get_type
Public Attributes inherited from ReferenceCount
| get_ref_count
| Returns the current reference count. More...

## Detailed Description

Class representing an animated character.

Definition at line 35 of file daeCharacter.h.

## Member Function Documentation

## ◆ adjust_joints()

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 122 of file daeCharacter.cxx.

## ◆ bind_joints()

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 69 of file daeCharacter.cxx.

## ◆ build_table()

void DaeCharacter::build_table | ( | EggTable * | parent,
|  | FCDSceneNode * | node,
|  | const pset< float > & | keys
| ) |  |

Processes a joint node and its transforms.

Definition at line 244 of file daeCharacter.cxx.

## ◆ collect_keys()

void DaeCharacter::collect_keys | ( | pset< float > & | keys | ) |

Collects all animation keys of animations applied to this character.

Definition at line 195 of file daeCharacter.cxx.

References r_collect_keys().

## ◆ influence_vertex()

void DaeCharacter::influence_vertex | ( | int | index,
|  | EggVertex * | vertex
| ) |  |

Adds the influences for the given vertex.

Definition at line 173 of file daeCharacter.cxx.

References EggGroup::ref_vertex().

## ◆ r_collect_keys()

void DaeCharacter::r_collect_keys | ( | FCDSceneNode * | node,
|  | pset< float > & | keys
| ) |  |

Collects all animation keys found for the given node tree.

Definition at line 212 of file daeCharacter.cxx.

Referenced by collect_keys().

The documentation for this class was generated from the following files:

- pandatool/src/daeegg/daeCharacter.h
- pandatool/src/daeegg/daeCharacter.cxx