Changeset 752 for GTP/trunk/Lib/Vis/Preprocessing/src/ViewCell.h
- Timestamp:
- 04/20/06 13:25:41 (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
GTP/trunk/Lib/Vis/Preprocessing/src/ViewCell.h
r746 r752 90 90 class ViewCell: public MeshInstance 91 91 { 92 friend class ViewCellsTree; 93 friend class ViewCellsManager; 94 friend class VspBspViewCellsManager; 95 friend class BspViewCellsManager; 96 friend class VspBspTree; 97 friend class BspTree; 98 99 92 100 public: 93 101 ViewCell(); … … 104 112 */ 105 113 const ObjectPvs &GetPvs() const; 114 106 115 ObjectPvs &GetPvs(); 107 116 117 /** Type of view cells. 118 */ 108 119 int Type() const; 109 120 … … 151 162 float GetRenderCost() const; 152 163 153 /** set color for visiualizations */ 154 void SetColor(const RgbColor &color) { 155 mColor = color; 156 } 157 158 /** get color for visualuzations */ 159 RgbColor GetColor() const { 160 return mColor; 161 } 164 /** set color for visiualizations. 165 */ 166 void SetColor(const RgbColor &color); 167 168 /** get color for visualuzations. 169 */ 170 RgbColor GetColor() const; 162 171 163 172 … … 173 182 virtual bool IsLeaf() const = 0; 174 183 175 static bool SmallerPvs(const ViewCell *a, 176 const ViewCell *b){184 static bool SmallerPvs(const ViewCell *a, const ViewCell *b) 185 { 177 186 return a->GetPvs().GetSize() < b->GetPvs().GetSize(); 178 187 } … … 205 214 bool IsActive() const; 206 215 216 207 217 // last mail id -> warning not thread safe! 208 218 // both mailId and mailbox should be unique for each thread!!! … … 228 238 /** color used for consistent visualization */ 229 239 RgbColor mColor; 240 241 242 /// pvs size, used for lazy pvs computation 243 int mPvsSize; 244 bool mPvsSizeValid; 245 230 246 }; 231 247 … … 233 249 class ViewCellInterior: public ViewCell 234 250 { 251 friend class ViewCellsManager; 235 252 public: 236 253 ViewCellInterior(); … … 292 309 { 293 310 friend class ViewCellsManager; 311 312 294 313 public: 295 314 ViewCellsTree(ViewCellsManager *vcm); … … 355 374 float GetMemoryCost(ViewCell *vc) const; 356 375 357 /** Compresses the pvs of the view cells from the root. 358 */ 359 void CompressViewCellsPvs(); 376 /** Sets method of storage for view cells. 377 */ 378 void SetViewCellsStorage(int type); 379 380 /** pvs storage methods */ 381 enum {PVS_IN_INTERIORS, COMPRESSED, PVS_IN_LEAVES}; 360 382 361 383 /** If view cells in this tree have compressed pvs. 362 384 */ 363 bool IsCompressed() const;385 int ViewCellsStorage() const; 364 386 365 387 /** Returns active view cell that is in the path of this view cell. … … 485 507 486 508 /// if the view cell tree hold compressed pvs 487 bool mIsCompressed;509 int mViewCellsStorage; 488 510 489 511 ViewCellsManager *mViewCellsManager; … … 494 516 495 517 496 518 /** intermediate container of merged view cells. 519 */ 497 520 ViewCellContainer mMergedViewCells; 498 521
Note: See TracChangeset
for help on using the changeset viewer.