Changeset 881 for GTP/trunk/Lib/Vis/Preprocessing/src/ViewCell.h
- Timestamp:
- 05/03/06 09:40:01 (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
GTP/trunk/Lib/Vis/Preprocessing/src/ViewCell.h
r880 r881 22 22 class MergeCandidate; 23 23 class ViewCellsManager; 24 class ViewCellLeaf; 24 25 25 26 /** Statistics for a view cell partition. … … 217 218 218 219 219 /** Sets this view cell to be an active view cell.220 */221 void SetActive();222 /** Returns if this view cell is active.223 */224 bool IsActive() const;225 226 220 227 221 // last mail id -> warning not thread safe! … … 230 224 static int sReservedMailboxes; 231 225 232 static int sLastUpdated;233 226 234 227 protected: … … 244 237 bool mValid; 245 238 246 int mLastUpdated; 247 bool mIsActive; 248 /** color used for consistent visualization */ 239 /// color used for consistent visualization 249 240 RgbColor mColor; 250 241 … … 252 243 /// pvs size, used for lazy pvs computation 253 244 int mPvsSize; 245 /// if the given pvs size is the real pvs size 254 246 bool mPvsSizeValid; 255 247 … … 287 279 }; 288 280 281 289 282 /** 290 View cell belonging to a hierarchy.283 Leaf of the view cell. 291 284 */ 292 template<typename T>293 285 class ViewCellLeaf: public ViewCell 294 286 { 295 287 public: 296 297 ViewCellLeaf<T>(): mLeaf(NULL) { SetActive(); } 298 ViewCellLeaf<T>(Mesh *mesh): 299 ViewCell(mesh), mLeaf(NULL) { SetActive(); } 300 288 ViewCellLeaf() { mActiveViewCell = this; } 289 ViewCellLeaf(Mesh *mesh): 290 ViewCell(mesh) { mActiveViewCell = this; } 301 291 302 292 bool IsLeaf() const … … 304 294 return true; 305 295 } 296 297 /** Returns if this view cell is active. 298 */ 299 ViewCell *GetActiveViewCell() const 300 { return mActiveViewCell; } 301 302 /** Sets this view cell to be an active view cell. 303 */ 304 void SetActiveViewCell(ViewCell *vc) 305 { mActiveViewCell = vc;} 306 307 308 /// points to the currently active view cell. 309 ViewCell *mActiveViewCell; 310 }; 311 312 /** 313 Leaf of the view cell hierarchy corresponding to a leaf in a spatial hierarchy. 314 */ 315 template<typename T> 316 class HierarchyLeafViewCell: public ViewCellLeaf 317 { 318 public: 319 320 HierarchyLeafViewCell<T>(): ViewCellLeaf() { } 321 HierarchyLeafViewCell<T>(Mesh *mesh): 322 ViewCellLeaf(mesh) { } 323 324 325 bool IsLeaf() const 326 { 327 return true; 328 } 329 306 330 307 331 /// Leaf of some hierarchy which is part of this view cell. … … 310 334 311 335 312 typedef ViewCellLeaf<BspLeaf *> BspViewCell;313 typedef ViewCellLeaf<KdLeaf *> KdViewCell;314 typedef ViewCellLeaf<VspKdLeaf *> VspKdViewCell;336 typedef HierarchyLeafViewCell<BspLeaf *> BspViewCell; 337 typedef HierarchyLeafViewCell<KdLeaf *> KdViewCell; 338 typedef HierarchyLeafViewCell<VspKdLeaf *> VspKdViewCell; 315 339 316 340 … … 399 423 /** Returns active view cell that is in the path of this view cell. 400 424 */ 401 ViewCell *GetActiveViewCell(ViewCell *vc) const;425 ViewCell *GetActiveViewCell(ViewCellLeaf *vc) const; 402 426 403 427 /** Sets the leaves to be the currently active view cells.
Note: See TracChangeset
for help on using the changeset viewer.