Changeset 1999 for GTP/trunk/Lib/Vis/Preprocessing/src/ViewCell.h
- Timestamp:
- 01/20/07 00:14:25 (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
GTP/trunk/Lib/Vis/Preprocessing/src/ViewCell.h
r1867 r1999 108 108 109 109 int mPvsSizeDecr; 110 111 110 112 111 float mVolume; … … 153 152 154 153 public: 154 155 155 ViewCell(); 156 156 … … 243 243 } 244 244 245 static bool GreaterOrEqualPvs(const ViewCell *a, const ViewCell *b) { 246 return !SmallerPvs(a, b); 247 } 245 static bool GreaterOrEqualPvs(const ViewCell *a, const ViewCell *b) 246 { 247 return !SmallerPvs(a, b); 248 } 248 249 249 250 static bool SmallerRenderCost(const ViewCell *a, const ViewCell *b) … … 260 261 @hack The function is available for leaves also to have a common interface, 261 262 but it should be less than zero for leaves. 262 263 */ 263 264 void SetMergeCost(const float mergeCost); 264 265 … … 269 270 float GetMergeCost() const; 270 271 271 272 mPvsCost = GetPvs().EvalPvsCost();273 274 275 276 mPvsCost = c;277 278 279 280 return mPvsCost;281 272 void UpdatePvsCost() { 273 mPvsCost = GetPvs().EvalPvsCost(); 274 } 275 276 void SetPvsCost(const float c) { 277 mPvsCost = c; 278 } 279 280 float GetPvsCost() const { 281 return mPvsCost; 282 } 282 283 283 284 ////////// 284 285 //-- mailing stuff 285 286 286 287 288 289 290 291 292 293 294 295 296 297 298 287 // static void NewMail(const int reserve = 1) 288 // { 289 // sMailId += sReservedMailboxes; 290 // sReservedMailboxes = reserve; 291 // } 292 293 // void Mail() { mMailbox = sMailId; } 294 // bool Mailed() const { return mMailbox == sMailId; } 295 296 // void Mail(const int mailbox) { mMailbox = sMailId + mailbox; } 297 // bool Mailed(const int mailbox) const { return mMailbox == sMailId + mailbox; } 298 299 // int IncMail() { return ++ mMailbox - sMailId; } 299 300 300 301 … … 302 303 // both mailId and mailbox should be unique for each thread!!! 303 304 304 //static int sMailId; 305 //static int sReservedMailboxes; 306 307 int GetFilteredPvsSize() const { 308 return mFilteredPvsSize; 309 } 310 311 void SetFilteredPvsSize(const int s) { 312 mFilteredPvsSize = s; 305 //static int sMailId; 306 //static int sReservedMailboxes; 307 308 int GetFilteredPvsSize() const 309 { 310 return mFilteredPvsSize; 311 } 312 313 void SetFilteredPvsSize(const int s) { 314 mFilteredPvsSize = s; 313 315 } 314 316 … … 341 343 bool mPvsSizeValid; 342 344 343 /// Filter cost of the pvs 344 int mFilteredPvsSize; 345 346 /// Filter cost of the pvs 347 int mFilteredPvsSize; 345 348 346 349 }; … … 356 359 357 360 ViewCellInterior(Mesh *mesh); 358 361 359 362 /** Sets pointer from parent to child and vice versa. 360 363 */ … … 368 371 mCost = c; 369 372 } 370 373 371 374 float GetCost() const { 372 375 return mCost; 373 376 } 374 375 377 378 ViewCellContainer mChildren; 376 379 377 380 protected: 378 /** overall cost resulting from the merge */ 379 float mCost; 381 382 /// Pverall cost resulting from the merge. 383 float mCost; 380 384 }; 381 385 … … 449 453 450 454 public: 455 451 456 ViewCellsTree(); 457 452 458 /** View cells tree constructor taking a view cell mnanager as parameter 453 459 */ … … 509 515 float GetPvsCost(ViewCell *vc) const; 510 516 511 512 517 /** Returns number of entries associated with this view cell. 513 518 … … 587 592 void ReadEnvironment(); 588 593 589 ///////////////////////////////////////////////////////////////// 590 // merge related stuff // 591 ///////////////////////////////////////////////////////////////// 594 595 ////////////////////////////////////////////////////////////// 596 // merge related stuff // 597 ////////////////////////////////////////////////////////////// 598 592 599 593 600 /** Computes render cost of the merged pvs. … … 623 630 @returns difference in pvs size 624 631 */ 625 ViewCellInterior *MergeViewCells(ViewCell *l, ViewCell *r, float &pvsDiff); //const;632 ViewCellInterior *MergeViewCells(ViewCell *l, ViewCell *r, float &pvsDiff); 626 633 627 634 /** Shuffles, i.e. takes border leaf from view cell 1 and adds it
Note: See TracChangeset
for help on using the changeset viewer.