Ignore:
Timestamp:
03/24/05 12:15:20 (19 years ago)
Author:
gametools
Message:
 
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/VUT/OcclusionCullingSceneManager/src/OgreOcclusionCullingSceneManager.cpp

    r28 r29  
    1515        OcclusionCullingSceneManager::OcclusionCullingSceneManager():  
    1616        mFrameId(1), mDistanceQueue(NULL), mVisibilityThreshold(0), mCurrentTestIdx(0), 
    17         mQueryMode(MODE_RENDER), mNumSceneNodes(0), mAlgorithmType(RENDER_COHERENT) 
     17        mQueryMode(MODE_RENDER), mNumSceneNodes(0), mCurrentAlgorithm(RENDER_COHERENT) 
    1818        {                
    1919                mHalfBoundingBox[0] = mHalfBoundingBox[1] = 0; 
     
    4444                //renderZPass(); 
    4545 
    46                 switch(mAlgorithmType) 
     46                switch(mCurrentAlgorithm) 
    4747                { 
    4848                        case RENDER_CULL_FRUSTUM: 
     
    346346        } 
    347347        //----------------------------------------------------------------------- 
    348         void OcclusionCullingSceneManager::setAlgorithmType(int type) 
    349         { 
    350                 mAlgorithmType = type; 
    351         } 
    352         //----------------------------------------------------------------------- 
    353         int OcclusionCullingSceneManager::getAlgorithmType() 
    354         { 
    355                 return mAlgorithmType; 
     348        bool OcclusionCullingSceneManager::setOption( const String & key, const void * val ) 
     349        { 
     350                if ( key == "Algorithm" ) 
     351                { 
     352                        mCurrentAlgorithm = * static_cast < const int * > ( val ); 
     353                        return true; 
     354                } 
     355         
     356                return SceneManager::setOption( key, val ); 
     357        } 
     358        //----------------------------------------------------------------------- 
     359        bool OcclusionCullingSceneManager::getOption( const String & key, void *val ) 
     360        { 
     361                if ( key == "Algorithm" ) 
     362                { 
     363                        * static_cast < int * > ( val ) = mCurrentAlgorithm; 
     364                        return true; 
     365                } 
     366 
     367                return SceneManager::getOption( key, val ); 
     368        } 
     369        //----------------------------------------------------------------------- 
     370        bool OcclusionCullingSceneManager::getOptionValues( const String & key, StringVector  &refValueList ) 
     371        { 
     372                return SceneManager::getOptionValues( key, refValueList ); 
     373        } 
     374        //----------------------------------------------------------------------- 
     375        bool OcclusionCullingSceneManager::getOptionKeys( StringVector & refKeys ) 
     376        { 
     377                SceneManager::getOptionKeys( refKeys ); 
     378                refKeys.push_back( "Algorithm" ); 
     379         
     380                return true; 
    356381        } 
    357382}        
Note: See TracChangeset for help on using the changeset viewer.