Ignore:
Timestamp:
07/07/06 11:50:58 (18 years ago)
Author:
mattausch
Message:
 
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  
    35523552} 
    35533553 
    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  
    1010#include "RayInfo.h" 
    1111#include "gzstream.h" 
     12#include "mixkit/MxHeap.h" 
    1213 
    1314 
     
    4748/** Candidate for a view space / object space split. 
    4849*/ 
    49 class SplitCandidate 
     50class SplitCandidate: public MxHeapable 
    5051 
    5152public: 
     
    17201721}; 
    17211722 
    1722 /** Implements a heap for split candidates. 
    1723 */ 
    1724 class SplitHeap 
    1725 { 
    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  
    17411723} 
    17421724 
Note: See TracChangeset for help on using the changeset viewer.