Changeset 1709 for GTP/trunk/Lib/Vis/Preprocessing/src/ViewCell.h
- Timestamp:
- 11/02/06 19:09:30 (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
GTP/trunk/Lib/Vis/Preprocessing/src/ViewCell.h
r1707 r1709 35 35 /// number of view cells 36 36 int viewCells; 37 /// sizeof the PVS38 int pvsSize;37 /// cost of the PVS 38 float pvsCost; 39 39 /// largest PVS of all view cells 40 int maxPvs;40 float maxPvs; 41 41 /// smallest PVS of all view cells 42 int minPvs;42 float minPvs; 43 43 /// view cells with empty PVS 44 44 int emptyPvs; … … 57 57 58 58 double AvgLeaves() const {return (double)leaves / (double)viewCells;}; 59 double AvgPvs() const {return (double)pvs Size/ (double)viewCells;};59 double AvgPvs() const {return (double)pvsCost / (double)viewCells;}; 60 60 61 61 void Reset() 62 62 { 63 63 viewCells = 0; 64 pvs Size= 0;64 pvsCost = 0; 65 65 maxPvs = 0; 66 66 … … 75 75 76 76 friend ostream &operator<<(ostream &s, const ViewCellsStatistics &stat) 77 { 78 stat.Print(s); 79 return s; 80 } 81 }; 82 83 84 class ViewCellsTreeStats 85 { 86 public: 87 int mPass; 88 89 int mNumViewCells; 90 91 float mRenderCostDecrease; 92 93 float mTotalRenderCost; 94 95 float mCurrentPvsCost; 96 97 float mExpectedCost; 98 99 float mAvgRenderCost; 100 101 float mDeviation; 102 103 float mTotalPvsCost; 104 105 int mEntriesInPvs; 106 107 float mMemoryCost; 108 109 int mPvsSizeDecr; 110 111 float mVolume; 112 113 114 void Reset() 115 { 116 mPass = 0; 117 mNumViewCells = 0; 118 mRenderCostDecrease = 0; 119 mTotalRenderCost = 0; 120 mCurrentPvsCost = 0; 121 mExpectedCost = 0; 122 mAvgRenderCost = 0; 123 mDeviation = 0; 124 mTotalPvsCost = 0; 125 mEntriesInPvs = 0; 126 mMemoryCost = 0; 127 mPvsSizeDecr = 0; 128 mVolume = 0; 129 } 130 131 132 void Print(ostream &app) const; 133 134 friend ostream &operator<<(ostream &s, const ViewCellsTreeStats &stat) 77 135 { 78 136 stat.Print(s); … … 181 239 // HACK: take scalar value because pvs may not have been stored properly 182 240 #if 1 183 return a->mPvs Size < b->mPvsSize;241 return a->mPvsCost < b->mPvsCost; 184 242 #else 185 243 return a->GetPvs().EvalPvsCost() < b->GetPvs().EvalPvsCost(); … … 251 309 RgbColor mColor; 252 310 /// store pvs size, used for evaluation purpose when pvss are stored only in the leaves 253 int mPvsSize;311 float mPvsCost; 254 312 /** stores number of entries in pvs 255 313 this variable has the same value as mPvsSize for object pvs, … … 421 479 void GetPvs(ViewCell *vc, ObjectPvs &pvs) const; 422 480 423 /** Returns pvs size (i.e. the number ofstored objects)424 */ 425 int GetPvsSize(ViewCell *vc) const;481 /** Returns pvs size (i.e. the render cost of the stored objects) 482 */ 483 float GetPvsCost(ViewCell *vc) const; 426 484 427 485 /** Returns number of entries associated with this view cell. … … 538 596 @returns difference in pvs size 539 597 */ 540 ViewCellInterior *MergeViewCells(ViewCell *l, ViewCell *r, int &pvsDiff); //const;598 ViewCellInterior *MergeViewCells(ViewCell *l, ViewCell *r, float &pvsDiff); //const; 541 599 542 600 /** Shuffles, i.e. takes border leaf from view cell 1 and adds it … … 601 659 The pvs is assumed to be stored using lossless compression. 602 660 */ 603 int GetPvsSizeForCompressedStorage(ViewCell *vc) const;661 float GetPvsCostForCompressedStorage(ViewCell *vc) const; 604 662 605 663 /** Computes pvs size of this view cell. 606 664 The pvs is assumed to be stored in the leaves. 607 665 */ 608 int GetPvsSizeForLeafStorage(ViewCell *vc) const;666 float GetPvsCostForLeafStorage(ViewCell *vc) const; 609 667 610 668 /** Counts the logical number of entries in the pvs this view cell. … … 616 674 */ 617 675 void UpdateStats(ofstream &stats, 618 const int pass, 619 const int viewCells, 620 const float renderCostDecrease, 621 const float totalRenderCost, 622 const int currentPvs, 623 const float expectedCost, 624 const float avgRenderCost, 625 const float deviation, 626 const int totalPvs, 627 const int entriesInPvs, 628 const float memoryCost, 629 const int pvsSizeDecr, 630 const float volume); 676 const ViewCellsTreeStats &vcStats); 631 677 632 678
Note: See TracChangeset
for help on using the changeset viewer.