Changeset 1202 for GTP/trunk/App/Demos/Vis/KdTreeDemo/OGRE/include
- Timestamp:
- 08/13/06 01:44:15 (18 years ago)
- Location:
- GTP/trunk/App/Demos/Vis/KdTreeDemo/OGRE/include
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
GTP/trunk/App/Demos/Vis/KdTreeDemo/OGRE/include/TestKdTree.h
r1200 r1202 27 27 public: 28 28 29 KdTreeApp() { mFrameListener = 0; } 29 KdTreeApp() 30 { 31 mFrameListener = 0; 32 mRenderTargerListener = 0; 33 } 34 35 KdTreeApp(const String& infile, const String& outfile) 36 { 37 mFrameListener = 0; 38 mRenderTargerListener = 0; 39 mDemoInfileName = infile; 40 mDemoOutfileName = outfile; 41 } 30 42 31 43 ~KdTreeApp() … … 56 68 int mSelectEntities; 57 69 70 String mDemoInfileName; 71 String mDemoOutfileName; 72 58 73 virtual void setupResources(void); 59 74 … … 71 86 virtual bool configure(void); 72 87 88 /** load scene from file **/ 73 89 bool loadScene(const String& filename); 74 90 bool loadSceneIV(const String &filename, SceneNode *root, const int index); 91 92 void createMaterials(void); 75 93 private: 76 void createMaterials(void);77 94 std::string cat(std::string name, int x, int z) 78 95 { -
GTP/trunk/App/Demos/Vis/KdTreeDemo/OGRE/include/TestKdTreeAppListener.h
r1200 r1202 46 46 using namespace Ogre; 47 47 48 struct FrameInfo 49 { 50 FrameInfo(Vector3 pos, Quaternion or, Real time): 51 mPosition(pos), mOrientation(or), mElapsedTime(time) 52 { } 53 54 Vector3 mPosition; 55 Quaternion mOrientation; 56 Real mElapsedTime; 57 }; 58 59 typedef std::list<FrameInfo> FrameList; 60 48 61 class KdTreeAppListener: public FrameListener, public KeyListener 49 62 { … … 110 123 111 124 // stuff for walkthrough recording/playback 112 struct FrameInfo 113 { 114 FrameInfo(Vector3 pos, Quaternion or, Real time): 115 mPosition(pos), mOrientation(or), mElapsedTime(time) 116 { } 117 118 Vector3 mPosition; 119 Quaternion mOrientation; 120 Real mElapsedTime; 121 }; 122 123 typedef std::list<FrameInfo> FrameList; 125 String mDemoInfileName; 126 String mDemoOutfileName; 124 127 125 128 enum AppState … … 139 142 OverlayElement * mDemoStatus; 140 143 144 void setDemoOverlay(); 145 141 146 void toggleRecord(); 142 147 void togglePlayback(); 143 // void resetPlayback();144 148 145 149 void saveFrameInfo(Real elapsedTime); 146 147 void setDemoOverlay(); 148 149 void saveFramesBinary(const String& filename); 150 void loadFramesBinary(const String& filename); 150 151 /** save demo frame data to file **/ 152 static void saveFrames(const String& filename, FrameList& framelist); 153 static void saveFramesAscii(const String& filename, FrameList& framelist); 154 static void saveFramesBinary(const String& filename, FrameList& framelist); 155 156 /** load demo frame data from file **/ 157 static void loadFrames(const String& filename, FrameList& framelist); 158 static void loadFramesAscii(const String& filename, FrameList& framelist); 159 static void loadFramesBinary(const String& filename, FrameList& framelist); 160 151 161 public: 152 void loadFrames(const String& filename);153 void saveFrames(const String& filename);154 155 162 // visualization modes for scene nodes 156 163 enum … … 163 170 164 171 // Constructor takes a RenderWindow because it uses that to determine input context 165 KdTreeAppListener(RenderWindow* win, SceneManager* sm, Real rs, Real ms, Real rp, 172 KdTreeAppListener(RenderWindow* win, SceneManager* sm, Real rs, Real ms, Real rp, 173 const String& infile, const String& outfile, 166 174 bool useBufferedInputKeys = false, bool useBufferedInputMouse = false); 167 175
Note: See TracChangeset
for help on using the changeset viewer.