Changeset 1665 for GTP/trunk/Lib/Vis/Preprocessing/src
- Timestamp:
- 10/23/06 10:38:44 (18 years ago)
- Location:
- GTP/trunk/Lib/Vis/Preprocessing/src
- Files:
-
- 3 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 } -
GTP/trunk/Lib/Vis/Preprocessing/src/Environment.cpp
r1663 r1665 2171 2171 optFloat, 2172 2172 "vsp_construction_render_cost_decrease_weight=", 2173 " 1.0");2173 "0.99"); 2174 2174 2175 2175 RegisterOption("VspTree.Termination.maxDepth", … … 2459 2459 optFloat, 2460 2460 "bvh_construction_render_cost_decrease_weight=", 2461 " 1.0");2461 "0.99"); 2462 2462 2463 2463 RegisterOption("BvHierarchy.Construction.useGlobalSorting", -
GTP/trunk/Lib/Vis/Preprocessing/src/VspTree.cpp
r1664 r1665 822 822 const float factor = mRenderCostDecreaseWeight; 823 823 824 float priority ;824 float priority = factor * renderCostDecr + (1.0f - factor) * oldRenderCost; 825 825 826 826 if (mHierarchyManager->mConsiderMemory) … … 828 828 //cout << "here4 rc: " << factor * renderCostDecr << " pvs: " << (1.0f - factor) * splitCandidate.GetPvsEntriesIncr() << endl; 829 829 //const float priority = factor * renderCostDecr - (1.0f - factor) * splitCandidate.GetPvsEntriesIncr(); 830 priority = renderCostDecr / ((float)splitCandidate.GetPvsEntriesIncr() + + 1.0f); 831 } 832 else 833 { 834 priority = factor * renderCostDecr + (1.0f - factor) * oldRenderCost; 830 priority /= ((float)splitCandidate.GetPvsEntriesIncr() + + 1.0f); 835 831 } 836 832 … … 851 847 const float factor = mRenderCostDecreaseWeight; 852 848 853 float priority ;849 float priority = factor * renderCostDecr + (1.0f - factor) * oldRenderCost; 854 850 855 851 if (mHierarchyManager->mConsiderMemory) … … 857 853 //cout << "here2 rc: " << factor * renderCostDecr << " pvs: " << (1.0f - factor) * splitCandidate.GetPvsEntriesIncr() << endl; 858 854 //const float priority = factor * renderCostDecr - (1.0f - factor) * splitCandidate.GetPvsEntriesIncr(); 859 priority = renderCostDecr / ((float)splitCandidate.GetPvsEntriesIncr() + 1.0f); 860 } 861 else 862 { 863 priority = factor * renderCostDecr + (1.0f - factor) * oldRenderCost; 855 priority /= ((float)splitCandidate.GetPvsEntriesIncr() + 1.0f); 864 856 } 865 857
Note: See TracChangeset
for help on using the changeset viewer.