Changeset 194


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

started with bsp viewcells

Location:
trunk/VUT
Files:
4 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   
  • trunk/VUT/GtpVisibilityPreprocessor/src/ViewCellBSP.h

    r190 r194  
    44class ViewCell; 
    55class Plane3; 
     6class Mesh; 
    67 
    78//namespace GtpVisibilityPreprocessor { 
    89   
    9   class BSPInterior; 
     10class BSPInterior; 
    1011 
    11   /** 
    12      BSPNode abstract class serving for interior and leaf node implementation 
    13   */ 
    14   class BSPNode  
    15   { 
    16   public: 
    17     /** Determines whether this node is a leaf or not 
     12/** 
     13        BSPNode abstract class serving for interior and leaf node implementation 
     14*/ 
     15class BSPNode  
     16{ 
     17public: 
     18        /** Determines whether this node is a leaf or not 
    1819        @return true if leaf 
    1920    */ 
     
    2526    virtual bool IsRoot() const; 
    2627 
    27   protected: 
     28        protected: 
     29 
     30                void SplitPoly(Plane3 *plane, Mesh *viewcell); 
     31 
    2832    /// parent of this node 
    2933    BSPInterior *mParent; 
  • trunk/VUT/GtpVisibilityPreprocessor/src/ViewCellBsp.cpp

    r190 r194  
    11#include "Plane3.h" 
    22#include "ViewCellBsp.h" 
     3#include "Mesh.h" 
    34 
    45class ViewCell; 
     
    910{ 
    1011        return mParent == NULL; 
     12} 
     13 
     14void BSPNode::SplitPoly(Plane3 *plane, Mesh *viewcell) 
     15{ 
    1116} 
    1217 
Note: See TracChangeset for help on using the changeset viewer.