Changeset 1020 for GTP/trunk/Lib/Vis/Preprocessing/src/VspBspTree.h
- Timestamp:
- 06/18/06 03:47:06 (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
GTP/trunk/Lib/Vis/Preprocessing/src/VspBspTree.h
r1016 r1020 168 168 VspBspTraversalData mParentData; 169 169 // prioriry of this split 170 float m RenderCost;171 172 VspBspSplitCandidate(): m RenderCost(0)170 float mPriority; 171 172 VspBspSplitCandidate(): mPriority(0) 173 173 {}; 174 174 175 175 VspBspSplitCandidate(const Plane3 &plane, const VspBspTraversalData &tData): 176 mSplitPlane(plane), mParentData(tData), m RenderCost(0)176 mSplitPlane(plane), mParentData(tData), mPriority(0) 177 177 {} 178 178 179 179 /** Returns cost of the traversal data. 180 180 */ 181 float Get Cost() const181 float GetPriority() const 182 182 { 183 183 #if 1 184 return m RenderCost;184 return mPriority; 185 185 #else 186 186 return (float) (-mDepth); // for kd tree … … 190 190 friend bool operator<(const VspBspSplitCandidate &a, const VspBspSplitCandidate &b) 191 191 { 192 return a.Get Cost() < b.GetCost();192 return a.GetPriority() < b.GetPriority(); 193 193 } 194 194 }; … … 211 211 /** Constructs the tree from a given set of rays. 212 212 @param sampleRays the set of sample rays the construction is based on 213 @param viewCells if not NULL, new view cells are 214 created in the leafs and stored in the container 213 @param forcedBoundingBox overwrites the view space box 215 214 */ 216 215 void Construct(const VssRayContainer &sampleRays, … … 454 453 VspBspTraversalData &tData); 455 454 455 /** Subdivides node using a best split priority queue. 456 @param tQueue the best split priority queue 457 @param splitCandidate the candidate for the next split 458 @returns new root of the subtree 459 */ 456 460 BspNode *Subdivide(VspBspSplitQueue &tQueue, 457 461 VspBspSplitCandidate &splitCandidate); … … 459 463 /** Constructs the tree from the given traversal data. 460 464 @param polys stores set of polygons on which subdivision may be based 461 @param rays stores set of rays on which subdivision may be based465 @param rays stores set of rays on which subdivision may be based 462 466 */ 463 467 void Construct(const PolygonContainer &polys, RayInfoContainer *rays); … … 496 500 497 501 /** Subdivides leaf. 498 @param leaf the leaf to be subdivided 499 500 @param polys the polygons to be split 501 @param frontPolys returns the polygons in front of the split plane 502 @param backPolys returns the polygons in the back of the split plane 502 503 @param tData data object holding, e.g., a pointer to the leaf 504 @param frontData returns the data (e.g., pointer to the leaf) in front of the split plane 505 @param backData returns the data (e.g., pointer to the leaf) in the back of the split plane 503 506 504 507 @param rays the polygons to be filtered 505 508 @param frontRays returns the polygons in front of the split plane 506 @param backRays returns the polygons in the back of the split plane 509 @param coincident returns the polygons which are coincident to the plane and thus discarded 510 for traversal 507 511 508 512 @returns the root of the subdivision … … 699 703 700 704 705 /** Adds stats to subdivision log file. 706 */ 707 void AddSubdivisionStats(const int viewCells, 708 const float renderCostDecr, 709 const float splitCandidateCost, 710 const float totalRenderCost, 711 const float avgRenderCost); 701 712 702 713 /////////////////////////////////////////////////////////// … … 716 727 717 728 /// sorted split candidates used for sweep-heuristics 718 vector<SortableEntry> *m SplitCandidates;729 vector<SortableEntry> *mLocalSplitCandidates; 719 730 720 731 /// box around the whole view domain … … 837 848 // if rays should be stored in leaves 838 849 bool mStoreRays; 839 /// render cost weight between expected valueand variance850 /// weight between render cost (expected value) and variance 840 851 float mRenderCostWeight; 841 852 /// weight between render cost decrease and node render cost 853 float mRenderCostDecreaseWeight; 842 854 843 855 //-- subdivision statistics
Note: See TracChangeset
for help on using the changeset viewer.