00001 // Filename: eggTopstrip.h 00002 // Created by: drose (23Feb01) 00003 // 00004 //////////////////////////////////////////////////////////////////// 00005 // 00006 // PANDA 3D SOFTWARE 00007 // Copyright (c) 2001, Disney Enterprises, Inc. All rights reserved 00008 // 00009 // All use of this software is subject to the terms of the Panda 3d 00010 // Software license. You should have received a copy of this license 00011 // along with this source code; you will also find a current copy of 00012 // the license at http://www.panda3d.org/license.txt . 00013 // 00014 // To contact the maintainers of this program write to 00015 // panda3d@yahoogroups.com . 00016 // 00017 //////////////////////////////////////////////////////////////////// 00018 00019 #ifndef EGGTOPSTRIP_H 00020 #define EGGTOPSTRIP_H 00021 00022 #include <pandatoolbase.h> 00023 00024 #include <eggCharacterFilter.h> 00025 #include <luse.h> 00026 00027 #include "pvector.h" 00028 00029 class EggJointData; 00030 class EggJointPointer; 00031 00032 //////////////////////////////////////////////////////////////////// 00033 // Class : EggTopstrip 00034 // Description : Reads a character model and/or animations and strips 00035 // out the animation from one of the top joints from the 00036 // entire character. Particularly useful for generating 00037 // stackable character models from separately-extracted 00038 // characters. 00039 //////////////////////////////////////////////////////////////////// 00040 class EggTopstrip : public EggCharacterFilter { 00041 public: 00042 EggTopstrip(); 00043 00044 void run(); 00045 void check_transform_channels(); 00046 00047 void strip_anim(EggJointData *joint_data, int from_model, 00048 EggJointData *top_joint); 00049 void strip_anim_vertices(EggNode *egg_node, int into_model, 00050 int from_model, EggJointData *top_joint); 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