Changeset 951


Ignore:
Timestamp:
05/12/06 02:24:14 (18 years ago)
Author:
mattausch
Message:
 
Location:
GTP/trunk/Lib/Vis/OnlineCullingCHC
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • GTP/trunk/Lib/Vis/OnlineCullingCHC/OGRE/src/OgreOcclusionCullingSceneManager.cpp

    r944 r951  
    11201120                mViewCellsManager->DeleteLocalMergeTree(viewCell); 
    11211121} 
    1122  
     1122//------------------------------------------------------------------------- 
     1123void OcclusionCullingSceneManager::TestVisible(SceneNode *node) 
     1124{ 
     1125        // first test for scene node, then for octant (part of the hierarchy) 
     1126        if (!node->mVisibleChildren) 
     1127                node->setVisible(false); 
     1128 
     1129        node->getOctant()->mVisibleChildren --; 
     1130} 
     1131//------------------------------------------------------------------------- 
     1132void OcclusionCullingSceneManager::TestVisible(Octree *octant) 
     1133{ 
     1134        // first test for scene node, then for octant (part of the hierarchy) 
     1135        if (!octant->mVisibleChildren) 
     1136                octant->setVisible(false); 
     1137} 
     1138 
     1139//------------------------------------------------------------------------- 
     1140void OcclusionCullingSceneManager::UpdateVisibility(Entity *ent) 
     1141{ 
     1142        if (!ent->isVisible()) 
     1143        { 
     1144                bool visible = TestVisible(ent->getParentNode()); 
     1145                 
     1146                if (!visible) 
     1147                        visible = TestVisible(octant->getParentNode()); 
     1148 
     1149                if (!visible) 
     1150                        mHierarchyInterface->pullupVisibility(); 
     1151        } 
     1152} 
    11231153 
    11241154 
  • GTP/trunk/Lib/Vis/OnlineCullingCHC/src/BatchedQueriesCullingManager.cpp

    r938 r951  
    4242                                if (!mHierarchyInterface->IsNodeVisible(node)) 
    4343                                        mHierarchyInterface->TraverseNode(node); 
     44 
    4445                                mHierarchyInterface->PullUpVisibility(node); 
    4546                        } 
Note: See TracChangeset for help on using the changeset viewer.