- Timestamp:
- 02/26/07 23:47:04 (18 years ago)
- Location:
- GTP/trunk/Lib/Vis
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
GTP/trunk/Lib/Vis/OnlineCullingCHC/OGRE/src/OgreOcclusionCullingSceneManager.cpp
r2168 r2170 742 742 } 743 743 744 InitItemBufferPass(); // create material for item buffer pass 744 // create material for item buffer pass 745 InitItemBufferPass(); 745 746 746 747 // save ambient light to reset later -
GTP/trunk/Lib/Vis/Preprocessing/src/HierarchyManager.cpp
r2130 r2170 2492 2492 void HierarchyManager::CreateTraversalTree() 2493 2493 { 2494 int mind, maxd; 2495 mVspTree->EvalMinMaxDepth(mind, maxd); 2496 2497 cout << "old tree balance: " << mind << " " << maxd << endl; 2494 2498 mTraversalTree = new TraversalTree; 2495 2499 -
GTP/trunk/Lib/Vis/Preprocessing/src/ViewCellsManager.cpp
r2168 r2170 6989 6989 6990 6990 // hack: just show final view cells 6991 int pass = (int)mViewCells.size(); 6991 const int pass = (int)mViewCells.size(); 6992 6992 6993 //for (int pass = histoStepSize; pass <= numLeaves; pass += histoStepSize) 6993 6994 if (1) … … 7017 7018 ViewCellsManager::FinalizeViewCells(createMesh); 7018 7019 7019 if (1) 7020 { 7021 if (mHierarchyManager->mUseTraversalTree) 7022 { 7023 // create a traversal tree for optimal view cell casting 7024 mHierarchyManager->CreateTraversalTree(); 7025 } 7026 } 7027 } 7028 7029 7030 } 7020 if (mHierarchyManager->mUseTraversalTree) 7021 { 7022 // create a traversal tree for optimal view cell casting 7023 mHierarchyManager->CreateTraversalTree(); 7024 } 7025 } 7026 7027 7028 } -
GTP/trunk/Lib/Vis/Preprocessing/src/VspTree.cpp
r2124 r2170 3464 3464 3465 3465 3466 } 3466 void VspTree::EvalMinMaxDepth(int &minDepth, int &maxDepth) 3467 { 3468 stack<pair<VspNode *, int> > nodeStack; 3469 nodeStack.push(pair<VspNode *, int>(mRoot, 0)); 3470 3471 minDepth = 999999; 3472 maxDepth = 0; 3473 3474 while (!nodeStack.empty()) 3475 { 3476 VspNode *node = nodeStack.top().first; 3477 const int depth = nodeStack.top().second; 3478 3479 nodeStack.pop(); 3480 3481 if (node->IsLeaf()) 3482 { 3483 // test if this leaf is in valid view space 3484 VspLeaf *leaf = static_cast<VspLeaf *>(node); 3485 3486 if (depth < minDepth) 3487 minDepth = depth; 3488 3489 if (depth > maxDepth) 3490 maxDepth = depth; 3491 } 3492 else 3493 { 3494 VspInterior *interior = static_cast<VspInterior *>(node); 3495 3496 nodeStack.push(pair<VspNode *, int>(interior->GetBack(), depth + 1)); 3497 nodeStack.push(pair<VspNode *, int>(interior->GetFront(), depth + 1)); 3498 } 3499 } 3500 } 3501 3502 3503 } -
GTP/trunk/Lib/Vis/Preprocessing/src/VspTree.h
r2124 r2170 922 922 float PrepareHeuristics(KdLeaf *leaf); 923 923 924 924 void EvalMinMaxDepth(int &minDepth, int &maxDepth); 925 925 926 ///////////////////////////////////////////////////////////////////////////// 926 927
Note: See TracChangeset
for help on using the changeset viewer.