Changeset 452 for trunk/VUT/GtpVisibilityPreprocessor/src/VspKdTree.h
- Timestamp:
- 12/05/05 20:33:53 (19 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/VUT/GtpVisibilityPreprocessor/src/VspKdTree.h
r440 r452 33 33 #include "RayInfo.h" 34 34 #include "Containers.h" 35 36 class VspKdTreeLeaf; 37 38 /** 39 Candidate for leaf merging based on priority. 40 */ 41 class MergeCandidate 42 { 43 public: 44 VspKdTreeLeaf *mLeaf1; 45 VspKdTreeLeaf *mLeaf2; 46 47 MergeCandidate(VspKdTreeLeaf *l1, VspKdTreeLeaf *l2); 48 49 /** Computes PVS difference between the leaves. 50 */ 51 int ComputePvsDifference() const; 52 53 /** Evaluates the merge costs of this leaf. 54 */ 55 float EvaluateMergeCost() const; 56 57 friend bool operator<(const MergeCandidate &leafa, const MergeCandidate &leafb) 58 { 59 return leafa.ComputePvsDifference() < leafb.ComputePvsDifference(); 60 } 61 }; 62 63 35 64 36 65 /** … … 294 323 static int mailID; 295 324 296 297 325 protected: 298 326 … … 306 334 RayInfoContainer mRays; 307 335 bool mValidPvs; 308 336 337 ViewCell *mViewCell; 309 338 private: 310 339 int mPvsSize; … … 453 482 void CollectLeaves(vector<VspKdTreeLeaf *> &leaves) const; 454 483 484 /** Merges leaves of this tree according to some criteria. 485 */ 486 void MergeLeaves(); 487 488 /** Finds neighbours of this node. 489 @param n the input node 490 @param neighbours the neighbors of the input node 491 @param onlyUnmailed if only unmailed neighbors are collected 492 */ 493 int FindNeighbors(VspKdTreeLeaf *n, 494 vector<VspKdTreeLeaf *> &neighbors, 495 bool onlyUnmailed); 496 455 497 protected: 456 498 … … 547 589 548 590 protected: 591 592 549 593 ///////////////////////////// 550 594 // The core pointer … … 610 654 float mTermMaxRayContribution; 611 655 612 613 656 bool mOnlyDrivingAxis; 657 658 typedef std::pair<VspKdTreeLeaf *, VspKdTreeLeaf *> LeafPair; 659 614 660 ///////////////////////////// 615 661 VspKdStatistics mStat;
Note: See TracChangeset
for help on using the changeset viewer.