Changeset 1606


Ignore:
Timestamp:
10/10/06 20:28:28 (18 years ago)
Author:
mattausch
Message:
 
Location:
GTP/trunk/Lib/Vis
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • GTP/trunk/Lib/Vis/OnlineCullingCHC/OGRE/include/OgreOcclusionCullingSceneManager.h

    r1602 r1606  
    210210        /// If view cells are used. 
    211211        bool mUseViewCells; 
     212 
     213        /// if view cells visualization should be shown 
     214        bool mShowViewCells; 
    212215 
    213216        /// if the view cells are filtered 
  • GTP/trunk/Lib/Vis/OnlineCullingCHC/OGRE/src/OgreOcclusionCullingSceneManager.cpp

    r1602 r1606  
    5252mElementaryViewCell(NULL), 
    5353mDeleteQueueAfterRendering(true), 
    54 mNormalExecution(false) 
     54mNormalExecution(false), 
     55mShowViewCells(false) 
    5556{ 
    5657        Ogre::LogManager::getSingleton().logMessage("creating occlusion culling scene manager"); 
     
    178179    if (mCurrentViewCell && mCurrentViewCell->GetMesh()) 
    179180        { 
    180                 const bool showSingleViewCell = true; 
    181                 if (showSingleViewCell) 
     181                //const bool showSingleViewCell = true; 
     182                if (!mShowViewCells) 
    182183                { 
    183184                        const int id = mCurrentViewCell->GetId(); 
    184185                        mViewCellsGeometry[id]->_updateRenderQueue(getRenderQueue()); 
    185  
    186                         GtpVisibilityPreprocessor::ObjectPvsMap::const_iterator oit, oit_end = mCurrentViewCell->GetPvs().mEntries.end(); 
    187                          
    188                         for (oit = mCurrentViewCell->GetPvs().mEntries.begin(); oit != oit_end; ++ oit) 
    189                         { 
    190                                 OgreMeshInstance *obj = static_cast<OgreMeshInstance *>((*oit).first); 
    191                 obj->GetEntity()->_updateRenderQueue(getRenderQueue()); 
    192                         }        
    193186                } 
    194187                else 
     
    201194                        }        
    202195                } 
     196 
     197                GtpVisibilityPreprocessor::ObjectPvsMap::const_iterator  
     198                        oit, oit_end = mCurrentViewCell->GetPvs().mEntries.end(); 
     199                         
     200                for (oit = mCurrentViewCell->GetPvs().mEntries.begin(); oit != oit_end; ++ oit) 
     201                { 
     202                        OgreMeshInstance *obj = static_cast<OgreMeshInstance *>((*oit).first); 
     203                        obj->GetEntity()->_updateRenderQueue(getRenderQueue()); 
     204                }        
    203205        } 
    204206/* 
     
    638640                if (mViewCellsLoaded) 
    639641                { 
    640                         bool showViewCells = *static_cast<const bool *>(val); 
     642                        mShowViewCells = *static_cast<const bool *>(val); 
    641643                        // if we decide use view cells 
    642644                        // all objects are set to invisible per default 
    643                         VisualizeViewCells(showViewCells); 
     645                        VisualizeViewCells(mShowViewCells); 
    644646                } 
    645647 
  • GTP/trunk/Lib/Vis/Preprocessing/src/ViewCellsManager.cpp

    r1603 r1606  
    24882488 
    24892489        ViewCellInterior *interior = dynamic_cast<ViewCellInterior *>(root); 
     2490 
     2491        // reset interior pvs 
    24902492        interior->GetPvs().Clear(); 
     2493        // reset recursive pvs 
    24912494        pvs.Clear(); 
    24922495        vector<ObjectPvs> pvsList; 
Note: See TracChangeset for help on using the changeset viewer.