- Timestamp:
- 03/08/06 18:35:34 (19 years ago)
- Location:
- GTP/trunk/Lib/Vis/Preprocessing/src
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
GTP/trunk/Lib/Vis/Preprocessing/src/Environment.cpp
r679 r682 1573 1573 "rays.out"); 1574 1574 1575 RegisterOption("Preprocessor.useGlRenderer",1576 optBool,1577 "useGlRenderer",1578 "false");1579 1580 1575 RegisterOption("Preprocessor.loadPolygonsAsMeshes", 1581 1576 optBool, … … 1588 1583 "10000"); 1589 1584 1585 1586 RegisterOption("Preprocessor.useGlRenderer", 1587 optBool, 1588 "preprocessor_use_gl_renderer=", 1589 "false"); 1590 1590 1591 RegisterOption("Preprocessor.useGlDebugger", 1591 1592 optBool, 1592 " useGlDebugger",1593 "preprocessor_use_gl_debugger=", 1593 1594 "false"); 1594 1595 1595 1596 RegisterOption("Preprocessor.detectEmptyViewSpace", 1596 1597 optBool, 1597 " detectEmptyViewSpace",1598 "preprocessor_detect_empty_viewspace=", 1598 1599 "false"); 1599 1600 1600 1601 RegisterOption("Preprocessor.quitOnFinish", 1601 1602 optBool, 1602 " quitOnFinish",1603 "preprocessor_quit_on_finish=", 1603 1604 "true"); 1605 1606 1604 1607 1605 1608 /**************************************************************************************/ -
GTP/trunk/Lib/Vis/Preprocessing/src/ViewCellBsp.cpp
r681 r682 3023 3023 // get cross section of new polygon 3024 3024 Polygon3 *planePoly = box.CrossSection(splitPlane); 3025 3025 //Vector3 ndummy = planePoly->GetSupportingPlane().mNormal; 3026 3026 // split polygon with all other polygons 3027 3027 planePoly = SplitPolygon(planePoly, epsilon); 3028 3028 3029 bool splitsGeom = (planePoly != NULL) 3030 3029 bool splitsGeom = (planePoly != NULL); 3031 3030 3032 3031 //-- new polygon splits all other polygons … … 3099 3098 if (planePoly) 3100 3099 { 3100 // add polygon with reverse orientation to front cell 3101 Plane3 reversePlane(splitPlane); 3102 reversePlane.ReverseOrientation(); 3103 3104 //Debug << "poly normal : " << ndummy << " split plane normal " << splitPlane.mNormal << endl; 3101 3105 // add polygon with normal pointing into positive half space to back cell 3102 3106 back.Add(planePoly, splitPlane); 3103 3107 //back.mPolys.push_back(planePoly); 3104 3105 // add polygon with reverse orientation to front cell 3106 Plane3 reversePlane(splitPlane); 3107 reversePlane.ReverseOrientation(); 3108 front.Add(planePoly->CreateReversePolygon(), reversePlane); 3108 Polygon3 *reversePoly = planePoly->CreateReversePolygon(); 3109 front.Add(reversePoly, reversePlane); 3110 Debug << "poly normal : " << reversePoly->GetSupportingPlane().mNormal << " split plane normal " << reversePlane.mNormal << endl; 3109 3111 } 3110 3112 -
GTP/trunk/Lib/Vis/Preprocessing/src/ViewCellsManager.cpp
r681 r682 3483 3483 BspNodeGeometry back; 3484 3484 3485 3486 3485 BspLeaf *leaf = dynamic_cast<BspViewCell *>(*it)->mLeaf; 3487 3488 3486 mVspBspTree->ConstructGeometry(leaf, geom); 3489 3490 geom.SplitGeometry(front, 3491 back, 3492 *clipPlane, 3493 mViewSpaceBox, 3494 0.0001f); 3495 3496 if (back.Size() >= 3) 3497 exporter->ExportPolygons(back.GetPolys()); 3487 3488 const int cf = Polygon3::ClassifyPlane(geom.GetPolys(), *clipPlane, 0.0005); 3489 3490 if (cf == Polygon3::BACK_SIDE) 3491 { 3492 exporter->ExportPolygons(geom.GetPolys()); 3493 } 3494 else if (cf == Polygon3::SPLIT) 3495 { 3496 geom.SplitGeometry(front, 3497 back, 3498 *clipPlane, 3499 mViewSpaceBox, 3500 0.0001f); 3501 3502 if (back.Size() >= 3) 3503 exporter->ExportPolygons(back.GetPolys()); 3504 } 3498 3505 } 3499 3506 } -
GTP/trunk/Lib/Vis/Preprocessing/src/VspBspTree.cpp
r679 r682 154 154 Debug << "use random axis: " << mUseRandomAxis << endl; 155 155 Debug << "breath first splits: " << mBreathFirstSplits << endl; 156 156 Debug << "empty view cells merge: " << mEmptyViewCellsMergeAllowed << endl; 157 157 158 Debug << "octree: " << mSimulateOctree << endl; 158 159 … … 1825 1826 1826 1827 // clamp because of possible precision issues 1827 if (1) 1828 { 1829 if (!splitSuccessFull || (pFront <= 0) || (pBack <= 0) || 1830 !geomFront.Valid() || !geomBack.Valid()) 1831 { 1832 Debug << "error f: " << pFront << " b: " << pBack << endl; 1833 return 999; 1834 } 1828 if (0 && 1829 (!splitSuccessFull || (pFront <= 0) || (pBack <= 0) || 1830 !geomFront.Valid() || !geomBack.Valid())) 1831 { 1832 Debug << "error f: " << pFront << " b: " << pBack << endl; 1833 return 999; 1835 1834 } 1836 1835 } … … 3388 3387 // in the tree? 3389 3388 if (mEmptyViewCellsMergeAllowed || 3390 (!leaf->GetViewCell()->GetPvs().Empty() && ! (*nit)->GetViewCell()->GetPvs().Empty()) ||3389 !leaf->GetViewCell()->GetPvs().Empty() || !(*nit)->GetViewCell()->GetPvs().Empty() || 3391 3390 leaf->IsSibling(*nit)) 3392 3391 {
Note: See TracChangeset
for help on using the changeset viewer.