25#include <FCDocument/FCDSceneNode.h>
26#include <FCDocument/FCDControllerInstance.h>
27#include <FCDocument/FCDSkinController.h>
28#include <FCDocument/FCDGeometryMesh.h>
35class DaeCharacter :
public TypedReferenceCount {
37 DaeCharacter(
EggGroup *node_group,
const FCDControllerInstance* controller_instance);
40 INLINE Joint(
EggGroup *group,
const FCDSceneNode *scene_node) :
41 _bind_pose(LMatrix4d::ident_mat()),
43 _scene_node(scene_node),
44 _character(
nullptr) {}
48 const FCDSceneNode *_scene_node;
49 DaeCharacter *_character;
51 typedef epvector<Joint> Joints;
52 typedef pmap<std::string, Joint> JointMap;
55 void adjust_joints(FCDSceneNode *node,
const JointMap &joint_map,
56 const LMatrix4d &transform = LMatrix4d::ident_mat());
67 const FCDGeometryMesh *_skin_mesh;
68 const FCDControllerInstance *_instance;
69 LMatrix4d _bind_shape_mat;
73 const FCDSkinController *_skin_controller;
75 JointMap _bound_joints;
79 return get_class_type();
81 virtual TypeHandle force_init_type() {init_type();
return get_class_type();}
82 static TypeHandle get_class_type() {
85 static void init_type() {
86 TypedReferenceCount::init_type();
88 TypedReferenceCount::get_class_type());
92 static TypeHandle _type_handle;
This class supervises the construction of an EggData structure from a DAE file.
void bind_joints(JointMap &joint_map)
Binds the joints to the character.
void influence_vertex(int index, EggVertex *vertex)
Adds the influences for the given vertex.
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.
void r_collect_keys(FCDSceneNode *node, pset< float > &keys)
Collects all animation keys found for the given node tree.
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.
The main glue of the egg hierarchy, this corresponds to the <Group>, <Instance>, and <Joint> type nod...
This corresponds to a a <Bundle> entry.
Any one-, two-, three-, or four-component vertex, possibly with attributes such as a normal.
TypeHandle is the identifier used to differentiate C++ class types.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
void register_type(TypeHandle &type_handle, const std::string &name)
This inline function is just a convenient way to call TypeRegistry::register_type(),...
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.