- Timestamp:
- 02/15/06 18:03:34 (19 years ago)
- Location:
- GTP/trunk/Lib/Vis
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
GTP/trunk/Lib/Vis/OnlineCullingCHC/OGRE/src/OgreOcclusionQueriesQueryManager.cpp
r370 r645 225 225 } 226 226 } 227 //------ j-----------------------------------------------------------------227 //------------------------------------------------------------------------ 228 228 void OcclusionQueriesQueryManager::CollectNodeVisibility( 229 229 GtpVisibility::QueryList::iterator &visQueryIt, -
GTP/trunk/Lib/Vis/Preprocessing/scripts/default.env
r644 r645 289 289 Construction { 290 290 samples 500000 291 epsilon 0.00 5291 epsilon 0.00005 292 292 randomize false 293 293 renderCostWeight 1.0 … … 331 331 missTolerance 6 332 332 333 maxViewCells 10000333 maxViewCells 50000 334 334 335 335 # used for pvs criterium … … 354 354 BspTree { 355 355 Construction { 356 samples 50000 0356 samples 50000 357 357 epsilon 0.005 358 358 } … … 420 420 minProbability 0.001 421 421 maxRayContribution 9999 422 maxViewCells 2048422 maxViewCells 1000 423 423 424 424 # used for pvs criterium -
GTP/trunk/Lib/Vis/Preprocessing/src/Polygon3.cpp
r574 r645 224 224 225 225 //TODO: remove for performance 226 #if 0226 #if 1 227 227 if (1) 228 228 { … … 234 234 } 235 235 } 236 else 236 237 if (1) 237 238 { 238 239 Vector3 vtx = mVertices.back(); … … 241 242 for (it = mVertices.begin(); it != it_end; ++it) 242 243 { 243 if ( !(EpsilonEqualV3(vtx, *it)))244 if (EpsilonEqualV3(vtx, *it, 0.0001)) 244 245 { 245 246 //Debug << "Malformed vertices:\n" << *this << endl; -
GTP/trunk/Lib/Vis/Preprocessing/src/ViewCellBsp.cpp
r644 r645 963 963 new BoundedRayContainer(), 0, 0, new BspNodeGeometry()); 964 964 965 int pvsData = tData.mPvs;966 float cData = (float)tData.mPvs * tData.mProbability;967 965 968 966 // create new interior node and two leaf nodes … … 973 971 if (1) 974 972 { 973 int pvsData = tData.mPvs; 974 float cData = (float)pvsData * tData.mProbability; 975 975 976 float cFront = (float)tFrontData.mPvs * tFrontData.mProbability; 976 977 float cBack = (float)tBackData.mPvs * tBackData.mProbability; 977 978 978 float costDecr = 979 (cFront + cBack - cData) / mBox.GetVolume(); 979 Debug << "front pvs: " << tFrontData.mPvs << " p: " << tFrontData.mProbability << endl; 980 Debug << "back pvs: " << tBackData.mPvs << " p: " << tBackData.mProbability << endl; 981 Debug << "pvs: " << pvsData << " p: " << tData.mProbability << endl; 982 983 Debug << "data: " << cData << " front: " << cFront << " back: " << cBack << endl; 984 Debug << "cost ratio: " << (cFront + cBack) / cData << endl; 985 986 if ((cFront + cBack) / cData > 1) 987 Debug << "ERROR!!" << endl; 988 989 float costDecr = (cFront + cBack - cData) / mBox.GetVolume(); 980 990 981 991 … … 1017 1027 } 1018 1028 1029 1019 1030 void BspTree::ExtractViewCells(BspTraversalData &frontData, 1020 1031 BspTraversalData &backData, … … 1044 1055 } 1045 1056 } 1057 1046 1058 1047 1059 BspInterior *BspTree::SubdivideNode(BspTraversalData &tData, … … 1091 1103 interior->mPlane, 1092 1104 mBox, 1093 mEpsilon); 1105 0.000000000001); 1106 //mEpsilon); 1094 1107 1095 1108 … … 1103 1116 frontData.mProbability = frontData.mGeometry->GetVolume(); 1104 1117 backData.mProbability = tData.mProbability - frontData.mProbability; 1118 1119 Debug << "************" << endl; 1120 Debug << "plane: " << interior->mPlane << endl; 1121 Debug << "box: " << mBox << endl; 1122 Debug << "all: " << tData.mProbability << " f: " << frontData.mProbability << " b: " << backData.mProbability << endl; 1123 Debug << "real back: " << backData.mGeometry->GetVolume() << endl; 1124 Debug << "data geom: " << tData.mGeometry->mPolys.size() << " f: " << frontData.mGeometry->mPolys.size() << " b: " << backData.mGeometry->mPolys.size() << endl; 1105 1125 } 1106 1126 } … … 1443 1463 const float candidateCost = 1444 1464 SplitPlaneCost(poly->GetSupportingPlane(), data); 1465 1466 Debug << "supporting plane: " << poly->GetSupportingPlane() << endl; 1445 1467 1446 1468 if (candidateCost < lowestCost) … … 1982 2004 if (!leaf->mViewCell->Mailed()) 1983 2005 { 1984 //ray.bspIntersections.push_back(Ray::BspIntersection(maxt, leaf));2006 //ray.bspIntersections.push_back(Ray::BspIntersection(maxt, leaf)); 1985 2007 leaf->mViewCell->Mail(); 1986 2008 ++ hits; … … 2061 2083 else // ray and plane are coincident 2062 2084 { 2063 // WHAT TO DO IN THIS CASE ? 2064 //break; 2065 node = in->GetFront(); 2066 continue; 2085 // NOTE: what to do if ray is coincident with plane? 2086 if (extSide < 0) 2087 node = in->GetBack(); 2088 else 2089 node = in->GetFront(); 2090 2091 continue; // no far child 2067 2092 } 2068 2093
Note: See TracChangeset
for help on using the changeset viewer.