source: GTP/trunk/Lib/Vis/Preprocessing/include/ViewCellBsp.h @ 236

Revision 236, 1.6 KB checked in by mattausch, 19 years ago (diff)

erased compiler errors

Line 
1#ifndef _ViewCellBsp_H__
2#define _ViewCellBsp_H__
3
4#include "Containers.h"
5
6class ViewCell;
7class Plane3;
8
9namespace GtpVisibilityPreprocessor {
10 
11  class BspInterior;
12
13  /**
14     BspNode abstract class serving for interior and leaf node implementation
15  */
16  class BspNode
17  {
18  public:
19          /** Determines whether this node is a leaf or not
20          @return true if leaf
21          */
22          virtual bool IsLeaf() const = 0;
23   
24          /** Determines whether this node is a root
25          @return true if root
26          */
27          virtual bool IsRoot() const;
28 
29  protected:
30
31          /// parent of this node
32          BspInterior *mParent;
33  };
34
35  /** BSP interior node implementation */
36  class BspInterior : public BspNode
37  {   
38          /** @return false since it is an interior node */
39          bool IsLeaf() const;
40 
41  protected:
42          /// Splitting plane corresponding to this node
43          Plane3 mPlane;
44          /// back node
45          BspNode *mBack;
46          /// front node
47          BspNode *mFront;
48  };
49 
50 
51  /** BSP leaf node implementation.
52  */
53  class BspLeaf : public BspNode
54  {
55  public:
56          BspLeaf(ViewCell *viewCell = NULL);
57          /** @return true since it is an interior node */
58          virtual bool IsLeaf();
59
60  protected:
61          /// polygonal representation of this viewcell
62          /// if NULL this note does not correspond to feasible viewcell
63          ViewCell *mViewCell;
64  };
65 
66  /** Implementation of the ViewCell BSP tree.
67  */
68  class BspTree
69  {
70  public:
71          /** Default constructor.
72          */
73          BspTree();
74       
75  protected:
76
77          /// Pointer to the root of the tree
78          BspNode *mRoot;
79          /// Pointer to the root cell of the viewspace */
80          ViewCell *mRootCell;
81
82
83  };
84 
85}; // GtpVisibilityPreprocessor
86
87#endif
Note: See TracBrowser for help on using the repository browser.