- Timestamp:
- 05/18/08 00:30:13 (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
GTP/trunk/Lib/Vis/Preprocessing/src/RandomViewCellsHandler.cpp
r2648 r2686 136 136 137 137 ViewCellPoints *currentViewCell = NULL; 138 int i = 0; 139 int j = 0;138 139 AxisAlignedBox3 bbox = mViewCellsManager->GetViewSpaceBox(); 140 140 141 141 string buf; … … 152 152 currentViewCell->first = mViewCellsManager->GetViewCellById(id); 153 153 154 if (1)//i ++ < 5) 155 { 156 viewCells.push_back(currentViewCell); 157 j = 0; 158 } 154 viewCells.push_back(currentViewCell); 155 159 156 break; 160 157 } … … 164 161 sscanf(buf.c_str(), "p %f %f %f %f %f %f", &pt.x, &pt.y, &pt.z, &dir.x, &dir.y, &dir.z); 165 162 163 if (0) 164 { 165 // add new point to view space box 166 if (!bbox.IsInside(pt)) 167 bbox.Include(pt); 168 } 169 else 170 { 171 // other variant: clamp to box 172 bbox.ClampToBox(pt); 173 } 174 166 175 SimpleRay ray(pt, dir, 0, 1); 167 176 168 if (1)//j ++ < 5) 169 currentViewCell->second.push_back(ray); 177 // no view cell specified => create dummy view cell 178 if (!currentViewCell) 179 { 180 currentViewCell = new ViewCellPoints(); 181 viewCells.push_back(currentViewCell); 182 currentViewCell->first = NULL; 183 } 184 185 currentViewCell->second.push_back(ray); 170 186 171 187 break; … … 175 191 } 176 192 } 193 194 // set updated view space box containing all view points 195 mViewCellsManager->SetViewSpaceBox(bbox); 177 196 178 197 return true;
Note: See TracChangeset
for help on using the changeset viewer.