- Timestamp:
- 08/23/06 09:30:35 (18 years ago)
- Location:
- GTP/trunk/Lib/Vis/Preprocessing/src
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
GTP/trunk/Lib/Vis/Preprocessing/src/ViewCell.h
r1201 r1263 388 388 { 389 389 friend class ViewCellsManager; 390 390 friend class ViewCellsParseHandlers; 391 391 392 392 public: -
GTP/trunk/Lib/Vis/Preprocessing/src/ViewCellsManager.cpp
r1262 r1263 749 749 750 750 751 // the type of hierarchy: this must be known before to build 752 // the view cells manager 753 stream << "<ViewSpaceHierarchyType name=\"vspBspTree\" />" << endl; 751 // the type of hierarchy: this must be known before to build the view cells manager 752 //stream << "<ViewSpaceHierarchyType name=\"vspBspTree\" />" << endl; 754 753 755 754 //-- export the view cells and the pvs -
GTP/trunk/Lib/Vis/Preprocessing/src/ViewCellsParser.cpp
r1262 r1263 33 33 #include "VspTree.h" 34 34 #include "KdTree.h" 35 35 #include "BvHierarchy.h" 36 36 37 37 … … 84 84 , mBspTree(NULL) 85 85 , mViewCellsTree(NULL) 86 , mCurrent Task(PARSE_OPTIONS)86 , mCurrentState(PARSE_OPTIONS) 87 87 , mCurrentViewCell(NULL) 88 88 , mCurrentBspNode(NULL) … … 118 118 119 119 // inside the view cell description 120 if (mCurrent Task== PARSE_VIEWCELLS)120 if (mCurrentState == PARSE_VIEWCELLS) 121 121 { 122 122 if (element == "Interior") … … 173 173 174 174 // not parsing view cells anymore 175 mCurrent Task= PARSE_OPTIONS;175 mCurrentState = PARSE_OPTIONS; 176 176 } 177 177 … … 206 206 207 207 // the view cells manager is created here 208 CreateViewCellsManager(ptr);208 //CreateViewCellsManager(ptr); 209 209 } 210 210 } … … 331 331 { 332 332 cout << "parsing view cells" << endl; 333 mCurrent Task= PARSE_VIEWCELLS;333 mCurrentState = PARSE_VIEWCELLS; 334 334 } 335 335 … … 346 346 //StartViewSpaceHierarchy(attributes); 347 347 cout << "parsing view space partition" << endl; 348 mCurrent Task= PARSE_VSP;348 mCurrentState = PARSE_VSP; 349 349 } 350 350 … … 354 354 //StartObjectSpaceHierarchy(attributes); 355 355 cout << "parsing object space partition" << endl; 356 mCurrent Task= PARSE_OSP;356 mCurrentState = PARSE_OSP; 357 357 } 358 358 … … 372 372 373 373 // parse view space partition 374 switch (mCurrent Task)374 switch (mCurrentState) 375 375 { 376 376 case PARSE_VSP: … … 713 713 714 714 715 void ViewCellsParseHandlers::CreateViewCellsManager( const char *name)716 { 717 if (strcmp(name, "bspTree") == 0)715 void ViewCellsParseHandlers::CreateViewCellsManager(/*const char *name*/) 716 { 717 /*if (strcmp(name, "bsp") == 0) 718 718 { 719 719 Debug << "view cell type: Bsp" << endl; … … 723 723 724 724 mViewCellsManager = new BspViewCellsManager(mBspTree); 725 } 726 else if (strcmp(name, "vspBspTree") == 0) //725 }*/ 726 if (mViewSpaceHierarchyType == BSP) // 727 727 { 728 728 Debug << "view cell type: VspBsp" << endl; … … 732 732 733 733 mVspBspTree->mBox = mViewSpaceBox; 734 } 735 else if (strcmp(name, "vspOspTree") == 0) 736 { 737 Debug << "view cell type: VspOsp" << endl; 734 mVspBspTree->mRoot = mBspRoot; 735 } 736 else if (mViewSpaceHierarchyType == VSP) 737 { 738 Debug << "view cell type: Vsp" << endl; 738 739 739 740 mVspTree = new VspTree(); 740 mOspTree = new OspTree(); 741 742 if (mObjectSpaceHierarchyType == OSP) 743 mOspTree = new OspTree(); 744 else 745 mBvHierarchy = new BvHierarchy(); 741 746 742 747 // hack … … 747 752 748 753 mViewCellsTree = mViewCellsManager->GetViewCellsTree(); 754 mViewCellsTree->mRoot = mViewCellRoot; 755 749 756 mViewCellsManager->SetViewSpaceBox(mViewSpaceBox); 750 757 } -
GTP/trunk/Lib/Vis/Preprocessing/src/ViewCellsParserXerces.h
r1233 r1263 24 24 class OspTree; 25 25 class VspNode; 26 26 class BvHierarchy; 27 27 28 28 class ViewCellsParseHandlers: public HandlerBase … … 69 69 void resetDocument(); 70 70 71 void CreateViewCellsManager( const char *name);71 void CreateViewCellsManager(/*const char *name*/); 72 72 73 73 … … 75 75 VspTree *mVspTree; 76 76 OspTree *mOspTree; 77 BvHierarchy *mBvHierarchy; 77 78 78 79 BspTree *mBspTree; … … 83 84 ViewCell *mCurrentViewCell; 84 85 KdNode *mCurrentKdNode; 86 87 BspNode *mBspRoot; 88 VspNode *mVspRoot; 89 ViewCell *mViewCellRoot; 85 90 86 91 ViewCellContainer mViewCells; … … 91 96 IndexedBoundingBoxContainer mIBoundingBoxes; 92 97 93 /// current task forthe parser94 int mCurrent Task;95 98 /// current state of the parser 99 int mCurrentState; 100 96 101 enum {PARSE_OPTIONS, PARSE_VIEWCELLS, PARSE_VSP, PARSE_OSP}; 102 103 /// view space / object space hierarchy types 104 enum {BSP, VSP, OSP, BVH}; 105 106 int mViewSpaceHierarchyType; 107 int mObjectSpaceHierarchyType; 97 108 98 109 // Handlers for X3D
Note: See TracChangeset
for help on using the changeset viewer.