Panda3D
 All Classes Functions Variables Enumerations
eggTopstrip.h
1 // Filename: eggTopstrip.h
2 // Created by: drose (23Feb01)
3 //
4 ////////////////////////////////////////////////////////////////////
5 //
6 // PANDA 3D SOFTWARE
7 // Copyright (c) Carnegie Mellon University. All rights reserved.
8 //
9 // All use of this software is subject to the terms of the revised BSD
10 // license. You should have received a copy of this license along
11 // with this source code in a file named "LICENSE."
12 //
13 ////////////////////////////////////////////////////////////////////
14 
15 #ifndef EGGTOPSTRIP_H
16 #define EGGTOPSTRIP_H
17 
18 #include "pandatoolbase.h"
19 
20 #include "eggCharacterFilter.h"
21 #include "luse.h"
22 
23 #include "pvector.h"
24 
25 class EggCharacterData;
26 class EggCharacterDb;
27 class EggJointData;
28 class EggJointPointer;
29 
30 ////////////////////////////////////////////////////////////////////
31 // Class : EggTopstrip
32 // Description : Reads a character model and/or animations and strips
33 // out the animation from one of the top joints from the
34 // entire character. Particularly useful for generating
35 // stackable character models from separately-extracted
36 // characters.
37 ////////////////////////////////////////////////////////////////////
39 public:
40  EggTopstrip();
41 
42  void run();
44 
45  void strip_anim(EggCharacterData *char_data, EggJointData *joint_data,
46  int from_model, EggCharacterData *from_char,
47  EggJointData *top_joint, EggCharacterDb &db);
48  void strip_anim_vertices(EggNode *egg_node, int into_model,
49  int from_model, EggJointData *top_joint,
50  EggCharacterDb &db);
51 
52  void adjust_transform(LMatrix4d &mat) const;
53 
54 
55  string _top_joint_name;
56  bool _got_invert_transform;
57  bool _invert_transform;
58  string _transform_channels;
59  Filename _channel_filename;
60 };
61 
62 #endif
63 
This is a 4-by-4 transform matrix.
Definition: lmatrix.h:4716
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...
The name of a file, such as a texture file or an Egg file.
Definition: filename.h:44
This class is used during joint optimization or restructuring to store the table of interim joint com...
This is a base class for EggJointNodePointer and EggMatrixTablePointer.
This is the base class for a family of programs that operate on a number of character models and thei...
void adjust_transform(LMatrix4d &mat) const
Adjust the transform extracted from the "top" joint according to the -s and -i/-n options...
Represents a single character, as read and collected from several models and animation files...
Reads a character model and/or animations and strips out the animation from one of the top joints fro...
Definition: eggTopstrip.h:38
void check_transform_channels()
Checks the _transform_channels string to ensure that it contains only the expected nine letters...
This is one node of a hierarchy of EggJointData nodes, each of which represents a single joint of the...
Definition: eggJointData.h:34
A base class for things that may be directly added into the egg hierarchy.
Definition: eggNode.h:38
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...