Ignore:
Timestamp:
06/15/05 01:18:51 (20 years ago)
Author:
mattausch
Message:

fixed some bugs

Location:
trunk/VUT/work/TestCulling
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/VUT/work/TestCulling/TestCullingApplication.cpp

    r130 r133  
    8181void TestCullingApplication::createFrameListener() 
    8282{ 
    83         mFrameListener= new TerrainMouseQueryListener(mWindow, mCamera, mSceneMgr,  
     83        mFrameListener= new TerrainFrameListener(mWindow, mCamera, mSceneMgr,  
    8484                mGUIRenderer, mSceneContentGenerator); 
    8585        mFrameListener->showDebugOverlay(true); 
     
    9494 
    9595/***********************************************/ 
    96 /* TerrainMouseQueryListener implementation           */ 
     96/* TerrainFrameListener implementation           */ 
    9797/***********************************************/ 
    9898//----------------------------------------------------------------------- 
    99 TerrainMouseQueryListener::TerrainMouseQueryListener(RenderWindow* win, Camera* cam,  
     99TerrainFrameListener::TerrainFrameListener(RenderWindow* win, Camera* cam,  
    100100                                                                           SceneManager *sceneManager,  
    101101                                                                           CEGUI::Renderer *renderer, 
     
    161161}  
    162162//----------------------------------------------------------------------- 
    163 TerrainMouseQueryListener::~TerrainMouseQueryListener() 
    164 { 
    165 } 
    166 //----------------------------------------------------------------------- 
    167 void TerrainMouseQueryListener::mouseMoved(MouseEvent *e) 
     163TerrainFrameListener::~TerrainFrameListener() 
     164{ 
     165} 
     166//----------------------------------------------------------------------- 
     167void TerrainFrameListener::mouseMoved(MouseEvent *e) 
    168168{ 
    169169        // Update CEGUI with the mouse motion 
     
    172172} 
    173173//----------------------------------------------------------------------- 
    174 void TerrainMouseQueryListener::mousePressed(MouseEvent* e) 
     174void TerrainFrameListener::mousePressed(MouseEvent* e) 
    175175{ 
    176176     // Left mouse button down 
     
    188188 
    189189 //----------------------------------------------------------------------- 
    190 void TerrainMouseQueryListener::mouseReleased(MouseEvent* e) 
     190void TerrainFrameListener::mouseReleased(MouseEvent* e) 
    191191{ 
    192192    // Left mouse button up 
     
    204204}  
    205205//----------------------------------------------------------------------- 
    206 void TerrainMouseQueryListener::mouseDragged (MouseEvent *e) 
     206void TerrainFrameListener::mouseDragged (MouseEvent *e) 
    207207 { 
    208208         // If we are dragging the left mouse button.             
     
    219219} 
    220220//----------------------------------------------------------------------- 
    221 bool TerrainMouseQueryListener::frameStarted(const FrameEvent &evt) 
     221bool TerrainFrameListener::frameStarted(const FrameEvent &evt) 
    222222{         
    223223        return ExampleFrameListener::frameStarted(evt); 
    224224} 
    225225//----------------------------------------------------------------------- 
    226 bool TerrainMouseQueryListener::frameEnded(const FrameEvent& evt) 
     226bool TerrainFrameListener::frameEnded(const FrameEvent& evt) 
    227227{ 
    228228        if (mShutdownRequested) 
     
    245245} 
    246246//----------------------------------------------------------------------- 
    247 void TerrainMouseQueryListener::changeThreshold(int incr) 
     247void TerrainFrameListener::changeThreshold(int incr) 
    248248{ 
    249249        mVisibilityThreshold += incr;  
     
    256256} 
    257257//----------------------------------------------------------------------- 
    258 void TerrainMouseQueryListener::nextAlgorithm() 
     258void TerrainFrameListener::nextAlgorithm() 
    259259{ 
    260260        mCurrentAlgorithm = ++mCurrentAlgorithm %  
     
    264264} 
    265265//----------------------------------------------------------------------- 
    266 void TerrainMouseQueryListener::toggleUseOptimization() 
     266void TerrainFrameListener::toggleUseOptimization() 
    267267{ 
    268268        mUseOptimization = !mUseOptimization; 
     
    276276} 
    277277//----------------------------------------------------------------------- 
    278 void TerrainMouseQueryListener::toggleShowOctree() 
     278void TerrainFrameListener::toggleShowOctree() 
    279279{ 
    280280        mShowOctree = !mShowOctree; 
     
    283283} 
    284284//----------------------------------------------------------------------- 
    285 void TerrainMouseQueryListener::toggleUseDepthPass() 
     285void TerrainFrameListener::toggleUseDepthPass() 
    286286{ 
    287287        mUseDepthPass = !mUseDepthPass; 
     
    290290} 
    291291//----------------------------------------------------------------------- 
    292 void TerrainMouseQueryListener::toggleShowViz() 
     292void TerrainFrameListener::toggleShowViz() 
    293293{ 
    294294        mShowVisualization = !mShowVisualization; 
     
    298298} 
    299299//----------------------------------------------------------------------- 
    300 void TerrainMouseQueryListener::setAlgorithm(int algorithm) 
     300void TerrainFrameListener::setAlgorithm(int algorithm) 
    301301{ 
    302302        mAlgorithmInfo->setCaption(": " + mCurrentAlgorithmCaptions[mCurrentAlgorithm]); 
     
    304304} 
    305305//----------------------------------------------------------------------- 
    306 void TerrainMouseQueryListener::updateStats() 
     306void TerrainFrameListener::updateStats() 
    307307{ 
    308308        unsigned int opt = 0; 
     
    331331} 
    332332//----------------------------------------------------------------------- 
    333 void TerrainMouseQueryListener::keyPressed(KeyEvent* e) 
     333void TerrainFrameListener::keyPressed(KeyEvent* e) 
    334334{ 
    335335        if(e->getKey() == KC_ESCAPE) 
     
    345345} 
    346346//----------------------------------------------------------------------- 
    347 void TerrainMouseQueryListener::keyReleased(KeyEvent* e) 
     347void TerrainFrameListener::keyReleased(KeyEvent* e) 
    348348{ 
    349349        CEGUI::System::getSingleton().injectKeyUp(e->getKey()); 
     
    351351} 
    352352//----------------------------------------------------------------------- 
    353 void TerrainMouseQueryListener::keyClicked(KeyEvent* e)  
     353void TerrainFrameListener::keyClicked(KeyEvent* e)  
    354354{ 
    355355        // Do nothing 
  • trunk/VUT/work/TestCulling/TestCullingApplication.h

    r115 r133  
    2525}; 
    2626 
    27 class TerrainMouseQueryListener : public ExampleFrameListener, public MouseListener, public MouseMotionListener 
     27class TerrainFrameListener : public ExampleFrameListener, public MouseListener, public MouseMotionListener 
    2828{ 
    2929public: 
    3030 
    31     TerrainMouseQueryListener(RenderWindow* win, Camera* cam, SceneManager *sceneManager,  
     31    TerrainFrameListener(RenderWindow* win, Camera* cam, SceneManager *sceneManager,  
    3232                        CEGUI::Renderer *renderer, SceneContentGenerator *sceneContentGenerator); 
    3333 
    3434 
    35     ~TerrainMouseQueryListener( ); 
     35    ~TerrainFrameListener( ); 
    3636 
    3737        bool frameStarted(const FrameEvent& evt); 
Note: See TracChangeset for help on using the changeset viewer.