Index: trunk/VUT/GtpVisibilityPreprocessor/include/ViewCellBSP.h
===================================================================
--- trunk/VUT/GtpVisibilityPreprocessor/include/ViewCellBSP.h	(revision 196)
+++ 	(revision )
@@ -1,84 +1,0 @@
-#ifndef _ViewCellBsp_H__
-#define _ViewCellBsp_H__
-
-#include "Containers.h"
-
-class ViewCell;
-class Plane3;
-
-namespace GtpVisibilityPreprocessor {
-  
-  class BSPInterior;
-
-  /**
-     BSPNode abstract class serving for interior and leaf node implementation
-  */
-  class BSPNode 
-  {
-  public:
-	  /** Determines whether this node is a leaf or not
-	  @return true if leaf
-	  */
-	  virtual bool IsLeaf() const = 0;
-    
-	  /** Determines whether this node is a root
-	  @return true if root
-	  */
-	  virtual bool IsRoot() const;
-  
-  protected:
-
-	  void SplitPoly(Plane3 *plane, Mesh *viewcell);
-
-	  /// parent of this node
-	  BSPInterior *mParent;
-  };
-
-  /** BSP interior node implementation */
-  class BSPInterior : public BSPNode 
-  {    
-	/** @return false since it is an interior node */
-	bool IsLeaf() const;
-
-	protected:
-	/// Splitting plane corresponding to this node
-	Plane3 mPlane;
-	/// back node
-	BSPNode *mBack;
-	/// front node
-	BSPNode *mFront;
-  };
-  
-  
-  /** BSP leaf node implementation */
-  class BSPLeaf : public BSPNode 
-  {
-  public:
-	  BSPLeaf(ViewCell *viewCell = NULL);
-	  /** @return true since it is an interior node */
-	  virtual bool IsLeaf();
-
-  protected:
-	  /// polygonal representation of this viewcell
-	  /// if NULL this note does not correspond to feasible viewcell
-	  ViewCell *mViewCell;
-  };
-  
-  /** Implementation of the ViewCell BSP tree */
-  class BSPTree 
-  {
-  public:
-	  /** Constructor takes a pointer to the cell corresponding to the whole
-	  viewspace */
-	  BSPTree(ViewCell *cell);
-        
-  protected:
-	  /// Pointer to the root of the tree
-	  BSPNode *mRoot;
-	  /// Pointer to the root cell of the viewspace */
-	  ViewCell *mRootCell;
-  };
-  
-}; // GtpVisibilityPreprocessor
-
-#endif
Index: trunk/VUT/GtpVisibilityPreprocessor/src/ViewCell.h
===================================================================
--- trunk/VUT/GtpVisibilityPreprocessor/src/ViewCell.h	(revision 219)
+++ trunk/VUT/GtpVisibilityPreprocessor/src/ViewCell.h	(revision 220)
@@ -7,5 +7,5 @@
   
 class BSPInterior;
-
+class BspPvs;
 /**
 	View cell represented as a mesh
@@ -14,11 +14,23 @@
 {
 public:
-	ViewCell(Mesh *mesh);
+	/** Default constructor taking a mesh which represents the shape of
+		the viewcell.
+	*/
+	ViewCell(Mesh *mesh): mMesh(mesh), mPvs(NULL) {}
 
+	/** Returns pointer to the mesh which represents the shape of the viewcell.
+	*/
 	Mesh *GetMesh() {return mMesh;}
+
+	/** Returns pointer to PVS. 
+		@returns PVS, i.e., the visible BSP tree nodes.
+	*/
+	BspPvs *GetPVS() {return mPvs;}
 
 protected:
 
 	Mesh *mMesh;
+	/// the PVS (i.e., the visible bsp tree nodes)
+	BspPvs *mPvs;
 
 };
Index: trunk/VUT/GtpVisibilityPreprocessor/src/ViewCellBSP.h
===================================================================
--- trunk/VUT/GtpVisibilityPreprocessor/src/ViewCellBSP.h	(revision 202)
+++ 	(revision )
@@ -1,115 +1,0 @@
-#ifndef _ViewCellBsp_H__
-#define _ViewCellBsp_H__
-
-#include "Mesh.h"
-class ViewCell;
-class Plane3;
-//class Mesh;
-
-//namespace GtpVisibilityPreprocessor {
-  
-class BSPInterior;
-
-
-  /**
-     BSPNode abstract class serving for interior and leaf node implementation
-  */
-  class BSPNode 
-  {
-  public:
-	  /** Determines whether this node is a leaf or not
-	  @return true if leaf
-	  */
-	  virtual bool IsLeaf() const = 0;
-    
-	  /** Determines whether this node is a root
-	  @return true if root
-	  */
-	  virtual bool IsRoot() const;
-
-  protected:
-
-	  /// parent of this node
-	  BSPInterior *mParent;
-  };
-
-  /** BSP interior node implementation */
-  class BSPInterior : public BSPNode 
-  {   
-  public:
-	  BSPInterior(Plane3 plane): mPlane(plane) {}
-	  /** @return false since it is an interior node */
-	  bool IsLeaf() const;
-
-	  BSPNode *GetBack() {return mBack;}
-	  BSPNode *GetFront() {return mFront;}
-
-	  void ReplaceChildLink(BSPNode *oldChild, BSPNode *newChild);
-	  void SetupChildLinks(BSPNode *b, BSPNode *f);
-
-  protected:
-		
-	  /// Splitting plane corresponding to this node
-	  Plane3 mPlane;
-	  /// back node
-	  BSPNode *mBack;
-	  /// front node
-	  BSPNode *mFront;
-  };
-  
-  
-  /** BSP leaf node implementation */
-  class BSPLeaf : public BSPNode 
-  {
-  public:
-	  BSPLeaf(ViewCell *viewCell = NULL);
-    
-	  /** @return true since it is an interior node */
-	  bool IsLeaf() const;
-
-  protected:
-   
-	  /// polygonal representation of this viewcell
-	  /// if NULL this note does not correspond to feasible viewcell
-	  ViewCell *mViewCell;
-  };
-  
-  /** Implementation of the ViewCell BSP tree */
-  class BSPTree 
-  {
-  public:
-	  struct BSPTraversalData
-	  {  
-		  BSPNode *mNode;
-		  BSPInterior *mParent;
-
-		  Mesh mViewCell;
-		  int mDepth;
-		      
-		  BSPTraversalData() {}
-		  BSPTraversalData(BSPNode *n, BSPInterior *p, const Mesh &m, const int d): 
-		  mNode(n), mParent(p), mViewCell(m), mDepth(d) {}
-      };
-	 
-	  /** Constructor takes a pointer to the cell corresponding to the whole
-	  viewspace */
-	  BSPTree(ViewCell *cell);
-        
-  protected:
-	   
-	  Plane3 *SelectPlane(Mesh *viewcell);
-	   void Subdivide();
-	   
-	   BSPNode *SubdivideNode(BSPLeaf *leaf, BSPInterior *parent, 
-							 Mesh *viewCell, const int depth, 
-							 Mesh &frontPolys, Mesh &backPolys);
-
-	  /// Pointer to the root of the tree
-	  BSPNode *mRoot;
-	  /// Pointer to the root cell of the viewspace
-	  ViewCell *mRootCell;
-  };
-  
-//}; // GtpVisibilityPreprocessor
-
-#endif
