Changeset 951 for GTP/trunk/Lib/Vis/OnlineCullingCHC/OGRE
- Timestamp:
- 05/12/06 02:24:14 (19 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
GTP/trunk/Lib/Vis/OnlineCullingCHC/OGRE/src/OgreOcclusionCullingSceneManager.cpp
r944 r951 1120 1120 mViewCellsManager->DeleteLocalMergeTree(viewCell); 1121 1121 } 1122 1122 //------------------------------------------------------------------------- 1123 void 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 //------------------------------------------------------------------------- 1132 void 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 //------------------------------------------------------------------------- 1140 void 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 } 1123 1153 1124 1154
Note: See TracChangeset
for help on using the changeset viewer.