Panda3D

animBundleMaker.h

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