Changeset 1195 for GTP/trunk/App/Demos/Vis/KdTreeDemo/OGRE/include
- Timestamp:
- 08/10/06 17:08:57 (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
r1187 r1195 6 6 #include <ivreader.h> 7 7 #include "TestKdTreeAppListener.h" 8 9 10 class KdTreeAppRenderTargetListener : public RenderTargetListener 11 { 12 public: 13 KdTreeAppRenderTargetListener(SceneManager *sceneMgr); 14 15 protected: 16 void preViewportUpdate (const RenderTargetViewportEvent &evt); 17 void postRenderTargetUpdate (const RenderTargetEvent &evt); 18 19 SceneManager *mSceneMgr; 20 21 ShadowTechnique mSavedShadowTechnique; 22 ColourValue mSavedAmbientLight; 23 }; 8 24 9 25 class KdTreeApp : public ExampleApplication … … 15 31 ~KdTreeApp() 16 32 { 33 delete mRenderTargerListener; 17 34 delete mFrameListener; 18 35 } … … 24 41 Camera *mFollowCam; 25 42 KdTreeAppListener *mFrameListener; 43 KdTreeAppRenderTargetListener *mRenderTargerListener; 26 44 27 45 String mSceneFiles; … … 69 87 }; 70 88 71 class KdTreeAppRenderTargetListener : public RenderTargetListener72 {73 public:74 KdTreeAppRenderTargetListener(SceneManager *sceneMgr);75 76 protected:77 void preViewportUpdate (const RenderTargetViewportEvent &evt);78 void postRenderTargetUpdate (const RenderTargetEvent &evt);79 80 SceneManager *mSceneMgr;81 82 ShadowTechnique mSavedShadowTechnique;83 ColourValue mSavedAmbientLight;84 };85 86 89 #endif -
GTP/trunk/App/Demos/Vis/KdTreeDemo/OGRE/include/TestKdTreeAppListener.h
r1187 r1195 55 55 bool mShowTree; 56 56 bool mFreeMove; 57 bool mTopCamFollow; 57 58 58 59 Real mDelayedQueriesIssued; … … 71 72 OverlayElement *mRenderMethodInfo; 72 73 OverlayElement *mMovementInfo; 74 OverlayElement *mTopCamInfo; 73 75 74 76 OverlayElement *mFrustumCulledNodesInfo; … … 107 109 void updateStats(void); 108 110 111 // 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; 124 125 enum AppState 126 { 127 AS_NORMAL, 128 AS_RECORD, 129 AS_PLAYBACK 130 }; 131 132 FrameList mFrameList; 133 134 AppState mAppState; 135 136 void toggleRecord(); 137 void togglePlayback(); 138 void saveFrameInfo(Real elapsedTime); 139 109 140 public: 141 void loadFrames(const String& filename); 142 void saveFrames(const String& filename); 110 143 111 144 // visualization modes for scene nodes
Note: See TracChangeset
for help on using the changeset viewer.