00001 // Filename: animBundleMaker.h 00002 // Created by: drose (22Feb99) 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 ANIMBUNDLEMAKER_H 00020 #define ANIMBUNDLEMAKER_H 00021 00022 #include "pandabase.h" 00023 #include "typedef.h" 00024 00025 class EggNode; 00026 class EggGroupNode; 00027 class EggTable; 00028 class EggXfmSAnim; 00029 class EggSAnimData; 00030 class AnimGroup; 00031 class AnimBundle; 00032 class AnimBundleNode; 00033 class AnimChannelScalarTable; 00034 class AnimChannelMatrixXfmTable; 00035 00036 /////////////////////////////////////////////////////////////////// 00037 // Class : AnimBundleMaker 00038 // Description : Converts an EggTable hierarchy, beginning with a 00039 // <Bundle> entry, into an AnimBundle hierarchy. 00040 //////////////////////////////////////////////////////////////////// 00041 class EXPCL_PANDAEGG AnimBundleMaker { 00042 public: 00043 AnimBundleMaker(EggTable *root); 00044 00045 AnimBundleNode *make_node(); 00046 00047 private: 00048 AnimBundle *make_bundle(); 00049 00050 void inspect_tree(EggNode *node); 00051 void build_hierarchy(EggTable *egg_table, AnimGroup *parent); 00052 00053 AnimChannelScalarTable * 00054 create_s_channel(EggSAnimData *egg_anim, const string &name, 00055 AnimGroup *parent); 00056 AnimChannelMatrixXfmTable * 00057 create_xfm_channel(EggNode *egg_node, const string &name, 00058 AnimGroup *parent); 00059 AnimChannelMatrixXfmTable * 00060 create_xfm_channel(EggXfmSAnim *egg_anim, const string &name, 00061 AnimGroup *parent); 00062 00063 float _fps; 00064 int _num_frames; 00065 bool _ok_fps; 00066 bool _ok_num_frames; 00067 00068 EggTable *_root; 00069 00070 }; 00071 00072 #endif