aboutsummaryrefslogtreecommitdiffhomepage
path: root/unsupported/test/BVH.cpp
diff options
context:
space:
mode:
authorGravatar Gael Guennebaud <g.gael@free.fr>2012-06-04 22:01:06 +0200
committerGravatar Gael Guennebaud <g.gael@free.fr>2012-06-04 22:01:06 +0200
commitcb64e587c559131047906e6b5da2093fa5946fda (patch)
tree1aff723c6e6f02e4a225e3c72e375079ddb26a55 /unsupported/test/BVH.cpp
parent945179b26c952f12ca6ea9ad293330cdde7554a0 (diff)
Fix kdBVH unit test
Diffstat (limited to 'unsupported/test/BVH.cpp')
-rw-r--r--unsupported/test/BVH.cpp16
1 files changed, 8 insertions, 8 deletions
diff --git a/unsupported/test/BVH.cpp b/unsupported/test/BVH.cpp
index e77e84b6d..3f9d108de 100644
--- a/unsupported/test/BVH.cpp
+++ b/unsupported/test/BVH.cpp
@@ -24,9 +24,15 @@
#include "main.h"
#include <Eigen/StdVector>
+#include <Eigen/Geometry>
#include <unsupported/Eigen/BVH>
-inline double SQR(double x) { return x * x; }
+namespace Eigen {
+
+template<typename Scalar, int Dim> AlignedBox<Scalar, Dim> bounding_box(const Matrix<Scalar, Dim, 1> &v) { return AlignedBox<Scalar, Dim>(v); }
+
+}
+
template<int Dim>
struct Ball
@@ -41,16 +47,10 @@ EIGEN_MAKE_ALIGNED_OPERATOR_NEW_IF_VECTORIZABLE_FIXED_SIZE(double, Dim)
VectorType center;
double radius;
};
-
-namespace Eigen {
-namespace internal {
-
-template<typename Scalar, int Dim> AlignedBox<Scalar, Dim> bounding_box(const Matrix<Scalar, Dim, 1> &v) { return AlignedBox<Scalar, Dim>(v); }
template<int Dim> AlignedBox<double, Dim> bounding_box(const Ball<Dim> &b)
{ return AlignedBox<double, Dim>(b.center.array() - b.radius, b.center.array() + b.radius); }
-} // end namespace internal
-}
+inline double SQR(double x) { return x * x; }
template<int Dim>
struct BallPointStuff //this class provides functions to be both an intersector and a minimizer, both for a ball and a point and for two trees