Index: trunk/VUT/GtpVisibilityPreprocessor/src/Beam.cpp
===================================================================
--- trunk/VUT/GtpVisibilityPreprocessor/src/Beam.cpp	(revision 506)
+++ trunk/VUT/GtpVisibilityPreprocessor/src/Beam.cpp	(revision 506)
@@ -0,0 +1,63 @@
+#include "Beam.h"
+#include "VssRay.h"
+
+
+
+
+void
+Beam::Construct(const  AxisAlignedBox3 &box,
+				   const  AxisAlignedBox3 &dBox)
+{
+  // the frustum is defined by set of negative halfspace described by mPlanes
+  
+  // construct
+  Vector3 center = box.Center();
+  Vector3 dCenter = dBox.Center();
+
+  // "back plane"
+  mPlanes.push_back(Plane3(-VssRay::GetDirection(dCenter.x, dCenter.y), center));
+
+  Vector3 directions[4];
+  directions[0] = VssRay::GetDirection(dBox.Min().x, dBox.Min().y);
+  directions[1] = VssRay::GetDirection(dBox.Max().x, dBox.Min().y);
+  directions[2] = VssRay::GetDirection(dBox.Max().x, dBox.Max().y);
+  directions[3] = VssRay::GetDirection(dBox.Min().x, dBox.Max().y);
+  
+  // side planes
+  mPlanes.push_back(Plane3(CrossProd(directions[0], directions[1]), center));
+  mPlanes.push_back(Plane3(CrossProd(directions[1], directions[2]), center));
+  mPlanes.push_back(Plane3(CrossProd(directions[2], directions[3]), center));
+  mPlanes.push_back(Plane3(CrossProd(directions[3], directions[0]), center));
+
+
+  // now make sure all planes contain the spatial box
+  int i, j;
+  for (i=0; i < mPlanes.size(); i++) {
+	for (j=0; j < 8; j++) {
+	  float dist = mPlanes[i].Distance(box.GetVertex(j));
+	  if (dist > 0)
+		mPlanes[i].mD -= dist;
+	}
+  }
+}
+
+// conservative frustum box intersection
+// returns
+// 0 - box intersects the frustum
+// -1 - box intersects the frustum and is fully inside
+// 1 - box does not intersect the frustum
+
+int
+Beam::ComputeIntersection(const  AxisAlignedBox3 &box)
+{
+  int i;
+  int result = -1;
+  for (i=0; i < mPlanes.size(); i++) {
+	int side = box.Side(mPlanes[i]);
+	if (side == 1)
+	  return 1;
+	if (side > result)
+	  result = side;
+  }
+  return result;
+}
Index: trunk/VUT/GtpVisibilityPreprocessor/src/Beam.h
===================================================================
--- trunk/VUT/GtpVisibilityPreprocessor/src/Beam.h	(revision 506)
+++ trunk/VUT/GtpVisibilityPreprocessor/src/Beam.h	(revision 506)
@@ -0,0 +1,46 @@
+#ifndef __BEAM_H
+#define __BEAM_H
+
+#include <vector>
+using namespace std;
+
+class KdNode;
+class Intersectable;
+#include "AxisAlignedBox3.h"
+
+class Beam {
+  
+public:			
+  enum {STORE_KD_NODES=1, STORE_OBJECTS=2};
+  int mFlags;
+  
+  // list of nodes intersected by the frustum
+  vector<KdNode *> mKdNodes;
+  // lits of objects intersected by the frum
+  vector<Intersectable *> mObjects;
+
+
+  // spatial box
+  AxisAlignedBox3 mBox;
+  // directional box (it is actually a 2D box - only x and y ranges are valid)
+  // directional parametrization according to VssRay::GetDirParametrization
+  AxisAlignedBox3 mDirBox;
+
+  vector<Plane3> mPlanes;
+  
+  Beam():mFlags(STORE_KD_NODES+STORE_OBJECTS)
+  {
+  }
+  
+  void Construct(const  AxisAlignedBox3 &box,
+				 const  AxisAlignedBox3 &dBox);
+  
+
+  int
+  ComputeIntersection(const  AxisAlignedBox3 &box);
+
+  
+};
+
+
+#endif
Index: trunk/VUT/GtpVisibilityPreprocessor/src/Frustum.h
===================================================================
--- trunk/VUT/GtpVisibilityPreprocessor/src/Frustum.h	(revision 505)
+++ 	(revision )
@@ -1,46 +1,0 @@
-#ifndef __BEAM_H
-#define __BEAM_H
-
-#include <vector>
-using namespace std;
-
-class KdNode;
-class Intersectable;
-#include "AxisAlignedBox3.h"
-
-class Beam {
-  
-public:			
-  enum {STORE_KD_NODES=1, STORE_OBJECTS=2};
-  int mFlags;
-  
-  // list of nodes intersected by the frustum
-  vector<KdNode *> mKdNodes;
-  // lits of objects intersected by the frum
-  vector<Intersectable *> mObjects;
-
-
-  // spatial box
-  AxisAlignedBox3 mBox;
-  // directional box (it is actually a 2D box - only x and y ranges are valid)
-  // directional parametrization according to VssRay::GetDirParametrization
-  AxisAlignedBox3 mDirBox;
-
-  vector<Plane3> mPlanes;
-  
-  Beam():mFlags(STORE_KD_NODES+STORE_OBJECTS)
-  {
-  }
-  
-  void Construct(const  AxisAlignedBox3 &box,
-				 const  AxisAlignedBox3 &dBox);
-  
-
-  int
-  ComputeIntersection(const  AxisAlignedBox3 &box);
-
-  
-};
-
-
-#endif
Index: trunk/VUT/GtpVisibilityPreprocessor/src/Frustum.cpp
===================================================================
--- trunk/VUT/GtpVisibilityPreprocessor/src/Frustum.cpp	(revision 505)
+++ 	(revision )
@@ -1,63 +1,0 @@
-#include "Beam.h"
-#include "VssRay.h"
-
-
-
-
-void
-Beam::Construct(const  AxisAlignedBox3 &box,
-				   const  AxisAlignedBox3 &dBox)
-{
-  // the frustum is defined by set of negative halfspace described by mPlanes
-  
-  // construct
-  Vector3 center = box.Center();
-  Vector3 dCenter = dBox.Center();
-
-  // "back plane"
-  mPlanes.push_back(Plane3(-VssRay::GetDirection(dCenter.x, dCenter.y), center));
-
-  Vector3 directions[4];
-  directions[0] = VssRay::GetDirection(dBox.Min().x, dBox.Min().y);
-  directions[1] = VssRay::GetDirection(dBox.Max().x, dBox.Min().y);
-  directions[2] = VssRay::GetDirection(dBox.Max().x, dBox.Max().y);
-  directions[3] = VssRay::GetDirection(dBox.Min().x, dBox.Max().y);
-  
-  // side planes
-  mPlanes.push_back(Plane3(CrossProd(directions[0], directions[1]), center));
-  mPlanes.push_back(Plane3(CrossProd(directions[1], directions[2]), center));
-  mPlanes.push_back(Plane3(CrossProd(directions[2], directions[3]), center));
-  mPlanes.push_back(Plane3(CrossProd(directions[3], directions[0]), center));
-
-
-  // now make sure all planes contain the spatial box
-  int i, j;
-  for (i=0; i < mPlanes.size(); i++) {
-	for (j=0; j < 8; j++) {
-	  float dist = mPlanes[i].Distance(box.GetVertex(j));
-	  if (dist > 0)
-		mPlanes[i].mD -= dist;
-	}
-  }
-}
-
-// conservative frustum box intersection
-// returns
-// 0 - box intersects the frustum
-// -1 - box intersects the frustum and is fully inside
-// 1 - box does not intersect the frustum
-
-int
-Beam::ComputeIntersection(const  AxisAlignedBox3 &box)
-{
-  int i;
-  int result = -1;
-  for (i=0; i < mPlanes.size(); i++) {
-	int side = box.Side(mPlanes[i]);
-	if (side == 1)
-	  return 1;
-	if (side > result)
-	  result = side;
-  }
-  return result;
-}
