Changeset 1829 for GTP/trunk/Lib/Vis
- Timestamp:
- 11/29/06 12:18:27 (18 years ago)
- Location:
- GTP/trunk/Lib/Vis/Preprocessing/src
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
GTP/trunk/Lib/Vis/Preprocessing/src/InternalRayCaster.cpp
r1828 r1829 56 56 } 57 57 58 mPreprocessor.SetupRay(ray, simpleRay.mOrigin, -simpleRay.mDirection); 59 ray.mFlags &= ~Ray::CULL_BACKFACES; 58 60 59 61 if (castDoubleRay && mKdTree->CastRay(ray)) 60 62 { 61 mPreprocessor.SetupRay(ray, simpleRay.mOrigin, -simpleRay.mDirection);62 ray.mFlags &= ~Ray::CULL_BACKFACES;63 63 hitB.mObject = ray.intersections[0].mObject; 64 64 hitB.mPoint = ray.Extrap(ray.intersections[0].mT); -
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 = -
GTP/trunk/Lib/Vis/Preprocessing/src/run_test2
r1824 r1829 42 42 $COMMAND -scene_filename=$SCENE -view_cells_filename=$VIEWCELLS \ 43 43 -rss_use_importance+ -rss_update_subdivision+ -rss_split=hybrid -hybrid_depth=10 \ 44 -view_cells_filter_max_size=1 -preprocessor_stats=$PREFIX-i-combined-update-ccb12-n .log \45 -preprocessor_histogram_file=$PREFIX-i-combined-update-ccb12-n .hlog44 -view_cells_filter_max_size=1 -preprocessor_stats=$PREFIX-i-combined-update-ccb12-nn.log \ 45 -preprocessor_histogram_file=$PREFIX-i-combined-update-ccb12-nn.hlog 46 46 47 47
Note: See TracChangeset
for help on using the changeset viewer.