Changeset 2187 for GTP/trunk/Lib/Vis/Preprocessing/src/BvHierarchy.cpp
- Timestamp:
- 03/05/07 11:07:44 (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
GTP/trunk/Lib/Vis/Preprocessing/src/BvHierarchy.cpp
r2124 r2187 384 384 BvhTraversalData &backData) 385 385 { 386 mNodeTimer.Entry(); 386 387 const BvhTraversalData &tData = sc.mParentData; 387 388 BvhLeaf *leaf = tData.mNode; … … 480 481 } 481 482 483 mNodeTimer.Exit(); 484 482 485 // return the new interior node 483 486 return node; … … 489 492 const bool globalCriteriaMet) 490 493 { 494 mSubdivTimer.Entry(); 495 491 496 BvhSubdivisionCandidate *sc = 492 497 static_cast<BvhSubdivisionCandidate *>(splitCandidate); … … 505 510 // create new interior node and two leaf node 506 511 currentNode = SubdivideNode(*sc, tFrontData, tBackData); 507 512 508 513 // decrease the weighted average cost of the subdivisoin 509 514 mTotalCost -= sc->GetRenderCostDecrease(); … … 524 529 EvalSubdivisionCandidate(*frontCandidate); 525 530 EvalSubdivisionCandidate(*backCandidate); 526 531 527 532 // cross reference 528 533 tFrontData.mNode->SetSubdivisionCandidate(frontCandidate); … … 550 555 } 551 556 557 mSubdivTimer.Exit(); 558 552 559 return currentNode; 553 560 } … … 608 615 bool computeSplitPlane) 609 616 { 617 mEvalTimer.Entry(); 610 618 if (computeSplitPlane) 611 619 { … … 697 705 // compute global decrease in render cost 698 706 splitCandidate.SetPriority(priority); 707 mEvalTimer.Exit(); 699 708 } 700 709 … … 1549 1558 bool useVisibilityBasedHeuristics) 1550 1559 { 1560 mSplitTimer.Entry(); 1561 1551 1562 if (mIsInitialSubdivision) 1552 1563 { … … 1653 1664 backObjects = nBackObjects[bestAxis]; 1654 1665 1666 mSplitTimer.Exit(); 1667 1655 1668 //cout << "val: " << nCostRatio[bestAxis] << " axis: " << bestAxis << endl; 1656 1669 return nCostRatio[bestAxis]; … … 2312 2325 const ObjectContainer &objects) 2313 2326 { 2327 mSortTimer.Entry(); 2328 2329 const bool doSort = true; 2330 2314 2331 // we sort the objects as a preprocess so they don't have 2315 2332 // to be sorted for each split … … 2320 2337 CreateLocalSubdivisionCandidates(objects, 2321 2338 &sortedObjects, 2322 true,2339 doSort, 2323 2340 i); 2324 2341 … … 2342 2359 2343 2360 *(tData.mSortedObjects[3]) = objects; 2344 //stable_sort(tData.mSortedObjects[3]->begin(), tData.mSortedObjects[3]->end(), smallerSize); 2345 sort(tData.mSortedObjects[3]->begin(), tData.mSortedObjects[3]->end(), smallerSize); 2361 2362 stable_sort(tData.mSortedObjects[3]->begin(), tData.mSortedObjects[3]->end(), smallerSize); 2363 //sort(tData.mSortedObjects[3]->begin(), tData.mSortedObjects[3]->end(), smallerSize); 2364 2365 mSortTimer.Exit(); 2346 2366 } 2347 2367
Note: See TracChangeset
for help on using the changeset viewer.