Ignore:
Timestamp:
08/01/05 17:37:57 (19 years ago)
Author:
mattausch
Message:
 
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/VUT/GtpVisibilityPreprocessor/include/ViewCellBSP.h

    r68 r189  
    22#define _ViewCellBsp_H__ 
    33 
     4class ViewCell; 
     5class Plane3; 
     6 
    47namespace GtpVisibilityPreprocessor { 
    5    
    68   
    79  class BSPInterior; 
     
    1012     BSPNode abstract class serving for interior and leaf node implementation 
    1113  */ 
    12   class BSPNode { 
     14  class BSPNode  
     15  { 
    1316  public: 
    1417    /** Determines whether this node is a leaf or not 
     
    2023        @return true if root 
    2124    */ 
    22     virtual bool IsRoot() const { 
    23       return parent == NULL; 
    24     } 
     25    virtual bool IsRoot(); 
     26 
    2527  protected: 
    2628    /// parent of this node 
    27     BSPInterior *parent; 
     29    BSPInterior *mParent; 
    2830  }; 
    2931 
    3032  /** BSP interior node implementation */ 
    31   class BSPInterior : public BSPNode { 
    32      
     33  class BSPInterior : public BSPNode  
     34     
    3335    /** @return false since it is an interior node */ 
    34     virtual bool IsLeaf() const { return false; } 
     36    bool IsLeaf() const; 
    3537 
    3638  protected: 
     
    4547   
    4648  /** BSP leaf node implementation */ 
    47   class BSPLeaf : public BSPNode { 
     49  class BSPLeaf : public BSPNode  
     50  { 
    4851  public: 
    49     BSPLeaf(ViewCell *viewCell = NULL):mViewCell(viewCell) {} 
    5052    /** @return true since it is an interior node */ 
    51     virtual bool IsLeaf() const { return true; } 
     53    virtual bool IsLeaf(); 
    5254 
    5355  protected: 
     
    5860   
    5961  /** Implementation of the ViewCell BSP tree */ 
    60   class BSPTree { 
     62  class BSPTree  
     63  { 
    6164  public: 
    6265    /** Constructor takes a pointer to the cell corresponding to the whole 
    6366        viewspace */ 
    64     BSPTree(ViewCell *cell) { 
    65       mRootCell = cell; 
    66       mRoot = new BSPLeaf(mRootCell); 
    67     } 
    68      
    69      
     67    BSPTree(ViewCell *cell); 
     68         
    7069  protected: 
    7170    /// Pointer to the root of the tree 
     
    7574  }; 
    7675   
    77 }; 
    78  
    79  
     76}; // GtpVisibilityPreprocessor 
    8077 
    8178#endif 
Note: See TracChangeset for help on using the changeset viewer.