Changeset 676 for GTP/trunk/Lib/Vis/Preprocessing/src/VspBspTree.cpp
- Timestamp:
- 03/06/06 19:02:49 (19 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
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;
Note: See TracChangeset
for help on using the changeset viewer.