35 ~XFileAnimationSet() {
49 bundle->set_table_type(EggTable::TT_bundle);
57 mirror_table(converter, converter->
get_dart_node(), skeleton);
60 JointData::const_iterator ji;
61 for (ji = _joint_data.begin(); ji != _joint_data.end(); ++ji) {
62 const std::string &joint_name = (*ji).first;
66 if (anim_table ==
nullptr) {
68 <<
"Frame " << joint_name <<
", named by animation data, not defined.\n";
71 FrameEntries::const_iterator fi;
72 for (fi = table._entries.begin(); fi != table._entries.end(); ++fi) {
73 anim_table->
add_data((*fi).get_mat(table._flags));
81 for (ti = _tables.begin(); ti != _tables.end(); ++ti) {
83 EggGroup *joint = (*ti).second._joint;
84 if (anim_table->empty() && joint !=
nullptr) {
89 if (_frame_rate != 0.0) {
90 anim_table->set_fps(_frame_rate);
101 get_table(
const std::string &joint_name)
const {
102 Tables::const_iterator ti;
103 ti = _tables.find(joint_name);
104 if (ti != _tables.end()) {
105 return (*ti).second._table;
116 return _joint_data[joint_name];
123 void XFileAnimationSet::
126 EggGroupNode::iterator gi;
127 for (gi = model_node->begin(); gi != model_node->end(); ++gi) {
129 if (child->
is_of_type(EggGroup::get_class_type())) {
131 if (group->get_group_type() == EggGroup::GT_joint) {
135 CoordinateSystem cs =
139 xform->set_fps(converter->_frame_rate);
140 TablePair &table_pair = _tables[group->get_name()];
141 table_pair._table = xform;
142 table_pair._joint = group;
145 mirror_table(converter, group, new_table);
149 mirror_table(converter, group, anim_node);
get_coordinate_system
Returns the coordinate system in which the egg file is defined.
EggNode * add_child(EggNode *node)
Adds the indicated child to the group and returns it.
The main glue of the egg hierarchy, this corresponds to the <Group>, <Instance>, and <Joint> type nod...
A base class for things that may be directly added into the egg hierarchy.
This corresponds to an <Xfm$Anim_S$> entry, which is a collection of up to nine <S$Anim> entries that...
void optimize()
Optimizes the table by collapsing redundant sub-tables.
bool add_data(const LMatrix4d &mat)
Adds a new matrix to the table, by adding a new row to each of the subtables.
EggData * get_egg_data()
Returns the EggData structure.
bool is_of_type(TypeHandle handle) const
Returns true if the current object is or derives from the indicated type.
bool create_hierarchy(XFileToEggConverter *converter)
Sets up the hierarchy of EggTables corresponding to this AnimationSet.
EggXfmSAnim * get_table(const std::string &joint_name) const
Returns the table associated with the indicated joint name.
FrameData & create_frame_data(const std::string &joint_name)
Returns a reference to a new FrameData table corresponding to the indicated joint.
EggGroup * get_dart_node() const
Returns the root of the joint hierarchy, if _make_char is true, or NULL otherwise.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.