Changeset 133 for trunk/VUT/work/TestCulling
- Timestamp:
- 06/15/05 01:18:51 (20 years ago)
- Location:
- trunk/VUT/work/TestCulling
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/VUT/work/TestCulling/TestCullingApplication.cpp
r130 r133 81 81 void TestCullingApplication::createFrameListener() 82 82 { 83 mFrameListener= new Terrain MouseQueryListener(mWindow, mCamera, mSceneMgr,83 mFrameListener= new TerrainFrameListener(mWindow, mCamera, mSceneMgr, 84 84 mGUIRenderer, mSceneContentGenerator); 85 85 mFrameListener->showDebugOverlay(true); … … 94 94 95 95 /***********************************************/ 96 /* Terrain MouseQueryListener implementation */96 /* TerrainFrameListener implementation */ 97 97 /***********************************************/ 98 98 //----------------------------------------------------------------------- 99 Terrain MouseQueryListener::TerrainMouseQueryListener(RenderWindow* win, Camera* cam,99 TerrainFrameListener::TerrainFrameListener(RenderWindow* win, Camera* cam, 100 100 SceneManager *sceneManager, 101 101 CEGUI::Renderer *renderer, … … 161 161 } 162 162 //----------------------------------------------------------------------- 163 Terrain MouseQueryListener::~TerrainMouseQueryListener()164 { 165 } 166 //----------------------------------------------------------------------- 167 void Terrain MouseQueryListener::mouseMoved(MouseEvent *e)163 TerrainFrameListener::~TerrainFrameListener() 164 { 165 } 166 //----------------------------------------------------------------------- 167 void TerrainFrameListener::mouseMoved(MouseEvent *e) 168 168 { 169 169 // Update CEGUI with the mouse motion … … 172 172 } 173 173 //----------------------------------------------------------------------- 174 void Terrain MouseQueryListener::mousePressed(MouseEvent* e)174 void TerrainFrameListener::mousePressed(MouseEvent* e) 175 175 { 176 176 // Left mouse button down … … 188 188 189 189 //----------------------------------------------------------------------- 190 void Terrain MouseQueryListener::mouseReleased(MouseEvent* e)190 void TerrainFrameListener::mouseReleased(MouseEvent* e) 191 191 { 192 192 // Left mouse button up … … 204 204 } 205 205 //----------------------------------------------------------------------- 206 void Terrain MouseQueryListener::mouseDragged (MouseEvent *e)206 void TerrainFrameListener::mouseDragged (MouseEvent *e) 207 207 { 208 208 // If we are dragging the left mouse button. … … 219 219 } 220 220 //----------------------------------------------------------------------- 221 bool Terrain MouseQueryListener::frameStarted(const FrameEvent &evt)221 bool TerrainFrameListener::frameStarted(const FrameEvent &evt) 222 222 { 223 223 return ExampleFrameListener::frameStarted(evt); 224 224 } 225 225 //----------------------------------------------------------------------- 226 bool Terrain MouseQueryListener::frameEnded(const FrameEvent& evt)226 bool TerrainFrameListener::frameEnded(const FrameEvent& evt) 227 227 { 228 228 if (mShutdownRequested) … … 245 245 } 246 246 //----------------------------------------------------------------------- 247 void Terrain MouseQueryListener::changeThreshold(int incr)247 void TerrainFrameListener::changeThreshold(int incr) 248 248 { 249 249 mVisibilityThreshold += incr; … … 256 256 } 257 257 //----------------------------------------------------------------------- 258 void Terrain MouseQueryListener::nextAlgorithm()258 void TerrainFrameListener::nextAlgorithm() 259 259 { 260 260 mCurrentAlgorithm = ++mCurrentAlgorithm % … … 264 264 } 265 265 //----------------------------------------------------------------------- 266 void Terrain MouseQueryListener::toggleUseOptimization()266 void TerrainFrameListener::toggleUseOptimization() 267 267 { 268 268 mUseOptimization = !mUseOptimization; … … 276 276 } 277 277 //----------------------------------------------------------------------- 278 void Terrain MouseQueryListener::toggleShowOctree()278 void TerrainFrameListener::toggleShowOctree() 279 279 { 280 280 mShowOctree = !mShowOctree; … … 283 283 } 284 284 //----------------------------------------------------------------------- 285 void Terrain MouseQueryListener::toggleUseDepthPass()285 void TerrainFrameListener::toggleUseDepthPass() 286 286 { 287 287 mUseDepthPass = !mUseDepthPass; … … 290 290 } 291 291 //----------------------------------------------------------------------- 292 void Terrain MouseQueryListener::toggleShowViz()292 void TerrainFrameListener::toggleShowViz() 293 293 { 294 294 mShowVisualization = !mShowVisualization; … … 298 298 } 299 299 //----------------------------------------------------------------------- 300 void Terrain MouseQueryListener::setAlgorithm(int algorithm)300 void TerrainFrameListener::setAlgorithm(int algorithm) 301 301 { 302 302 mAlgorithmInfo->setCaption(": " + mCurrentAlgorithmCaptions[mCurrentAlgorithm]); … … 304 304 } 305 305 //----------------------------------------------------------------------- 306 void Terrain MouseQueryListener::updateStats()306 void TerrainFrameListener::updateStats() 307 307 { 308 308 unsigned int opt = 0; … … 331 331 } 332 332 //----------------------------------------------------------------------- 333 void Terrain MouseQueryListener::keyPressed(KeyEvent* e)333 void TerrainFrameListener::keyPressed(KeyEvent* e) 334 334 { 335 335 if(e->getKey() == KC_ESCAPE) … … 345 345 } 346 346 //----------------------------------------------------------------------- 347 void Terrain MouseQueryListener::keyReleased(KeyEvent* e)347 void TerrainFrameListener::keyReleased(KeyEvent* e) 348 348 { 349 349 CEGUI::System::getSingleton().injectKeyUp(e->getKey()); … … 351 351 } 352 352 //----------------------------------------------------------------------- 353 void Terrain MouseQueryListener::keyClicked(KeyEvent* e)353 void TerrainFrameListener::keyClicked(KeyEvent* e) 354 354 { 355 355 // Do nothing -
trunk/VUT/work/TestCulling/TestCullingApplication.h
r115 r133 25 25 }; 26 26 27 class Terrain MouseQueryListener : public ExampleFrameListener, public MouseListener, public MouseMotionListener27 class TerrainFrameListener : public ExampleFrameListener, public MouseListener, public MouseMotionListener 28 28 { 29 29 public: 30 30 31 Terrain MouseQueryListener(RenderWindow* win, Camera* cam, SceneManager *sceneManager,31 TerrainFrameListener(RenderWindow* win, Camera* cam, SceneManager *sceneManager, 32 32 CEGUI::Renderer *renderer, SceneContentGenerator *sceneContentGenerator); 33 33 34 34 35 ~Terrain MouseQueryListener( );35 ~TerrainFrameListener( ); 36 36 37 37 bool frameStarted(const FrameEvent& evt);
Note: See TracChangeset
for help on using the changeset viewer.