Changeset 944 for GTP/trunk/Lib/Vis/Preprocessing
- Timestamp:
- 05/10/06 18:33:35 (19 years ago)
- Location:
- GTP/trunk/Lib/Vis/Preprocessing
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
GTP/trunk/Lib/Vis/Preprocessing/scripts/generate_viewcells
r942 r944 42 42 -view_cells_evaluation_samples_per_pass=1000000 \ 43 43 -vsp_bsp_node_queue_type=2 \ 44 -view_cells_filename=$LOG_PREFIX /vienna-visibility.xml44 -view_cells_filename=$LOG_PREFIX-visibility.xml 45 45 46 46 mv debug.log $LOG_PREFIX-$METHOD-debug.log -
GTP/trunk/Lib/Vis/Preprocessing/scripts/generate_viewcells.env
r942 r944 259 259 # filename ../data/vienna/viewcells-large-sel.x3d 260 260 # filename ../scripts/viewcells_vienna.xml 261 filename D:/svn/gametools/GTP/trunk/Lib/Vis/Preprocessing/scripts/vienna _visibility.xml261 filename D:/svn/gametools/GTP/trunk/Lib/Vis/Preprocessing/scripts/vienna-visibility.xml 262 262 } 263 263 -
GTP/trunk/Lib/Vis/Preprocessing/src/Preprocessor.cpp
r938 r944 356 356 { 357 357 environment->GetStringValue("ViewCells.filename", buf); 358 mViewCellsManager = ViewCellsManager::LoadViewCells(buf, &mObjects, environment );358 mViewCellsManager = ViewCellsManager::LoadViewCells(buf, &mObjects, environment, true); 359 359 } 360 360 else -
GTP/trunk/Lib/Vis/Preprocessing/src/ViewCellsManager.cpp
r938 r944 1861 1861 1862 1862 1863 bool ViewCellsManager::ExportViewCells(const string filename, const bool exportPvs, const ObjectContainer &objects) 1863 bool ViewCellsManager::ExportViewCells(const string filename, 1864 const bool exportPvs, 1865 const ObjectContainer &objects) 1864 1866 { 1865 1867 return false; … … 1880 1882 // active view cells 1881 1883 ViewCellContainer::const_iterator it, it_end = mViewCells.end(); 1884 1882 1885 for (it = mViewCells.begin(); it != it_end; ++ it) 1883 1886 { … … 4727 4730 ObjectContainer *objects, 4728 4731 Environment *env, 4732 const bool finalizeViewCells, 4729 4733 BoundingBoxConverter *bconverter) 4734 4730 4735 { 4731 4736 ViewCellsParser parser; … … 4733 4738 ViewCellsManager *vm = NULL; 4734 4739 4735 Debug << "here23 filename: " << filename << endl;4736 //BoundingBoxConverter bconverter;4737 4738 4740 if (parser.ParseFile(filename, &vm, objects, bconverter, env)) 4739 {Debug << "here25 filename: " << filename << endl; 4741 { 4742 long startTime = GetTime(); 4743 4740 4744 //vm->PrepareLoadedViewCells(); 4741 4745 vm->ResetViewCells(); … … 4745 4749 4746 4750 // create the meshes and compute volumes 4747 vm->FinalizeViewCells(true); 4748 4749 vm->mViewCellsTree->AssignRandomColors(); 4750 Debug << (int)vm->mViewCells.size() << " view cells loaded" << endl; 4751 if (finalizeViewCells) 4752 { 4753 vm->FinalizeViewCells(true); 4754 vm->mViewCellsTree->AssignRandomColors(); 4755 } 4756 4757 Debug << (int)vm->mViewCells.size() << " view cells loaded in " 4758 << TimeDiff(startTime, GetTime()) * 1e-3 << " secs" << endl; 4751 4759 } 4752 4760 else … … 4785 4793 4786 4794 //-- export the view cells and the pvs 4787 stream << "<ViewCells>" << endl; 4795 const int numViewCells = mCurrentViewCellsStats.viewCells; 4796 4797 stream << "<ViewCells number=\"" << numViewCells << "\" />" << endl; 4788 4798 4789 4799 mViewCellsTree->Export(stream, exportPvs); -
GTP/trunk/Lib/Vis/Preprocessing/src/ViewCellsManager.h
r938 r944 432 432 ObjectContainer *objects, 433 433 Environment *env, 434 const bool finalizeViewCells, 434 435 BoundingBoxConverter *bconverter = NULL); 435 436 -
GTP/trunk/Lib/Vis/Preprocessing/src/ViewCellsParser.cpp
r938 r944 126 126 // go one up in the tree 127 127 if (mCurrentBspNode->GetParent()) 128 { Debug<< "]";128 { cout << "]"; 129 129 mCurrentBspNode = mCurrentBspNode->GetParent(); 130 130 } … … 136 136 // go one up in the tree 137 137 if (mCurrentViewCell->GetParent()) 138 { Debug<< "]";138 { cout << "]"; 139 139 mCurrentViewCell = mCurrentViewCell->GetParent(); 140 140 } … … 159 159 // all bounding boxes gathered in this step => 160 160 // associate object ids with bounding boxes 161 long startTime = GetTime(); 162 161 163 if (mBoundingBoxConverter) 162 164 mBoundingBoxConverter->IdentifyObjects(mIBoundingBoxes, *mObjects); 165 166 Debug << "\nconverted bounding boxes to objects in" 167 << TimeDiff(startTime, GetTime()) * 1e-3 << " secs" << endl; 163 168 } 164 169 … … 190 195 if (element == "Interior") 191 196 { 192 Debug<< "[";197 cout << "["; 193 198 StartBspInterior(attributes); 194 199 } … … 196 201 if (element == "Leaf") 197 202 { 198 Debug << "l"; 199 Debug << "leaf" << endl; 203 cout << "l"; 200 204 StartBspLeaf(attributes); 201 205 } … … 212 216 if (element == "ViewCells") 213 217 { 214 Debug<< "parsing view cells" << endl;218 cout << "parsing view cells" << endl; 215 219 mParseViewCells = true; 216 220 } … … 218 222 if (element == "Hierarchy") 219 223 { 220 Debug<< "parsing spatial hierarchy" << endl;224 cout << "parsing spatial hierarchy" << endl; 221 225 mParseViewCells = false; 222 226 StartHierarchy(attributes); … … 226 230 if (element == "ViewSpaceBox") 227 231 { 228 Debug<< "v";232 cout << "v"; 229 233 StartViewSpaceBox(attributes); 230 234 } … … 233 237 if (element == "BoundingBox") 234 238 { 235 Debug<< "b";239 cout << "b"; 236 240 StartBoundingBox(attributes); 237 241 } … … 259 263 if (element == "Interior") 260 264 { 261 Debug<< "[";265 cout << "["; 262 266 StartViewCellInterior(attributes); 263 267 } … … 265 269 if (element == "Leaf") 266 270 { 267 Debug<< "l";271 cout << "l"; 268 272 StartViewCellLeaf(attributes); 269 273 } … … 399 403 mViewSpaceBox = AxisAlignedBox3(bmin, bmax); 400 404 401 Debug << " view space box: " << mViewSpaceBox << endl;405 Debug << "\nview space box: " << mViewSpaceBox << endl; 402 406 } 403 407 … … 437 441 mIBoundingBoxes.push_back(IndexedBoundingBox(id, box)); 438 442 439 Debug << "view space box: " << mViewSpaceBox << endl;443 //Debug << "bbox: " << box << endl; 440 444 } 441 445 … … 624 628 625 629 mVspBspTree->mBox = mViewSpaceBox; 626 Debug << "creating vsp bsp view cells manager" << endl;627 630 } 628 631 else if (strcmp(name, "vspKdTree") == 0) 629 632 { 630 633 // TODO 634 Debug << "view cell type: VspKd" << endl; 631 635 mVspKdTree = new VspKdTree(); 632 636 mViewCellsManager = new VspKdViewCellsManager(mVspKdTree, mEnvironment);
Note: See TracChangeset
for help on using the changeset viewer.