Panda3D
|
Class representing an animated character. More...
#include "daeCharacter.h"
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. | |
void | bind_joints (JointMap &joint_map) |
Binds the joints to the character. | |
void | build_table (EggTable *parent, FCDSceneNode *node, const pset< float > &keys) |
Processes a joint node and its transforms. | |
void | collect_keys (pset< float > &keys) |
Collects all animation keys of animations applied to this character. | |
virtual TypeHandle | force_init_type () |
virtual TypeHandle | get_type () const |
void | influence_vertex (int index, EggVertex *vertex) |
Adds the influences for the given vertex. | |
PT (EggGroup) _node_group | |
void | r_collect_keys (FCDSceneNode *node, pset< float > &keys) |
Collects all animation keys found for the given node tree. | |
![]() | |
TypedReferenceCount (const TypedReferenceCount ©) | |
void | operator= (const TypedReferenceCount ©) |
![]() | |
TypedObject (const TypedObject ©)=default | |
TypedObject * | as_typed_object () |
Returns the object, upcast (if necessary) to a TypedObject pointer. | |
const TypedObject * | as_typed_object () const |
Returns the object, upcast (if necessary) to a TypedObject pointer. | |
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. | |
bool | is_exact_type (TypeHandle handle) const |
Returns true if the current object is the indicated type exactly. | |
bool | is_of_type (TypeHandle handle) const |
Returns true if the current object is or derives from the indicated type. | |
TypedObject & | operator= (const TypedObject ©)=default |
![]() | |
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) |
![]() | |
int | get_ref_count () const |
WeakReferenceList * | get_weak_list () const |
Returns the WeakReferenceList associated with this ReferenceCount object. | |
bool | has_weak_list () const |
Returns true if this particular ReferenceCount object has a WeakReferenceList created, false otherwise. | |
void | local_object () |
This function should be called, once, immediately after creating a new instance of some ReferenceCount-derived object on the stack. | |
void | ref () const |
Explicitly increments the reference count. | |
bool | ref_if_nonzero () const |
Atomically increases the reference count of this object if it is not zero. | |
bool | test_ref_count_integrity () const |
Does some easy checks to make sure that the reference count isn't completely bogus. | |
bool | test_ref_count_nonzero () const |
Does some easy checks to make sure that the reference count isn't zero, or completely bogus. | |
virtual bool | unref () const |
Explicitly decrements the reference count. | |
bool | unref_if_one () const |
Atomically decreases the reference count of this object if it is one. | |
WeakReferenceList * | weak_ref () |
Adds the indicated PointerToVoid as a weak reference to this object. | |
void | weak_unref () |
Removes the indicated PointerToVoid as a weak reference to this object. | |
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. | |
![]() | |
static TypeHandle | get_class_type () |
static void | init_type () |
Public Attributes | |
LMatrix4d | _bind_shape_mat |
const FCDControllerInstance * | _instance |
const FCDGeometryMesh * | _skin_mesh |
![]() | |
get_type | |
![]() | |
get_ref_count | |
Returns the current reference count. | |
Class representing an animated character.
Definition at line 35 of file daeCharacter.h.
typedef pmap<std::string, Joint> DaeCharacter::JointMap |
Definition at line 52 of file daeCharacter.h.
typedef epvector<Joint> DaeCharacter::Joints |
Definition at line 51 of file daeCharacter.h.
DaeCharacter::DaeCharacter | ( | EggGroup * | node_group, |
const FCDControllerInstance * | controller_instance ) |
Definition at line 40 of file daeCharacter.cxx.
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.
References adjust_joints().
Referenced by adjust_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 69 of file daeCharacter.cxx.
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 244 of file daeCharacter.cxx.
References EggGroupNode::add_child(), and build_table().
Referenced by build_table(), and DAEToEggConverter::convert_file().
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().
Referenced by DAEToEggConverter::convert_file().
|
inlinevirtual |
Reimplemented from TypedReferenceCount.
Definition at line 81 of file daeCharacter.h.
|
inlinestatic |
Definition at line 82 of file daeCharacter.h.
|
inlinevirtual |
Reimplemented from TypedReferenceCount.
Definition at line 78 of file daeCharacter.h.
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().
|
inlinestatic |
Definition at line 85 of file daeCharacter.h.
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().
LMatrix4d DaeCharacter::_bind_shape_mat |
Definition at line 69 of file daeCharacter.h.
const FCDControllerInstance* DaeCharacter::_instance |
Definition at line 68 of file daeCharacter.h.
const FCDGeometryMesh* DaeCharacter::_skin_mesh |
Definition at line 67 of file daeCharacter.h.