Changeset 27
- Timestamp:
- 03/22/05 18:01:26 (20 years ago)
- Location:
- trunk/VUT/OcclusionCullingSceneManager
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/VUT/OcclusionCullingSceneManager/TestCulling/TestCullingApplication.h
r26 r27 15 15 : ExampleFrameListener(win, cam, false, true), mGUIRenderer(renderer), mShipNode(shipNode), mShutdownRequested(false) 16 16 { 17 17 18 // Setup default variables 18 19 mCurrentObject = NULL; … … 27 28 mAlgorithmType = OcclusionCullingSceneManager::RENDER_COHERENT; 28 29 29 showDebugOverlay(false); 30 30 //mMyOverlay = OverlayManager::getSingleton().getByName("scripts/MyPanel"); 31 mMyOverlay = OverlayManager::getSingleton().getByName("Core/MyPanel"); 32 33 //mDebugOverlay->hide(); 34 //mMyOverlay->show(); 31 35 // Register this so that we get mouse events. 32 36 mEventProcessor->addMouseListener(this); … … 39 43 } 40 44 45 void myShowOverlay(bool show) 46 { 47 if (mDebugOverlay) 48 { 49 if (show) 50 { 51 mDebugOverlay->show(); 52 } 53 else 54 { 55 mDebugOverlay->hide(); 56 } 57 } 58 if(mMyOverlay) 59 { 60 mMyOverlay->show(); 61 } 62 63 } 41 64 bool frameStarted(const FrameEvent &evt) 42 65 { 43 66 /* Real MoveFactor = 80.0 * evt.timeSinceLastFrame; 44 67 45 68 mInputDevice->capture(); … … 47 70 if(mInputDevice->isKeyDown(Ogre::KC_UP)) 48 71 { 49 50 72 mAlgorithmType = (mAlgorithmType + 1) % OcclusionCullingSceneManager::NUM_RENDERMODES; 51 73 //mShipNode->translate(0.0, MoveFactor, 0.0); … … 62 84 63 85 if(mInputDevice->isKeyDown(Ogre::KC_ESCAPE)) 64 return false; 65 66 return true; 67 } 68 69 /* MouseListener callbacks. */ 70 virtual void mouseClicked(MouseEvent* e) { } 71 virtual void mouseEntered(MouseEvent* e) { } 72 virtual void mouseExited(MouseEvent* e) { } 73 74 // This is when the mouse button goes DOWN. 75 virtual void mousePressed(MouseEvent* e); 76 77 // This is when the mouse button is let UP. 78 virtual void mouseReleased(MouseEvent* e); 79 80 /* MouseMotionListener callbacks */ 81 virtual void mouseMoved (MouseEvent *e); 86 return false;*/ 87 88 if(mInputDevice->isKeyDown(Ogre::KC_L)) 89 myShowOverlay(false); 90 91 return ExampleFrameListener::frameStarted(evt); 92 } 93 94 /* MouseListener callbacks. */ 95 virtual void mouseClicked(MouseEvent* e) { } 96 virtual void mouseEntered(MouseEvent* e) { } 97 virtual void mouseExited(MouseEvent* e) { } 98 99 // This is when the mouse button goes DOWN. 100 virtual void mousePressed(MouseEvent* e); 101 102 // This is when the mouse button is let UP. 103 virtual void mouseReleased(MouseEvent* e); 104 105 /* MouseMotionListener callbacks */ 106 virtual void mouseMoved (MouseEvent *e); 82 107 83 // This is when the mouse is clicked, held and dragged.84 virtual void mouseDragged (MouseEvent *e);85 86 void keyPressed(KeyEvent* e)87 {108 // This is when the mouse is clicked, held and dragged. 109 virtual void mouseDragged (MouseEvent *e); 110 111 void keyPressed(KeyEvent* e) 112 { 88 113 if(e->getKey() == KC_ESCAPE) 89 114 { … … 128 153 bool mShutdownRequested; 129 154 int mAlgorithmType; 155 Overlay *mMyOverlay; 130 156 }; 131 157
Note: See TracChangeset
for help on using the changeset viewer.