Changeset 1408 for GTP/trunk/Lib/Vis/Preprocessing
- Timestamp:
- 09/18/06 03:15:56 (18 years ago)
- Location:
- GTP/trunk/Lib/Vis/Preprocessing/src
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
GTP/trunk/Lib/Vis/Preprocessing/src/BvHierarchy.cpp
r1405 r1408 512 512 // matt: TODO 513 513 return ( 0 514 || ((int)data.mNode->mObjects.size() < mTermMinObjects)514 || ((int)data.mNode->mObjects.size() <= mTermMinObjects) 515 515 || (data.mProbability <= mTermMinProbability) 516 516 || (data.mDepth >= mTermMaxDepth) … … 570 570 { 571 571 ++ mBvhStats.minObjectsNodes; 572 } 573 574 if (leaf->mObjects.empty()) 575 { 576 ++ mBvhStats.emptyNodes; 572 577 } 573 578 … … 1808 1813 1809 1814 app << "#N_MINOBJECTREFS ( Min number of object refs / leaf )\n" << minObjectRefs << "\n"; 1815 1816 app << "#N_EMPTYLEAFS ( Empty leafs )\n" << emptyNodes << "\n"; 1810 1817 1811 1818 app << "#N_PAVGOBJECTSLEAVES ( average object refs / leaf)\n" << AvgObjectRefs() << endl; -
GTP/trunk/Lib/Vis/Preprocessing/src/BvHierarchy.h
r1405 r1408 80 80 minObjectRefs = 999999999; 81 81 objectRefs = 0; 82 emptyNodes = 0; 82 83 83 84 /////////////////// … … 118 119 /// object references 119 120 int objectRefs; 120 121 // leaves with no objects 122 int emptyNodes; 121 123 122 124 ////////////////////////// -
GTP/trunk/Lib/Vis/Preprocessing/src/main.cpp
r1404 r1408 176 176 } 177 177 178 //-- build kd tree from scene geometry 179 preprocessor->BuildKdTree(); 180 preprocessor->KdTreeStatistics(cout); 178 bool loadKdTree, exportKdTree; 179 180 Environment::GetSingleton()->GetBoolValue("Preprocessor.loadKdTree", loadKdTree); 181 182 if (!loadKdTree) 183 { 184 //-- build kd tree from scene geometry 185 preprocessor->BuildKdTree(); 186 preprocessor->KdTreeStatistics(cout); 187 } 188 else 189 { 190 cout << "loading kd tree ... "; 191 const long startTime = GetTime(); 192 preprocessor->mKdTree->LoadBinTree("kd.bin.gz", preprocessor->mObjects); 193 194 cout << "finished in " << TimeDiff(startTime, GetTime()) * 1e-3 << " secs" << endl; 195 } 196 197 Environment::GetSingleton()->GetBoolValue("Preprocessor.exportKdTree", exportKdTree); 198 199 if (exportKdTree) 200 { 201 cout << "exporting kd tree ... "; 202 preprocessor->mKdTree->ExportBinTree("kd.bin.gz"); 203 cout << "finished" << endl; 204 } 205 181 206 182 207 // parse view cells related options
Note: See TracChangeset
for help on using the changeset viewer.