Panda3D

Loading...
Searching...
No Matches
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.
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.
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.
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 &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.
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 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.
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.

## Detailed Description

Class representing an animated character.

Definition at line 35 of file daeCharacter.h.

## Member Typedef Documentation

## ◆ JointMap

typedef pmap<std::string, Joint> DaeCharacter::JointMap

Definition at line 52 of file daeCharacter.h.

## ◆ Joints

typedef epvector<Joint> DaeCharacter::Joints

Definition at line 51 of file daeCharacter.h.

## Constructor & Destructor Documentation

## ◆ DaeCharacter()

DaeCharacter::DaeCharacter | ( | EggGroup * | node_group,
|  | const FCDControllerInstance * | controller_instance )

Definition at line 40 of file daeCharacter.cxx.

## 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.

References adjust_joints().

Referenced by adjust_joints(), and DAEToEggConverter::convert_file().

## ◆ 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.

Referenced by DAEToEggConverter::convert_file().

## ◆ 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.

References EggGroupNode::add_child(), and build_table().

Referenced by build_table(), and DAEToEggConverter::convert_file().

## ◆ 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().

Referenced by DAEToEggConverter::convert_file().

## ◆ force_init_type()

virtual TypeHandle DaeCharacter::force_init_type | ( |  | ) |
| inline virtual

Reimplemented from TypedReferenceCount.

Definition at line 81 of file daeCharacter.h.

## ◆ get_class_type()

static TypeHandle DaeCharacter::get_class_type | ( |  | ) |
| inline static

Definition at line 82 of file daeCharacter.h.

## ◆ get_type()

virtual TypeHandle DaeCharacter::get_type | ( |  | ) | const
| inline virtual

Reimplemented from TypedReferenceCount.

Definition at line 78 of file daeCharacter.h.

## ◆ 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().

## ◆ init_type()

static void DaeCharacter::init_type | ( |  | ) |
| inline static

Definition at line 85 of file daeCharacter.h.

## ◆ 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().

## Member Data Documentation

## ◆ _bind_shape_mat

LMatrix4d DaeCharacter::_bind_shape_mat

Definition at line 69 of file daeCharacter.h.

## ◆ _instance

const FCDControllerInstance* DaeCharacter::_instance

Definition at line 68 of file daeCharacter.h.

## ◆ _skin_mesh

const FCDGeometryMesh* DaeCharacter::_skin_mesh

Definition at line 67 of file daeCharacter.h.

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

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