Ignore:
Timestamp:
06/13/06 08:03:35 (18 years ago)
Author:
mattausch
Message:
 
File:
1 edited

Legend:

Unmodified
Added
Removed
  • GTP/trunk/Lib/Vis/Preprocessing/src/VspOspTree.h

    r1011 r1012  
    144144class VspNode  
    145145{ 
    146  
    147146public: 
     147         
     148        // types of vsp nodes 
     149        enum {Interior, Leaf}; 
     150 
    148151        VspNode(); 
    149152        virtual ~VspNode(){}; 
     
    154157        */ 
    155158        virtual bool IsLeaf() const = 0; 
     159 
     160        virtual int Type() const; 
    156161 
    157162        /** Determines whether this node is a root 
     
    215220        bool IsLeaf() const; 
    216221 
     222        int Type() const; 
     223 
    217224        VspNode *GetBack(); 
    218225        VspNode *GetFront(); 
     
    221228        */ 
    222229        AxisAlignedPlane GetPlane() const; 
     230 
     231        /** Returns position of split plane. 
     232        */ 
     233        float GetPosition() const; 
     234 
     235        /** Returns split axis. 
     236        */ 
     237        int GetAxis() const; 
    223238 
    224239        /** Replace front or back child with new child. 
     
    234249        } 
    235250 
     251        AxisAlignedBox3 GetBox() const; 
     252        void SetBox(const AxisAlignedBox3 &box); 
     253 
    236254protected: 
     255 
     256        AxisAlignedBox3 mBox; 
    237257 
    238258        /// Splitting plane corresponding to this node 
     
    263283        bool IsLeaf() const; 
    264284         
     285                virtual int Type() const; 
     286 
    265287        /** Returns pointer of view cell. 
    266288        */ 
     
    414436         
    415437 
     438        /** Struct for traversing line segment. 
     439        */ 
     440        struct LineTraversalData  
     441        { 
     442                VspNode *mNode; 
     443                Vector3 mExitPoint; 
     444                 
     445                float mMaxT; 
     446     
     447                LineTraversalData () {} 
     448                LineTraversalData (VspNode *n, const Vector3 &p, const float maxt): 
     449                mNode(n), mExitPoint(p), mMaxT(maxt) {} 
     450        }; 
     451 
    416452        typedef std::priority_queue<VspOspTraversalData> VspOspTraversalQueue; 
    417453         
    418          
     454        /** candidate for a view space split 
     455        */ 
    419456        struct VspOspSplitCandidate 
    420457        {   
     
    466503        const VspTreeStatistics &GetStatistics() const;  
    467504   
     505        /** Returns bounding box of the specified node. 
     506        */ 
     507        AxisAlignedBox3 GetBBox(VspNode *node) const; 
    468508 
    469509        /** Constructs the tree from a given set of rays. 
     
    506546        /** finds neighbouring leaves of this tree node. 
    507547        */ 
    508         int FindNeighbors(VspNode *n,  
     548        int FindNeighbors(VspLeaf *n,  
    509549                                          vector<VspLeaf *> &neighbors,  
    510550                                          const bool onlyUnmailed) const; 
     
    594634                @returns number of view cells found 
    595635        */ 
    596         int ComputeBoxIntersections(const AxisAlignedBox3 &box, ViewCellContainer &viewCells) const; 
     636        int ComputeBoxIntersections(const AxisAlignedBox3 &box,  
     637                                                                ViewCellContainer &viewCells) const; 
    597638 
    598639        // pointer to the hierarchy of view cells 
Note: See TracChangeset for help on using the changeset viewer.