Changeset 1829 for GTP/trunk/Lib/Vis/Preprocessing/src/RssTree.cpp
- Timestamp:
- 11/29/06 12:18:27 (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
GTP/trunk/Lib/Vis/Preprocessing/src/RssTree.cpp
r1824 r1829 2834 2834 sumContributions += c1; 2835 2835 if (c1 > maxContribution) 2836 maxContribution = c1;2836 maxContribution = c1; 2837 2837 2838 2838 //$$ 20.7. changed to sqr to pronouce higher contribution so that … … 2842 2842 sumRelContributions += c2; 2843 2843 if (c2 > maxRelContribution) 2844 maxRelContribution = c2;2844 maxRelContribution = c2; 2845 2845 2846 2846 //sumWeights += weight; … … 2850 2850 float distImportance = 0.0f; 2851 2851 2852 float spatialArea = GetBBox(leaf).SurfaceArea(); 2853 float dirArea = GetDirBBox(leaf).SurfaceArea(); 2852 2854 if (leaf->rays.size()) { 2853 2855 // compute average length of the ray 2854 2856 float avgLength = sumLength/leaf->rays.size(); 2855 2857 // compute estimated area of the visible surface corresponding to these rays 2856 float ss = GetBBox(leaf).SurfaceArea()/2.0f;2857 float sd = GetDirBBox(leaf).SurfaceArea();2858 float ss = spatialArea/2.0f; 2859 float sd = dirArea; 2858 2860 float s = ss + avgLength*(2*sqrt(ss*sd) + avgLength*sd); 2859 2861 … … 2864 2866 // sumWeights = leaf->mTotalRays; 2865 2867 2868 //$$ test 30.11. 2006 2869 // normalize per volume of the cell not the number of rays! 2870 sumWeights = spatialArea*dirArea; 2871 2866 2872 if (sumWeights != 0.0f) { 2867 2873 leaf->mImportance =
Note: See TracChangeset
for help on using the changeset viewer.