- Timestamp:
- 10/25/05 00:01:57 (19 years ago)
- Location:
- trunk/VUT
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/VUT/GtpVisibility/src/CoherentHierarchicalCullingManager.cpp
r346 r348 40 40 if (visiblePixels > mVisibilityThreshold) 41 41 { 42 // ensure that we only traverse once if geometry in node 43 if (!mHierarchyInterface->IsNodeVisible(node)) 44 mHierarchyInterface->TraverseNode(node); 42 45 mHierarchyInterface->PullUpVisibility(node); 43 mHierarchyInterface->TraverseNode(node);44 46 } 45 47 else 46 48 { 49 mHierarchyInterface->SetNodeVisible(node, false); 50 47 51 ++ mNumQueryCulledNodes; 48 52 49 if (mVisualizeCulledNodes)53 if (mVisualizeCulledNodes) 50 54 { 51 55 mHierarchyInterface->VisualizeCulledNode(node, QUERY_CULLED); … … 83 87 84 88 // if we assume node to be visible in this frame => skip query 85 // TODO: check this (not the expected speed up) 86 if (wasVisible && (mAssumedVisibility > 0) && DecideVisible(node) && mHierarchyInterface->HasGeometry(node)) 89 bool skipQuery = wasVisible && (mAssumedVisibility > 0) && 90 DecideVisible(node) && mHierarchyInterface->HasGeometry(node); 91 92 //if (mHierarchyInterface->LastVisited(node) == mHierarchyInterface->GetFrameId()) 93 // Ogre::LogManager::getSingleton().logMessage("error"); 94 95 if (skipQuery) 87 96 { 88 97 SkipQuery(node); … … 93 102 // identify nodes that we cannot skip queries for 94 103 // geometry not only in leaves => test for renderable geometry 95 // we also need to test if node was processed in current frame, otherwise 96 // node is tested several times because of priority queue 97 bool issueQuery = (mHierarchyInterface->LastVisited(node) != mHierarchyInterface->GetFrameId()) 98 && (!wasVisible || mHierarchyInterface->HasGeometry(node)); 104 bool issueQuery = !wasVisible || mHierarchyInterface->HasGeometry(node); 99 105 100 106 // reset node's visibility classification 101 mHierarchyInterface->SetNodeVisible(node, false); 107 // set visibe if geometry in node so we only traverse once 108 mHierarchyInterface->SetNodeVisible(node, wasVisible && issueQuery); 102 109 103 110 // update node's visited flag -
trunk/VUT/work/iv/TestCullingIVApplication.cpp
r343 r348 92 92 mSceneMgr->setOption("NodeVizScale", &scale); 93 93 // HACK: change this to relative path 94 String path = " D:/svn/trunk/VUT/Ogre/resources/";94 String path = "E:/svn/gametools/trunk/VUT/Ogre/resources/"; 95 95 96 96 SceneNode *node1 = mSceneMgr->getRootSceneNode()->createChildSceneNode("Node1");
Note: See TracChangeset
for help on using the changeset viewer.