Panda3D
|
Reads a character model and/or animations and strips out the animation from one of the top joints from the entire character. More...
#include "eggTopstrip.h"
Public Member Functions | |
void | adjust_transform (LMatrix4d &mat) const |
Adjust the transform extracted from the "top" joint according to the -s and -i/-n options, prior to applying it to the skeleton. | |
void | check_transform_channels () |
Checks the _transform_channels string to ensure that it contains only the expected nine letters, or a subset. | |
void | run () |
void | strip_anim (EggCharacterData *char_data, EggJointData *joint_data, int from_model, EggCharacterData *from_char, EggJointData *top_joint, EggCharacterDb &db) |
Applies the channels from joint _top_joint in model from_model to the joint referenced by joint_data. | |
void | strip_anim_vertices (EggNode *egg_node, int into_model, int from_model, EggJointData *top_joint, EggCharacterDb &db) |
Applies the channels from joint _top_joint in model from_model to the vertices at egg_node. | |
Public Attributes | |
Filename | _channel_filename |
bool | _got_invert_transform |
bool | _invert_transform |
string | _top_joint_name |
string | _transform_channels |
Reads a character model and/or animations and strips out the animation from one of the top joints from the entire character.
Particularly useful for generating stackable character models from separately-extracted characters.
Definition at line 38 of file eggTopstrip.h.
void EggTopstrip::adjust_transform | ( | LMatrix4d & | mat | ) | const |
Adjust the transform extracted from the "top" joint according to the -s and -i/-n options, prior to applying it to the skeleton.
Definition at line 306 of file eggTopstrip.cxx.
References LMatrix4d::invert_in_place().
Referenced by strip_anim(), and strip_anim_vertices().
void EggTopstrip::check_transform_channels | ( | ) |
Checks the _transform_channels string to ensure that it contains only the expected nine letters, or a subset.
Definition at line 198 of file eggTopstrip.cxx.
void EggTopstrip::strip_anim | ( | EggCharacterData * | char_data, |
EggJointData * | joint_data, | ||
int | from_model, | ||
EggCharacterData * | from_char, | ||
EggJointData * | top_joint, | ||
EggCharacterDb & | db | ||
) |
Applies the channels from joint _top_joint in model from_model to the joint referenced by joint_data.
Definition at line 236 of file eggTopstrip.cxx.
References adjust_transform(), EggJointData::get_frame(), EggComponentData::get_model(), EggJointData::get_net_frame(), EggCharacterData::get_num_frames(), EggComponentData::get_num_models(), EggComponentData::has_model(), and EggCharacterDb::set_matrix().
void EggTopstrip::strip_anim_vertices | ( | EggNode * | egg_node, |
int | into_model, | ||
int | from_model, | ||
EggJointData * | top_joint, | ||
EggCharacterDb & | db | ||
) |
Applies the channels from joint _top_joint in model from_model to the vertices at egg_node.
Definition at line 282 of file eggTopstrip.cxx.
References adjust_transform(), EggJointData::get_net_frame(), EggComponentData::has_model(), and EggNode::transform_vertices_only().