- Timestamp:
- 03/06/06 19:02:49 (19 years ago)
- Location:
- GTP/trunk/Lib/Vis/Preprocessing/src
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
GTP/trunk/Lib/Vis/Preprocessing/src/Environment.cpp
r675 r676 1276 1276 RegisterOption("ViewCells.exportToFile", 1277 1277 optBool, 1278 "view_cells_export_to_file", 1278 "view_cells_export_to_file=", 1279 "false"); 1280 1281 RegisterOption("ViewCells.PostProcess.emptyViewCellsMergeAllowed", 1282 optBool, 1283 "view_cells_post_process_empty_view_cells_merge_allowed=" 1279 1284 "false"); 1280 1285 … … 1565 1570 RegisterOption("Preprocessor.samplesFilename", 1566 1571 optString, 1567 " -preprocessor_samples_filename=",1572 "preprocessor_samples_filename=", 1568 1573 "rays.out"); 1569 1574 … … 1717 1722 RegisterOption("VspKdTree.Termination.missTolerance", 1718 1723 optInt, 1719 " -vsp_kd_term_miss_tolerance=",1724 "vsp_kd_term_miss_tolerance=", 1720 1725 "4"); 1721 1726 … … 1997 2002 "0.1"); 1998 2003 1999 RegisterOption("VspBspTree.Factor.leastRaySplits", optFloat, "-vsp_bsp_factor_least_ray_splits=", "1.0"); 2000 RegisterOption("VspBspTree.Factor.balancedRays", optFloat, "-vsp_bsp_factor_balanced_rays=", "1.0"); 2001 RegisterOption("VspBspTree.Factor.pvs", optFloat, "-vsp_bsp_factor_pvs=", "1.0"); 2004 RegisterOption("VspBspTree.Factor.leastRaySplits", 2005 optFloat, 2006 "vsp_bsp_factor_least_ray_splits=", 2007 "1.0"); 2008 2009 RegisterOption("VspBspTree.Factor.balancedRays", 2010 optFloat, 2011 "vsp_bsp_factor_balanced_rays=", 2012 "1.0"); 2013 2014 RegisterOption("VspBspTree.Factor.pvs", 2015 optFloat, 2016 "vsp_bsp_factor_pvs=", 2017 "1.0"); 2002 2018 2003 2019 RegisterOption("VspBspTree.Construction.renderCostWeight", -
GTP/trunk/Lib/Vis/Preprocessing/src/ViewCellBsp.cpp
r675 r676 980 980 viewCell->mLeaf = leaf; 981 981 982 float probability = max(0.0f, tData.mProbability); 982 //float probability = max(0.0f, tData.mProbability); 983 float probability = tData.mProbability; 983 984 984 985 if (mUseAreaForPvs) … … 2983 2984 /// don't use epsilon here to get exact split planes 2984 2985 const int cf = 2985 mPolys[i]->ClassifyPlane(splitPlane, Limits::Small);2986 mPolys[i]->ClassifyPlane(splitPlane, epsilon); 2986 2987 2987 2988 switch (cf) -
GTP/trunk/Lib/Vis/Preprocessing/src/ViewCellsManager.h
r666 r676 481 481 bool mEvaluateViewCells; 482 482 483 bool mShowVisualization; 483 bool mShowVisualization; 484 484 }; 485 485 -
GTP/trunk/Lib/Vis/Preprocessing/src/VspBspTree.cpp
r675 r676 121 121 environment->GetBoolValue("VspBspTree.useBreathFirstSplits", mBreathFirstSplits); 122 122 123 environment->GetBoolValue("ViewCells.PostProcess.emptyViewCellsMergeAllowed", mEmptyViewCellsMergeAllowed); 124 123 125 char subdivisionStatsLog[100]; 124 126 environment->GetStringValue("VspBspTree.subdivisionStats", subdivisionStatsLog); … … 184 186 mSplitCandidates = new vector<SortableEntry>; 185 187 188 Debug << "here3" << endl; 186 189 Debug << endl; 187 190 } … … 1011 1014 splitPlane, 1012 1015 mBox, 1013 0.000000 1f);1016 0.000000001f); 1014 1017 //mEpsilon); 1015 1018 … … 1023 1026 frontData.mProbability = frontData.mGeometry->GetVolume(); 1024 1027 backData.mProbability = tData.mProbability - frontData.mProbability; 1028 1029 if (frontData.mProbability < -0.00001) 1030 Debug << "here2 error: " << frontData.mProbability << endl; 1031 if (backData.mProbability < -0.00001) 1032 Debug << "here2 error: " << backData.mProbability << endl; 1033 1025 1034 // clamp because of precision issues 1026 if (frontData.mProbability < 0) frontData.mProbability = 0; 1027 if (backData.mProbability < 0) backData.mProbability = 0; 1035 if (0) 1036 { 1037 if (frontData.mProbability < 0) frontData.mProbability = 0; 1038 if (backData.mProbability < 0) backData.mProbability = 0; 1039 } 1028 1040 } 1029 1041 } … … 1692 1704 candidatePlane, 1693 1705 mBox, 1694 0.000000 1f);1706 0.000000001f); 1695 1707 //mEpsilon); 1696 1708 … … 1700 1712 pBack = pOverall - pFront; 1701 1713 1714 if ((pFront < 0.001) || (pBack < 0.001)) 1715 { 1716 Debug << "vol f " << pFront << " b " << pBack << " p " << pOverall << endl; 1717 Debug << "real vol f " << pFront << " b " << geomBack.GetVolume() << " p " << pOverall << endl; 1718 Debug << "polys f" << (int)geomFront.mPolys.size() << " b " << (int)geomFront.mPolys.size() << " data " << (int)data.mGeometry->mPolys.size() << endl; 1719 } 1720 1702 1721 // clamp because of possible precision issues 1703 if (pFront < 0) pFront = 0; 1704 if (pBack < 0) pBack = 0; 1722 if (0) 1723 { 1724 if (pFront < 0) pFront = 0; 1725 if (pBack < 0) pBack = 0; 1726 } 1705 1727 } 1706 1728 else … … 1785 1807 candidatePlane, 1786 1808 mBox, 1787 1788 mEpsilon);1809 0.0000001f); 1810 //mEpsilon); 1789 1811 1790 1812 pOverall = data.mProbability; … … 1796 1818 1797 1819 // clamp because of possible precision issues 1798 if (pFront < 0) pFront = 0; 1799 if (pBack < 0) pBack = 0; 1820 if (1) 1821 { 1822 if (pFront <= 0) 1823 { 1824 //Debug << "error f: " << pFront << endl; 1825 return 999; 1826 } 1827 1828 if (pBack <= 0) 1829 { 1830 //Debug << "error b: " << pBack << endl; 1831 return 999; 1832 } 1833 } 1800 1834 } 1801 1835 else … … 3335 3369 { 3336 3370 MergeCandidate mc(leaf->GetViewCell(), (*nit)->GetViewCell()); 3337 candidates.push_back(mc); 3371 3372 // dont't merge view cells if they are empty and not front and back leaf of the same parent 3373 // in the tree? 3374 if (mEmptyViewCellsMergeAllowed || 3375 (!leaf->GetViewCell()->GetPvs().Empty() && ! (*nit)->GetViewCell()->GetPvs().Empty()) || 3376 leaf->IsSibling(*nit)) 3377 { 3378 candidates.push_back(mc); 3379 } 3338 3380 3339 3381 ++ numCandidates; -
GTP/trunk/Lib/Vis/Preprocessing/src/VspBspTree.h
r670 r676 798 798 bool mBreathFirstSplits; 799 799 800 bool mEmptyViewCellsMergeAllowed; 801 800 802 private: 801 803
Note: See TracChangeset
for help on using the changeset viewer.