Changeset 234 for trunk/VUT/GtpVisibilityPreprocessor/src/ViewCellBsp.h
- Timestamp:
- 08/10/05 18:07:51 (19 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/VUT/GtpVisibilityPreprocessor/src/ViewCellBsp.h
r233 r234 17 17 18 18 typedef std::queue<Polygon *> PolygonQueue; 19 20 class BspTreeStatistics // TODO: should have common superclass with KdTreeStatistics 21 { 22 public: 23 // total number of nodes 24 int nodes; 25 // totals number of rays 26 int rays; 27 // total number of query domains 28 int queryDomains; 29 // total number of ray references 30 int rayRefs; 31 // refs in non empty leafs 32 int rayRefsNonZeroQuery; 33 // total number of query references 34 int objectRefs; 35 // nodes with zero queries 36 int zeroQueryNodes; 37 // max depth nodes 38 int maxDepthNodes; 39 // max number of rays per node 40 int maxObjectRefs; 41 // number of dynamically added ray refs 42 int addedRayRefs; 43 // number of dynamically removed ray refs 44 int removedRayRefs; 45 46 // Constructor 47 BspTreeStatistics() 48 { 49 Reset(); 50 } 51 52 int Nodes() const {return nodes;} 53 int Interior() const { return nodes/2; } 54 int Leaves() const { return (nodes/2) + 1; } 55 56 void Reset() 57 { 58 nodes = 0; 59 60 rays = queryDomains = 0; 61 rayRefs = rayRefsNonZeroQuery = objectRefs = 0; 62 zeroQueryNodes = 0; 63 maxDepthNodes = 0; 64 //minCostNodes = 0; 65 maxObjectRefs = 0; 66 addedRayRefs = removedRayRefs = 0; 67 } 68 69 void 70 Print(ostream &app) const; 71 72 friend ostream &operator<<(ostream &s, const BspTreeStatistics &stat) { 73 stat.Print(s); 74 return s; 75 } 76 77 }; 19 78 20 79 /** … … 179 238 /** Builds a new extension of the tree. 180 239 */ 181 void BuildTree(BspTraversalStack &tStack, BspTraversalData ¤tData );240 void BuildTree(BspTraversalStack &tStack, BspTraversalData ¤tData, ViewCell *viewCell = NULL); 182 241 183 242 /** Selects a splitting plane from the given polygons. … … 232 291 /// maximal depth 233 292 int mMaxDepth; 293 294 BspTreeStatistics mStat; 234 295 }; 235 296
Note: See TracChangeset
for help on using the changeset viewer.