Panda3D
fltToEggLevelState.h
1 // Filename: fltToEggLevelState.h
2 // Created by: drose (18Apr01)
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 FLTTOEGGLEVELSTATE_H
16 #define FLTTOEGGLEVELSTATE_H
17 
18 #include "pandatoolbase.h"
19 #include "fltGeometry.h"
20 
21 class FltObject;
22 class FltBead;
23 class EggGroupNode;
24 class EggGroup;
25 class FltToEggConverter;
26 
27 ////////////////////////////////////////////////////////////////////
28 // Class : FltToEggLevelState
29 // Description : This keeps track of relevant things about the
30 // traversal as we walk through the flt hierarchy.
31 ////////////////////////////////////////////////////////////////////
33 public:
34  INLINE FltToEggLevelState(FltToEggConverter *converter);
35  INLINE FltToEggLevelState(const FltToEggLevelState &copy);
36  INLINE void operator = (const FltToEggLevelState &copy);
37  ~FltToEggLevelState();
38 
39  EggGroupNode *get_synthetic_group(const string &name,
40  const FltBead *transform_bead,
41  FltGeometry::BillboardType type = FltGeometry::BT_none);
42 
43  void set_transform(const FltBead *flt_bead, EggGroup *egg_group);
44 
45  const FltObject *_flt_object;
46  EggGroupNode *_egg_parent;
47 
48 private:
49  class ParentNodes {
50  public:
51  ParentNodes();
52 
53  EggGroup *_axial_billboard;
54  EggGroup *_point_billboard;
55  EggGroup *_plain;
56  };
57 
59  Parents _parents;
60 
61  FltToEggConverter *_converter;
62 };
63 
64 #include "fltToEggLevelState.I"
65 
66 #endif
A base class for nodes in the hierarchy that are not leaf nodes.
Definition: eggGroupNode.h:51
A base class for any of a broad family of flt records that represent particular beads in the hierarch...
Definition: fltBead.h:33
This class supervises the construction of an EggData structure from the data represented by the FltHe...
This keeps track of relevant things about the traversal as we walk through the flt hierarchy...
The main glue of the egg hierarchy, this corresponds to the <Group>, <Instance>, and <Joint> type nod...
Definition: eggGroup.h:36
The main objecting bead of the flt file.
Definition: fltObject.h:26
EggGroupNode * get_synthetic_group(const string &name, const FltBead *transform_bead, FltGeometry::BillboardType type=FltGeometry::BT_none)
Sometimes it is necessary to synthesize a group within a particular EggGroup, for instance to insert ...
void set_transform(const FltBead *flt_bead, EggGroup *egg_group)
Sets up the group to reflect the transform indicated by the given record, if any. ...