Panda3D

eggTopstrip.h

00001 // Filename: eggTopstrip.h
00002 // Created by:  drose (23Feb01)
00003 //
00004 ////////////////////////////////////////////////////////////////////
00005 //
00006 // PANDA 3D SOFTWARE
00007 // Copyright (c) Carnegie Mellon University.  All rights reserved.
00008 //
00009 // All use of this software is subject to the terms of the revised BSD
00010 // license.  You should have received a copy of this license along
00011 // with this source code in a file named "LICENSE."
00012 //
00013 ////////////////////////////////////////////////////////////////////
00014 
00015 #ifndef EGGTOPSTRIP_H
00016 #define EGGTOPSTRIP_H
00017 
00018 #include "pandatoolbase.h"
00019 
00020 #include "eggCharacterFilter.h"
00021 #include "luse.h"
00022 
00023 #include "pvector.h"
00024 
00025 class EggCharacterData;
00026 class EggCharacterDb;
00027 class EggJointData;
00028 class EggJointPointer;
00029 
00030 ////////////////////////////////////////////////////////////////////
00031 //       Class : EggTopstrip
00032 // Description : Reads a character model and/or animations and strips
00033 //               out the animation from one of the top joints from the
00034 //               entire character.  Particularly useful for generating
00035 //               stackable character models from separately-extracted
00036 //               characters.
00037 ////////////////////////////////////////////////////////////////////
00038 class EggTopstrip : public EggCharacterFilter {
00039 public:
00040   EggTopstrip();
00041 
00042   void run();
00043   void check_transform_channels();
00044 
00045   void strip_anim(EggCharacterData *char_data, EggJointData *joint_data,
00046                   int from_model, EggCharacterData *from_char,
00047                   EggJointData *top_joint, EggCharacterDb &db);
00048   void strip_anim_vertices(EggNode *egg_node, int into_model,
00049                            int from_model, EggJointData *top_joint,
00050                            EggCharacterDb &db);
00051 
00052   void adjust_transform(LMatrix4d &mat) const;
00053 
00054 
00055   string _top_joint_name;
00056   bool _got_invert_transform;
00057   bool _invert_transform;
00058   string _transform_channels;
00059   Filename _channel_filename;
00060 };
00061 
00062 #endif
00063 
 All Classes Functions Variables Enumerations