15 #ifndef EGGJOINTDATA_H 16 #define EGGJOINTDATA_H 18 #include "pandatoolbase.h" 19 #include "eggComponentData.h" 40 INLINE
int get_num_children()
const;
59 void expose(EggGroup::DCSType dcs_type = EggGroup::DC_default);
65 virtual void write(ostream &out,
int indent_level = 0)
const;
68 void do_begin_reparent();
70 void do_begin_compute_reparent();
71 bool do_compute_reparent(
int model_index,
int n,
EggCharacterDb &db);
73 void do_finish_reparent();
86 bool _rest_frames_differ;
91 LMatrix4d _new_net_frame, _new_net_frame_inv;
92 bool _got_new_net_frame, _got_new_net_frame_inv;
93 bool _computed_reparent;
101 int _new_parent_depth;
102 bool _got_new_parent_depth;
109 static void init_type() {
110 EggComponentData::init_type();
111 register_type(_type_handle,
"EggJointData",
112 EggComponentData::get_class_type());
115 return get_class_type();
117 virtual TypeHandle force_init_type() {init_type();
return get_class_type();}
127 #include "eggJointData.I" void reparent_to(EggJointData *new_parent)
Indicates an intention to change the parent of this joint to the indicated joint, or NULL to remove i...
This is a 4-by-4 transform matrix.
void optimize()
Calls optimize() on all models, and recursively on all joints at this node and below.
EggJointData * find_joint(const string &name)
Returns the first descendent joint found with the indicated name, or NULL if no joint has that name...
void zero_channels(const string &components)
Calls zero_channels() on all models for this joint, but does not recurse downwards.
bool rest_frames_differ() const
Returns true if the rest frames for different models differ in their initial value.
This is the base class of both EggJointData and EggSliderData.
LMatrix4d get_net_frame_inv(int model_index, int n, EggCharacterDb &db) const
Returns the inverse of get_net_frame().
void quantize_channels(const string &components, double quantum)
Calls quantize_channels() on all models for this joint, and then recurses downwards to all joints bel...
void apply_default_pose(int source_model, int frame)
Applies the pose from the indicated frame of the indicated source model_index as the initial pose for...
This class is used during joint optimization or restructuring to store the table of interim joint com...
bool has_rest_frame() const
Returns true if the joint knows its rest frame, false otherwise.
LMatrix4d get_net_frame(int model_index, int n, EggCharacterDb &db) const
Returns the complete transform from the root corresponding to this joint position in the nth frame in...
void move_vertices_to(EggJointData *new_owner)
Moves the vertices assigned to this joint into the indicated joint, without changing their weight ass...
Represents a set of characters, as read and collected from possibly several model and/or animation eg...
Represents a single character, as read and collected from several models and animation files...
int score_reparent_to(EggJointData *new_parent, EggCharacterDb &db)
Computes a score >= 0 reflecting the similarity of the current joint's animation (in world space) to ...
const LMatrix4d & get_rest_frame() const
Returns the rest frame of the joint.
This is one node of a hierarchy of EggJointData nodes, each of which represents a single joint of the...
virtual void add_back_pointer(int model_index, EggObject *egg_object)
Adds the indicated model joint or anim table to the data.
void force_initial_rest_frame()
Forces all of the joints to have the same rest frame value as the first joint read in...
LMatrix4d get_frame(int model_index, int n) const
Returns the local transform matrix corresponding to this joint position in the nth frame in the indic...
bool do_rebuild_all(EggCharacterDb &db)
Calls do_rebuild() on all models, and recursively on all joints at this node and below.
This is our own Panda specialization on the default STL set.
TypeHandle is the identifier used to differentiate C++ class types.
void expose(EggGroup::DCSType dcs_type=EggGroup::DC_default)
Calls expose() on all models for this joint, but does not recurse downwards.
The highest-level base class in the egg directory.