Changeset 1665 for GTP/trunk/Lib/Vis/Preprocessing/src/BvHierarchy.cpp
- Timestamp:
- 10/23/06 10:38:44 (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
GTP/trunk/Lib/Vis/Preprocessing/src/BvHierarchy.cpp
r1664 r1665 543 543 const float factor = mRenderCostDecreaseWeight; 544 544 545 priority = factor * renderCostDecr + (1.0f - factor) * oldRenderCost; 546 545 547 // take render cost of node into account 546 548 // otherwise danger of being stuck in a local minimum!! … … 549 551 //cout << "here7 rc: " << factor * renderCostDecr << " pvs: " << (1.0f - factor) * splitCandidate.GetPvsEntriesIncr() << endl; 550 552 //priority = factor * renderCostDecr - (1.0f - factor) * splitCandidate.GetPvsEntriesIncr();// / mBvhStats.Leaves(); 551 priority = renderCostDecr / ((float)splitCandidate.GetPvsEntriesIncr() + 1.0f); 552 } 553 else 554 { 555 priority = factor * renderCostDecr + (1.0f - factor) * oldRenderCost; 553 priority /= ((float)splitCandidate.GetPvsEntriesIncr() + 1.0f); 556 554 } 557 555 } … … 584 582 const float factor = mRenderCostDecreaseWeight; 585 583 586 float priority ;584 float priority = factor * renderCostDecr + (1.0f - factor) * oldRenderCost; 587 585 588 586 // $$ matt temp … … 591 589 //cout << "here5 rc: " << factor * renderCostDecr << " pvs: " << (1.0f - factor) * splitCandidate.GetPvsEntriesIncr() << endl; 592 590 //const float priority = factor * renderCostDecr - (1.0f - factor) * (float)splitCandidate.GetPvsEntriesIncr(); 593 priority = renderCostDecr / ((float)splitCandidate.GetPvsEntriesIncr() + 1.0f); 594 } 595 else 596 { 597 priority = factor * renderCostDecr + (1.0f - factor) * oldRenderCost; 598 } 599 591 priority /= ((float)splitCandidate.GetPvsEntriesIncr() + 1.0f); 592 } 593 600 594 return priority; 601 595 }
Note: See TracChangeset
for help on using the changeset viewer.