Panda3D
animBundleMaker.h
1 // Filename: animBundleMaker.h
2 // Created by: drose (22Feb99)
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 ANIMBUNDLEMAKER_H
16 #define ANIMBUNDLEMAKER_H
17 
18 #include "pandabase.h"
19 #include "typedef.h"
20 
21 class EggNode;
22 class EggGroupNode;
23 class EggTable;
24 class EggXfmSAnim;
25 class EggSAnimData;
26 class AnimGroup;
27 class AnimBundle;
28 class AnimBundleNode;
31 
32 ////////////////////////////////////////////////////////////////////
33 // Class : AnimBundleMaker
34 // Description : Converts an EggTable hierarchy, beginning with a
35 // <Bundle> entry, into an AnimBundle hierarchy.
36 ////////////////////////////////////////////////////////////////////
37 class EXPCL_PANDAEGG AnimBundleMaker {
38 public:
40 
41  AnimBundleNode *make_node();
42 
43 private:
44  AnimBundle *make_bundle();
45 
46  void inspect_tree(EggNode *node);
47  void build_hierarchy(EggTable *egg_table, AnimGroup *parent);
48 
50  create_s_channel(EggSAnimData *egg_anim, const string &name,
51  AnimGroup *parent);
53  create_xfm_channel(EggNode *egg_node, const string &name,
54  AnimGroup *parent);
56  create_xfm_channel(EggXfmSAnim *egg_anim, const string &name,
57  AnimGroup *parent);
58 
59  PN_stdfloat _fps;
60  int _num_frames;
61  bool _ok_fps;
62  bool _ok_num_frames;
63 
64  EggTable *_root;
65 
66 };
67 
68 #endif
This is the root of an AnimChannel hierarchy.
Definition: animBundle.h:31
A base class for nodes in the hierarchy that are not leaf nodes.
Definition: eggGroupNode.h:51
An animation channel that issues a scalar each frame, read from a table such as might have been read ...
Corresponding to an <S$Anim> entry, this stores a single column of numbers, for instance for a morph ...
Definition: eggSAnimData.h:28
This is the base class for AnimChannel and AnimBundle.
Definition: animGroup.h:36
This corresponds to an <Xfm$Anim_S$> entry, which is a collection of up to nine <S$Anim> entries that...
Definition: eggXfmSAnim.h:33
This corresponds to a.
Definition: eggTable.h:31
Converts an EggTable hierarchy, beginning with a <Bundle> entry, into an AnimBundle hierarchy...
A base class for things that may be directly added into the egg hierarchy.
Definition: eggNode.h:38
An animation channel that issues a matrix each frame, read from a table such as might have been read ...
This is a node that contains a pointer to an AnimBundle.