Changeset 1415 for GTP/trunk/Lib/Vis/Preprocessing/src/HierarchyManager.cpp
- Timestamp:
- 09/18/06 18:57:34 (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
GTP/trunk/Lib/Vis/Preprocessing/src/HierarchyManager.cpp
r1379 r1415 309 309 { 310 310 cout << "starting bv hierarchy construction ... " << endl; 311 312 311 mBvHierarchy->CreateRoot(objects); 313 312 … … 317 316 318 317 mTotalCost = mBvHierarchy->mTotalCost; 319 Debug << " reseting cost, new total cost: " << mTotalCost << endl;318 Debug << "\nreseting cost, new total cost: " << mTotalCost << endl; 320 319 321 320 mTQueue.Push(sc); … … 373 372 } 374 373 } 374 375 375 return true;//!globalTerminationCriteriaMet; 376 376 } … … 458 458 } 459 459 460 /////////////////// ////////460 /////////////////// 461 461 //-- subdivide leaf node 462 462 463 if (ApplySubdivisionCandidate(mCurrentCandidate)) 463 464 { 464 cout << "subdividing candidate " << ++ i << " of type " << mCurrentCandidate->Type() << endl; 465 cout << mCurrentCandidate->Type() << " "; 466 if (0) cout << "subdividing candidate " << ++ i << " of type " << mCurrentCandidate->Type() << endl; 465 467 mHierarchyStats.nodes += 2; 466 468 … … 474 476 475 477 // we use objects for evaluating vsp tree construction until 476 // a certain depth once a certain depth existiert ... .478 // a certain depth once a certain depth existiert ... 477 479 if (StartObjectSpaceSubdivision()) 478 480 { 479 481 mObjectSpaceSubdivisionType = mSavedObjectSpaceSubdivisionType; 480 482 481 cout << " starting object space subdivision at depth "483 cout << "\nstarting object space subdivision at depth " 482 484 << mVspTree->mVspStats.maxDepth << " (" 483 485 << mMinDepthForObjectSpaceSubdivion << ") " << endl; … … 494 496 mViewSpaceSubdivisionType = mSavedViewSpaceSubdivisionType; 495 497 496 cout << " starting view space subdivision at depth "498 cout << "\nstarting view space subdivision at depth " 497 499 << GetObjectSpaceSubdivisionDepth() << " (" 498 500 << mMinDepthForViewSpaceSubdivion << ") " << endl; … … 608 610 vector<SubdivisionCandidate *> dirtyList; 609 611 CollectDirtyCandidates(dirtyList); 610 cout << "repairing " << (int)dirtyList.size() << " candidates ... "; 611 612 if (0) cout << "repairing " << (int)dirtyList.size() << " candidates ... "; 613 614 ///////////////////////////////// 612 615 //-- reevaluate the dirty list 616 613 617 SubdivisionCandidateContainer::const_iterator sit, sit_end = dirtyList.end(); 614 618 … … 638 642 mHierarchyStats.repairTime += timeDiff; 639 643 640 cout << "finished in " << timeDiff * 1e-3f << " secs" << endl;644 if (0) cout << "finished in " << timeDiff * 1e-3f << " secs" << endl; 641 645 } 642 646 … … 753 757 case BV_BASED_OBJ_SUBDIV: 754 758 { 755 ExportBvHierarchy(exporter, objects); 759 AxisAlignedBox3 bbox = mBvHierarchy->GetBoundingBox(); 760 bbox.Scale(Vector3(0.5, 1, 0.5)); 761 762 ExportBvHierarchy(exporter, objects, &bbox); 756 763 break; 757 764 } … … 763 770 764 771 void HierarchyManager::ExportBvHierarchy(Exporter *exporter, 765 const ObjectContainer &objects) const 772 const ObjectContainer &objects, 773 AxisAlignedBox3 *bbox) const 766 774 { 767 775 exporter->SetWireframe(); 768 exporter->ExportBvHierarchy(*mBvHierarchy, 0 );776 exporter->ExportBvHierarchy(*mBvHierarchy, 0, bbox); 769 777 } 770 778
Note: See TracChangeset
for help on using the changeset viewer.