Changeset 997 for GTP/trunk/Lib/Vis/Preprocessing/src/ViewCell.h
- Timestamp:
- 05/31/06 10:04:05 (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
GTP/trunk/Lib/Vis/Preprocessing/src/ViewCell.h
r971 r997 193 193 static bool SmallerPvs(const ViewCell *a, const ViewCell *b) 194 194 { 195 return a->GetPvs().GetSize() < b->GetPvs().GetSize(); 196 } 197 198 static bool SmallerRenderCost(const ViewCell *a, const ViewCell *b) 199 { 200 return a->GetRenderCost() < b->GetRenderCost(); 201 } 202 203 static bool LargerRenderCost(const ViewCell *a, const ViewCell *b) 204 { 205 return a->GetRenderCost() > b->GetRenderCost(); 206 } 195 // HACK: take scalar value because pvs may not have been stored properly 196 #if 1 197 return a->mPvsSize < b->mPvsSize; 198 #else 199 return a->GetPvs().GetSize() < b->GetPvs().GetSize(); 200 #endif 201 } 202 203 static bool SmallerRenderCost(const ViewCell *a, const ViewCell *b) 204 { 205 return a->GetRenderCost() < b->GetRenderCost(); 206 } 207 208 static bool LargerRenderCost(const ViewCell *a, const ViewCell *b) 209 { 210 return a->GetRenderCost() > b->GetRenderCost(); 211 } 207 212 208 213 void SetMergeCost(const float mergeCost); 214 209 215 float GetMergeCost() const; 210 static void NewMail(const int reserve = 1) { 216 217 static void NewMail(const int reserve = 1) 218 { 211 219 sMailId += sReservedMailboxes; 212 220 sReservedMailboxes = reserve; 213 221 } 222 214 223 void Mail() { mMailbox = sMailId; } 215 224 bool Mailed() const { return mMailbox == sMailId; } … … 309 318 310 319 311 /// points to the currently active view cell. 320 /** points to the currently active view cell. This is the 321 view cell representing the current brach. 322 */ 312 323 ViewCell *mActiveViewCell; 313 324 }; … … 349 360 350 361 public: 362 /** View cells tree constructor taking a view cell mnanager and 363 an environment as parameters. 364 */ 351 365 ViewCellsTree(ViewCellsManager *vcm, Environment *env); 352 366 ~ViewCellsTree(); … … 372 386 373 387 /** Assign colors to the viewcells so that they can be renderered interactively without 374 color flickering.375 388 color flickering. 389 */ 376 390 void AssignRandomColors(); 377 391 378 /** Updates view cell stats for this particular view cell 392 /** Updates view cell stats for this particular view cell. 379 393 */ 380 394 void UpdateViewCellsStats(ViewCell *vc, ViewCellsStatistics &vcStat); 381 395 382 396 383 /** Get costs resulting from each merge step. */ 397 /** Get costs resulting from each merge step. 398 */ 384 399 void GetCostFunction(vector<float> &costFunction); 385 400 … … 465 480 466 481 467 ////////////////////////////////////////////////////////////// 468 // merge related stuff //469 ////////////////////////////////////////////////////////////// 482 ///////////////////////////////////////////////////////////////// 483 // merge related stuff // 484 ///////////////////////////////////////////////////////////////// 470 485 471 486 /** Computes render cost of the merged pvs. … … 525 540 const int numNewViewCells); 526 541 527 /** merge queue must be reset after some time because expected value542 /** Merge queue must be reset after some time because expected value 528 543 may not be valid. 529 544 */ … … 535 550 int UpdateActiveViewCells(ViewCellContainer &viewCells); 536 551 552 /** Helper function pullling pvs as high up in the tree as possible. 553 */ 537 554 void PullUpVisibility(ViewCellInterior *interior); 538 555 556 /** Compress pvs of view cell and children. 557 */ 539 558 void CompressViewCellsPvs(ViewCell *root); 540 559
Note: See TracChangeset
for help on using the changeset viewer.