Ignore:
Timestamp:
08/03/05 17:02:22 (19 years ago)
Author:
mattausch
Message:

started with bsp viewcells

File:
1 edited

Legend:

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

    r190 r194  
    11#ifndef _ViewCellBsp_H__ 
    22#define _ViewCellBsp_H__ 
     3 
     4#include "Containers.h" 
    35 
    46class ViewCell; 
     
    1517  { 
    1618  public: 
    17     /** Determines whether this node is a leaf or not 
    18         @return true if leaf 
    19     */ 
    20     virtual bool IsLeaf() const = 0; 
     19          /** Determines whether this node is a leaf or not 
     20          @return true if leaf 
     21          */ 
     22          virtual bool IsLeaf() const = 0; 
    2123     
    22     /** Determines whether this node is a root 
    23         @return true if root 
    24     */ 
    25     virtual bool IsRoot(); 
     24          /** Determines whether this node is a root 
     25          @return true if root 
     26          */ 
     27          virtual bool IsRoot(); 
     28   
     29  protected: 
    2630 
    27   protected: 
    28     /// parent of this node 
    29     BSPInterior *mParent; 
     31          void SplitPoly(Plane3 *plane, Mesh *viewcell); 
     32 
     33          /// parent of this node 
     34          BSPInterior *mParent; 
    3035  }; 
    3136 
     
    3338  class BSPInterior : public BSPNode  
    3439  {     
    35     /** @return false since it is an interior node */ 
    36     bool IsLeaf() const; 
     40        /** @return false since it is an interior node */ 
     41        bool IsLeaf() const; 
    3742 
    38   protected: 
    39     /// Splitting plane corresponding to this node 
    40     Plane3 mPlane; 
    41     /// back node 
    42     BSPNode *mBack; 
    43     /// front node 
    44     BSPNode *mFront; 
     43        protected: 
     44        /// Splitting plane corresponding to this node 
     45        Plane3 mPlane; 
     46        /// back node 
     47        BSPNode *mBack; 
     48        /// front node 
     49        BSPNode *mFront; 
    4550  }; 
    4651   
     
    5055  { 
    5156  public: 
    52         BSPLeaf(ViewCell *viewCell = NULL); 
    53     /** @return true since it is an interior node */ 
    54     virtual bool IsLeaf(); 
     57          BSPLeaf(ViewCell *viewCell = NULL); 
     58          /** @return true since it is an interior node */ 
     59          virtual bool IsLeaf(); 
    5560 
    5661  protected: 
    57     /// polygonal representation of this viewcell 
    58     /// if NULL this note does not correspond to feasible viewcell 
    59     ViewCell *mViewCell; 
     62          /// polygonal representation of this viewcell 
     63          /// if NULL this note does not correspond to feasible viewcell 
     64          ViewCell *mViewCell; 
    6065  }; 
    6166   
     
    6469  { 
    6570  public: 
    66     /** Constructor takes a pointer to the cell corresponding to the whole 
    67         viewspace */ 
    68     BSPTree(ViewCell *cell); 
     71          /** Constructor takes a pointer to the cell corresponding to the whole 
     72          viewspace */ 
     73          BSPTree(ViewCell *cell); 
    6974         
    7075  protected: 
    71     /// Pointer to the root of the tree 
    72     BSPNode *mRoot; 
    73     /// Pointer to the root cell of the viewspace */ 
    74     ViewCell *mRootCell; 
     76          /// Pointer to the root of the tree 
     77          BSPNode *mRoot; 
     78          /// Pointer to the root cell of the viewspace */ 
     79          ViewCell *mRootCell; 
    7580  }; 
    7681   
Note: See TracChangeset for help on using the changeset viewer.