Changeset 310 for trunk/VUT/GtpVisibilityPreprocessor/src/Preprocessor.cpp
- Timestamp:
- 10/05/05 18:36:16 (19 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/VUT/GtpVisibilityPreprocessor/src/Preprocessor.cpp
r309 r310 30 30 } 31 31 32 bool Preprocessor::ParseViewCellsOptions() 33 { 34 // parse type of view cells 35 char viewCellsStr[64]; 36 environment->GetStringValue("ViewCells.hierarchyType", viewCellsStr); 37 38 int vcType = BSP_VIEW_CELLS; 39 40 if (strcmp(viewCellsStr, "bspTree") == 0) 41 vcType = BSP_VIEW_CELLS; 42 else if (strcmp(viewCellsStr, "kdTree") == 0) 43 vcType = KD_VIEW_CELLS; 44 else if (strcmp(viewCellsStr, "sceneDependent") == 0) 45 vcType = SCENE_DEPENDENT; 46 else 47 { 48 cerr<<"Wrong view cells type" << viewCellsStr << endl; 49 exit(1); 50 } 51 52 // decide about view cell subdivision type used for preprocessing 53 switch (vcType) 54 { 55 case BSP_VIEW_CELLS: 56 case KD_VIEW_CELLS: 57 mViewCellsType = vcType; 58 break; 59 case SCENE_DEPENDENT: 60 mViewCellsType = BSP_VIEW_CELLS; // TODO 61 break; 62 } 63 64 return true; 65 } 66 32 67 void Preprocessor::DeleteViewCells() 33 68 { … … 108 143 switch (BspTree::sConstructionMethod) 109 144 { 110 case BspTree:: VIEW_CELLS:145 case BspTree::FROM_INPUT_VIEW_CELLS: 111 146 mBspTree->Construct(mViewCells); 112 147 break; 113 case BspTree:: SCENE_GEOMETRY:148 case BspTree::FROM_SCENE_GEOMETRY: 114 149 DeleteViewCells(); // we generate new view cells 115 150 mSceneGraph->CollectObjects(&objects); 116 151 mBspTree->Construct(objects, &mViewCells); 117 152 break; 118 case BspTree:: RAYS:153 case BspTree::FROM_RAYS: 119 154 DeleteViewCells(); // we generate new view cells 120 155 mBspTree->Construct(rays, &mViewCells); … … 126 161 return true; 127 162 } 163 128 164 129 165 … … 169 205 return false; 170 206 } 171 172 173
Note: See TracChangeset
for help on using the changeset viewer.