- Timestamp:
- 09/19/05 19:04:55 (19 years ago)
- Location:
- trunk/VUT/GtpVisibilityPreprocessor
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/VUT/GtpVisibilityPreprocessor/scripts/default.env
r289 r292 66 66 BspTree { 67 67 # splitPlaneStrategy leastSplits 68 #splitPlaneStrategy balancedTree68 splitPlaneStrategy balancedTree 69 69 # splitPlaneStrategy nextPolygon 70 splitPlaneStrategy combined70 # splitPlaneStrategy combined 71 71 # constructionMethod rays 72 72 constructionMethod viewCells -
trunk/VUT/GtpVisibilityPreprocessor/src/ViewCellBsp.cpp
r291 r292 603 603 604 604 //leaf->mViewCellIdx = counter; 605 Debug << "insert view cell "<< endl;605 Debug << "insert view cell " << tData.mViewCell << endl; 606 606 607 607 leaf->SetViewCell(dynamic_cast<ViewCell *>(tData.mViewCell)); … … 629 629 if ((backPolys->size() == 0) && (coincident.size() > 1)) 630 630 { 631 Debug << "WARNING: size " << coincident.size() << " at depth " << tData.mDepth << ", #back polys: " << (int)backPolys->size() << ", #front polys: " << (int)frontPolys->size() << endl;631 Debug << "WARNING: size " << (int)coincident.size() << " at depth " << tData.mDepth << ", #back polys: " << (int)backPolys->size() << ", #front polys: " << (int)frontPolys->size() << endl; 632 632 for (int i=0; i<coincident.size(); ++i) 633 Debug << "coincident " << i << " vc " << *coincident[i]->mParent<< endl;633 Debug << "coincident poly " << i << ", vc: " << coincident[i]->mParent << "\n" << *coincident[i] << endl; 634 634 } 635 635 //Debug << "coincident size: " << coincident.size() << endl; -
trunk/VUT/GtpVisibilityPreprocessor/src/X3dExporter.cpp
r289 r292 8 8 #include "ViewCell.h" 9 9 #include "Polygon3.h" 10 10 ViewCellContainer X3dExporter::foundViewCells; // TODO: delete later 11 11 12 12 X3dExporter::X3dExporter(const string filename):Exporter(filename) … … 395 395 SetFilled(); 396 396 397 ViewCellContainer mFoundViewCells;397 //ViewCellContainer foundViewCells; 398 398 399 399 if (tree.StorePolys()) … … 436 436 ViewCell *viewCell = dynamic_cast<BspLeaf *>(node)->GetViewCell(); 437 437 if (viewCell) 438 mFoundViewCells.push_back(viewCell);438 foundViewCells.push_back(viewCell); 439 439 } 440 440 else … … 447 447 } 448 448 449 Debug << "Number of view cells with dublicates: " << (int) mFoundViewCells.size() << endl;449 Debug << "Number of view cells with dublicates: " << (int)foundViewCells.size() << endl; 450 450 451 451 //-- erase dublicates 452 sort( mFoundViewCells.begin(), mFoundViewCells.end());453 ViewCellContainer::iterator new_end = unique( mFoundViewCells.begin(), mFoundViewCells.end());454 mFoundViewCells.erase(new_end, mFoundViewCells.end());455 ExportViewCells(& mFoundViewCells);456 457 Debug << "Number of view cells after erasing dublicates: " << (int) mFoundViewCells.size() << endl;452 sort(foundViewCells.begin(), foundViewCells.end()); 453 ViewCellContainer::iterator new_end = unique(foundViewCells.begin(), foundViewCells.end()); 454 foundViewCells.erase(new_end, foundViewCells.end()); 455 ExportViewCells(&foundViewCells); 456 457 Debug << "Number of view cells after erasing dublicates: " << (int)foundViewCells.size() << endl; 458 458 } 459 459 -
trunk/VUT/GtpVisibilityPreprocessor/src/X3dExporter.h
r263 r292 69 69 virtual void 70 70 ExportViewCells(ViewCellContainer *viewCells); 71 71 static ViewCellContainer foundViewCells; // todo: delete later 72 72 protected: 73 73 virtual void -
trunk/VUT/GtpVisibilityPreprocessor/src/main.cpp
r289 r292 8 8 #include "MeshKdTree.h" 9 9 #include "Exporter.h" 10 #include "X3dExporter.h" // delete later 10 11 11 12 #define USE_EXE_PATH false … … 46 47 p->GenerateViewCells(); 47 48 48 Exporter *exporter = Exporter::GetExporter("viewcells.x3d"); 49 if (exporter) 50 { 51 exporter->ExportViewCells(&p->mViewCells); // export view cells 52 delete exporter; 53 } 54 Debug << "Viewcells loaded / generated. Number of view cells: " << p->mViewCells.size() << endl; 49 Debug << "Viewcells loaded / generated. Number of view cells: " << p->mViewCells.size() << endl; 55 50 } 56 51 … … 58 53 p->BspTreeStatistics(Debug); 59 54 p->Export("vc_bsptree.x3d", false, false, true); 55 56 57 // export the complementary view cells, i.e., the view cells not in the tree. 58 Exporter *exporter = Exporter::GetExporter("viewcells_compl.x3d"); 59 60 ViewCellContainer::iterator vc_compl_it; 61 ViewCellContainer vc_compl(p->mViewCells.size() + X3dExporter::foundViewCells.size()); 62 63 Debug << "here1" << endl; 64 sort(p->mViewCells.begin(), p->mViewCells.end()); 65 Debug << "here2.5 " << X3dExporter::foundViewCells.size() << endl; 66 67 vc_compl_it = set_difference(p->mViewCells.begin(), p->mViewCells.end(), 68 X3dExporter::foundViewCells.begin(), X3dExporter::foundViewCells.end(), 69 vc_compl.begin()); 70 71 Debug << "here2" << endl; 72 73 vc_compl.erase(vc_compl_it, vc_compl.end()); 74 75 Debug << "Complementary view cells: " << vc_compl.size() << endl; 76 77 if (exporter) 78 { 79 exporter->ExportViewCells(&vc_compl); // export view cells 80 delete exporter; 81 }Debug << "here4" << endl; 60 82 61 83 #endif
Note: See TracChangeset
for help on using the changeset viewer.