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