Changeset 1097 for GTP/trunk/Lib/Vis/Preprocessing/src
- Timestamp:
- 07/07/06 11:50:58 (18 years ago)
- Location:
- GTP/trunk/Lib/Vis/Preprocessing/src
- Files:
-
- 96 added
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
GTP/trunk/Lib/Vis/Preprocessing/src/VspOspTree.cpp
r1093 r1097 3552 3552 } 3553 3553 3554 3555 3556 /********************************************************/ 3557 /* SplitHeap implementation */ 3558 /********************************************************/ 3559 3560 3561 SplitHeap::SplitHeap():mRoot(NULL) 3562 {} 3563 3564 void SplitHeap::Push(SplitCandidate *candidate) 3565 { 3566 InsertTail(candidate); 3567 3568 // Swap until heap constaints fullfilled 3569 while (HeapViolated(candidate)) 3570 { 3571 Swap(candidate, candidate->mParent); 3572 } 3573 } 3574 3575 3576 void SplitHeap::InsertTail(SplitCandidate *candidate) 3577 { 3578 } 3579 3580 3581 bool SplitHeap::HeapViolated(SplitCandidate *candidate) 3582 { 3583 return true; 3584 } 3585 3586 SplitCandidate *SplitHeap::Pop() 3587 { 3588 3589 return mRoot; 3590 } 3591 3592 void SplitHeap::Remove(SplitCandidate *candidate) 3593 { 3594 } 3595 3596 } 3554 } -
GTP/trunk/Lib/Vis/Preprocessing/src/VspOspTree.h
r1093 r1097 10 10 #include "RayInfo.h" 11 11 #include "gzstream.h" 12 #include "mixkit/MxHeap.h" 12 13 13 14 … … 47 48 /** Candidate for a view space / object space split. 48 49 */ 49 class SplitCandidate 50 class SplitCandidate: public MxHeapable 50 51 { 51 52 public: … … 1720 1721 }; 1721 1722 1722 /** Implements a heap for split candidates.1723 */1724 class SplitHeap1725 {1726 SplitHeap();1727 1728 void Push(SplitCandidate *candidate);1729 1730 SplitCandidate *Pop();1731 1732 void Remove(SplitCandidate *candidate);1733 1734 void InsertTail(SplitCandidate *candidate);1735 1736 bool HeapViolated(SplitCandidate *candidate);1737 1738 SplitCandidate *mRoot;1739 };1740 1741 1723 } 1742 1724
Note: See TracChangeset
for help on using the changeset viewer.