Changeset 1893 for GTP/trunk/Lib/Vis/Preprocessing/src/VspTree.cpp
- Timestamp:
- 12/14/06 09:16:08 (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
GTP/trunk/Lib/Vis/Preprocessing/src/VspTree.cpp
r1845 r1893 827 827 const int maxCostMisses = splitCandidate.mParentData.mMaxCostMisses; 828 828 // max cost threshold violated? 829 splitCandidate.SetMaxCostMisses(maxCostRatioViolated ? maxCostMisses + 1: maxCostMisses); 829 splitCandidate.SetMaxCostMisses(maxCostRatioViolated ? 830 maxCostMisses + 1: maxCostMisses); 830 831 } 831 832 … … 848 849 const float factor = mRenderCostDecreaseWeight; 849 850 850 float priority; 851 852 if (1) 853 { 854 priority = factor * renderCostDecr + (1.0f - factor) * oldRenderCost; 855 if (mHierarchyManager->mConsiderMemory) 856 { 857 priority /= ((float)splitCandidate.GetPvsEntriesIncr() + mMemoryConst); 858 } 859 } 860 else 861 { 862 if (!mHierarchyManager->mConsiderMemory) 863 { 864 priority = factor * renderCostDecr + (1.0f - factor) * oldRenderCost; 865 } 866 else 867 { 868 const float ratio = 869 renderCostDecr / ((float)splitCandidate.GetPvsEntriesIncr() + mMemoryConst); 870 871 priority = factor * ratio + (1.0f - factor) * oldRenderCost; 872 } 851 float priority = factor * renderCostDecr + (1.0f - factor) * oldRenderCost; 852 853 if (mHierarchyManager->mConsiderMemory) 854 { 855 priority /= ((float)splitCandidate.GetPvsEntriesIncr() + mMemoryConst); 856 } 857 858 ///////////// 859 // avg ray contri 860 861 const float avgRayContri = splitCandidate.mParentData.GetAvgRayContribution(); 862 cout << "vsp avgRayContri: " << avgRayContri << endl; 863 864 // avg ray contri very high. i.e., the result is influenced by undersampling 865 // => decrease priority 866 if (avgRayContri > 99925) 867 { 868 priority /= avgRayContri; 873 869 } 874 870 … … 1869 1865 VspLeaf *leaf = dynamic_cast<VspLeaf *>(data.mNode); 1870 1866 1871 1872 1867 if (data.mPvs > mVspStats.maxPvs) 1873 1868 { … … 1885 1880 { 1886 1881 ++ mVspStats.maxDepthNodes; 1887 //Debug << "new max depth: " << mVspStats.maxDepthNodes << endl;1888 1882 } 1889 1883 … … 1908 1902 ++ mCreatedViewCells; 1909 1903 1910 #ifdef GTP GTP_DEBUG1904 #ifdef GTP_DEBUG 1911 1905 Debug << "BSP stats: " 1912 1906 << "Depth: " << data.mDepth << " (max: " << mTermMaxDepth << "), "
Note: See TracChangeset
for help on using the changeset viewer.