- Timestamp:
- 03/07/06 17:35:50 (19 years ago)
- Location:
- GTP/trunk
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
GTP/trunk/App/Demos/Vis/HillyTerrain/OGRE/TerrainFrameListener.cpp
r673 r679 58 58 { 59 59 "robot", 60 //"athene",61 "natFX_Tree1_LOD2",60 "athene", 61 //"natFX_Tree1_LOD2", 62 62 //"tree2", 63 63 //"HongKong_Tower", -
GTP/trunk/App/Demos/Vis/HillyTerrain/OGRE/TestCullingTerrainApplication.cpp
r657 r679 306 306 // the objects are generated randomly distributed over the terrain 307 307 generateScene(1000, 0); // create soldiers, trees, ninjas 308 generateScene(500, 1); 309 generateScene(100, 2); 308 if (0) 309 generateScene(500, 1); 310 generateScene(500, 2); 310 311 } 311 312 } -
GTP/trunk/Lib/Vis/Preprocessing/src/Environment.cpp
r676 r679 1279 1279 "false"); 1280 1280 1281 RegisterOption("ViewCells.PostProcess.emptyViewCellsMerge Allowed",1281 RegisterOption("ViewCells.PostProcess.emptyViewCellsMerge", 1282 1282 optBool, 1283 "view_cells_ post_process_empty_view_cells_merge_allowed="1283 "view_cells_merge_empty=", 1284 1284 "false"); 1285 1285 -
GTP/trunk/Lib/Vis/Preprocessing/src/ViewCellBsp.cpp
r678 r679 2989 2989 } 2990 2990 2991 //Debug << "center: " << center << " new " << center / (float)n << endl; 2992 2991 2993 return center / (float)n; 2992 2994 } … … 3013 3015 3014 3016 3015 voidBspNodeGeometry::SplitGeometry(BspNodeGeometry &front,3017 bool BspNodeGeometry::SplitGeometry(BspNodeGeometry &front, 3016 3018 BspNodeGeometry &back, 3017 3019 const Plane3 &splitPlane, … … 3026 3028 3027 3029 //-- new polygon splits all other polygons 3028 for (int i = 0; i < (int)mPolys.size() ; ++ i)3030 for (int i = 0; i < (int)mPolys.size()/* && planePoly*/; ++ i) 3029 3031 { 3030 3032 /// don't use epsilon here to get exact split planes … … 3054 3056 else 3055 3057 { 3058 Debug << "no f! " << endl; 3056 3059 DEL_PTR(frontPoly); 3057 3060 } 3061 3058 3062 if (backPoly->Valid(epsilon)) 3059 3063 { … … 3062 3066 else 3063 3067 { 3068 Debug << "no b! " << endl; 3064 3069 DEL_PTR(backPoly); 3065 3070 } … … 3079 3084 3080 3085 back.Add(new Polygon3(mPolys[i]->mVertices), mPlanes[i]); 3081 //front. mPolys.push_back(CreateReversePolygon(mPolys[i]));3086 //front.Add(CreateReversePolygon(mPolys[i]), mPlanes[i]); 3082 3087 break; 3083 3088 default: … … 3098 3103 front.Add(planePoly->CreateReversePolygon(), reversePlane); 3099 3104 //front.mPolys.push_back(planePoly->CreateReversePolygon()); 3100 } 3105 Debug << "plane poly!" << endl; 3106 } 3107 else 3108 Debug << "no plane poly!" << endl; 3109 3110 return planePoly != NULL; 3101 3111 } 3102 3112 … … 3160 3170 3161 3171 3162 ViewCell * 3163 BspTree::GetViewCell(const Vector3 &point) 3172 ViewCell *BspTree::GetViewCell(const Vector3 &point) 3164 3173 { 3165 3174 if (mRoot == NULL) -
GTP/trunk/Lib/Vis/Preprocessing/src/ViewCellBsp.h
r678 r679 46 46 /** Computes new front and back geometry based on the old cell 47 47 geometry and a new split plane 48 */ 49 void SplitGeometry(BspNodeGeometry &front, 48 @returns true if the geometry is actually split by this plane 49 */ 50 bool SplitGeometry(BspNodeGeometry &front, 50 51 BspNodeGeometry &back, 51 52 const Plane3 &splitPlane, -
GTP/trunk/Lib/Vis/Preprocessing/src/VspBspTree.cpp
r678 r679 121 121 environment->GetBoolValue("VspBspTree.useBreathFirstSplits", mBreathFirstSplits); 122 122 123 environment->GetBoolValue("ViewCells.PostProcess.emptyViewCellsMerge Allowed", mEmptyViewCellsMergeAllowed);123 environment->GetBoolValue("ViewCells.PostProcess.emptyViewCellsMerge", mEmptyViewCellsMergeAllowed); 124 124 125 125 char subdivisionStatsLog[100]; … … 1013 1013 splitPlane, 1014 1014 mBox, 1015 0.000000001f);1016 //mEpsilon);1015 //0.0f); 1016 mEpsilon); 1017 1017 1018 1018 if (mUseAreaForPvs) … … 1027 1027 1028 1028 if (frontData.mProbability < -0.00001) 1029 Debug << "here2 error : " << frontData.mProbability << endl;1029 Debug << "here2 error f: " << frontData.mProbability << endl; 1030 1030 if (backData.mProbability < -0.00001) 1031 Debug << "here2 error : " << backData.mProbability << endl;1031 Debug << "here2 error b: " << backData.mProbability << endl; 1032 1032 1033 1033 // clamp because of precision issues … … 1388 1388 1389 1389 // allows faster split because we have axis aligned kd tree boxes 1390 if ( useKdSplit)1390 if (0 && useKdSplit) 1391 1391 { 1392 1392 nCostRatio[axis] = EvalAxisAlignedSplitCost(tData, … … 1575 1575 1576 1576 1577 if (lowestCost > 10)1578 Debug << "warning!! lowest cost: " << lowestCost << endl;1579 1580 //#ifdef _DEBUG1577 // if (lowestCost > 10) 1578 // Debug << "warning!! lowest cost: " << lowestCost << endl; 1579 1580 #ifdef _DEBUG 1581 1581 Debug << "plane lowest cost: " << lowestCost << endl; 1582 //#endif1582 #endif 1583 1583 1584 1584 if (lowestCost > mTermMaxCostRatio) … … 1711 1711 candidatePlane, 1712 1712 mBox, 1713 0.000000001f);1714 //mEpsilon);1713 //0.0f); 1714 mEpsilon); 1715 1715 1716 1716 if (!mUseAreaForPvs) // use front and back cell areas to approximate volume … … 1719 1719 pBack = pOverall - pFront; 1720 1720 1721 if ((pFront < 0.0 01) || (pBack < 0.001))1721 if ((pFront < 0.0) || (pBack < 0.0)) 1722 1722 { 1723 1723 Debug << "vol f " << pFront << " b " << pBack << " p " << pOverall << endl; … … 1810 1810 1811 1811 // construct child geometry with regard to the candidate split plane 1812 data.mGeometry->SplitGeometry(geomFront,1813 geomBack,1814 candidatePlane,1815 mBox,1816 0.000000001f);1817 //mEpsilon);1812 bool splitSuccessFull = data.mGeometry->SplitGeometry(geomFront, 1813 geomBack, 1814 candidatePlane, 1815 mBox, 1816 //0.0f); 1817 mEpsilon); 1818 1818 1819 1819 pOverall = data.mProbability; … … 1827 1827 if (1) 1828 1828 { 1829 if ( (pFront <= 0) || (pBack <= 0) ||1829 if (!splitSuccessFull || (pFront <= 0) || (pBack <= 0) || 1830 1830 !geomFront.Valid() || !geomBack.Valid()) 1831 1831 {
Note: See TracChangeset
for help on using the changeset viewer.