Changeset 148 for trunk/VUT/GtpVisibility
- Timestamp:
- 06/23/05 00:56:37 (20 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/VUT/GtpVisibility/src/CoherentHierarchicalCullingManager.cpp
r147 r148 64 64 else 65 65 { 66 // if intersects near plane => skip occlusion query because wrong results possible 67 if (intersects) 66 // identify previously visible nodes 67 bool wasVisible = mHierarchyInterface->IsNodeVisible(node) && 68 (mHierarchyInterface->LastVisited(node) == mHierarchyInterface->GetFrameId() - 1); 69 70 // if node is assumed to be visible in this frame => skip query 71 // if intersects near plane => also skip query because wrong results possible 72 bool assumeVisible = intersects || 73 (wasVisible && (mAssumedVisibility > 0) && 74 mHierarchyInterface->HasGeometry(node) && DecideVisible(node)); 75 76 if (assumeVisible) 68 77 { 69 // update octant's visited flag78 // update node's visited flag 70 79 mHierarchyInterface->SetLastVisited(node, mHierarchyInterface->GetFrameId()); 71 80 … … 76 85 } 77 86 78 // identify previously visible nodes 79 bool wasVisible = mHierarchyInterface->IsNodeVisible(node) && 80 (mHierarchyInterface->LastVisited(node) == mHierarchyInterface->GetFrameId() - 1); 81 // if visibility is assumed to be true in this frame 82 bool assumeVisible = wasVisible && (mAssumedVisibility > 0) && DecideVisible(node); 83 84 // identify nodes that we cannot skip queries for 87 // identify nodes that we cannot skip queries for 85 88 // geometry not only in leaves => test for renderable geometry 86 bool issueQuery = !wasVisible || 87 (mHierarchyInterface->HasGeometry(node) && !assumeVisible); 89 bool issueQuery = !wasVisible || mHierarchyInterface->HasGeometry(node); 88 90 89 91 // reset node's visibility classification 90 mHierarchyInterface->SetNodeVisible(node, !issueQuery && assumeVisible);92 mHierarchyInterface->SetNodeVisible(node, false); 91 93 92 94 // update node's visited flag
Note: See TracChangeset
for help on using the changeset viewer.