Panda3D
|
00001 // Filename: fltToEggLevelState.h 00002 // Created by: drose (18Apr01) 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 FLTTOEGGLEVELSTATE_H 00016 #define FLTTOEGGLEVELSTATE_H 00017 00018 #include "pandatoolbase.h" 00019 #include "fltGeometry.h" 00020 00021 class FltObject; 00022 class FltBead; 00023 class EggGroupNode; 00024 class EggGroup; 00025 class FltToEggConverter; 00026 00027 //////////////////////////////////////////////////////////////////// 00028 // Class : FltToEggLevelState 00029 // Description : This keeps track of relevant things about the 00030 // traversal as we walk through the flt hierarchy. 00031 //////////////////////////////////////////////////////////////////// 00032 class FltToEggLevelState { 00033 public: 00034 INLINE FltToEggLevelState(FltToEggConverter *converter); 00035 INLINE FltToEggLevelState(const FltToEggLevelState ©); 00036 INLINE void operator = (const FltToEggLevelState ©); 00037 ~FltToEggLevelState(); 00038 00039 EggGroupNode *get_synthetic_group(const string &name, 00040 const FltBead *transform_bead, 00041 FltGeometry::BillboardType type = FltGeometry::BT_none); 00042 00043 void set_transform(const FltBead *flt_bead, EggGroup *egg_group); 00044 00045 const FltObject *_flt_object; 00046 EggGroupNode *_egg_parent; 00047 00048 private: 00049 class ParentNodes { 00050 public: 00051 ParentNodes(); 00052 00053 EggGroup *_axial_billboard; 00054 EggGroup *_point_billboard; 00055 EggGroup *_plain; 00056 }; 00057 00058 typedef pmap<LMatrix4d, ParentNodes *> Parents; 00059 Parents _parents; 00060 00061 FltToEggConverter *_converter; 00062 }; 00063 00064 #include "fltToEggLevelState.I" 00065 00066 #endif