aboutsummaryrefslogtreecommitdiffhomepage
path: root/unsupported/test/BVH.cpp
diff options
context:
space:
mode:
authorGravatar Benoit Jacob <jacob.benoit.1@gmail.com>2010-10-25 10:15:22 -0400
committerGravatar Benoit Jacob <jacob.benoit.1@gmail.com>2010-10-25 10:15:22 -0400
commit4716040703be1ee906439385d20475dcddad5ce3 (patch)
tree8efd3cf3007d8360e66f38e2d280127cbb70daa6 /unsupported/test/BVH.cpp
parentca85a1f6c5fc33ac382aa2d7ba2da63d55d3223e (diff)
bug #86 : use internal:: namespace instead of ei_ prefix
Diffstat (limited to 'unsupported/test/BVH.cpp')
-rw-r--r--unsupported/test/BVH.cpp16
1 files changed, 10 insertions, 6 deletions
diff --git a/unsupported/test/BVH.cpp b/unsupported/test/BVH.cpp
index 4abf7f5bd..ba5871e66 100644
--- a/unsupported/test/BVH.cpp
+++ b/unsupported/test/BVH.cpp
@@ -42,11 +42,15 @@ EIGEN_MAKE_ALIGNED_OPERATOR_NEW_IF_VECTORIZABLE_FIXED_SIZE(double, Dim)
double radius;
};
+namespace Eigen {
+namespace internal {
-template<typename Scalar, int Dim> AlignedBox<Scalar, Dim> ei_bounding_box(const Matrix<Scalar, Dim, 1> &v) { return AlignedBox<Scalar, Dim>(v); }
-template<int Dim> AlignedBox<double, Dim> ei_bounding_box(const Ball<Dim> &b)
+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
+}
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
@@ -113,7 +117,7 @@ struct TreeTest
{
BallTypeList b;
for(int i = 0; i < 500; ++i) {
- b.push_back(BallType(VectorType::Random(), 0.5 * ei_random(0., 1.)));
+ b.push_back(BallType(VectorType::Random(), 0.5 * internal::random(0., 1.)));
}
KdBVH<double, Dim, BallType> tree(b.begin(), b.end());
@@ -132,7 +136,7 @@ struct TreeTest
{
BallTypeList b;
for(int i = 0; i < 500; ++i) {
- b.push_back(BallType(VectorType::Random(), 0.01 * ei_random(0., 1.)));
+ b.push_back(BallType(VectorType::Random(), 0.01 * internal::random(0., 1.)));
}
KdBVH<double, Dim, BallType> tree(b.begin(), b.end());
@@ -155,7 +159,7 @@ struct TreeTest
VectorTypeList v;
for(int i = 0; i < 50; ++i) {
- b.push_back(BallType(VectorType::Random(), 0.5 * ei_random(0., 1.)));
+ b.push_back(BallType(VectorType::Random(), 0.5 * internal::random(0., 1.)));
for(int j = 0; j < 3; ++j)
v.push_back(VectorType::Random());
}
@@ -180,7 +184,7 @@ struct TreeTest
VectorTypeList v;
for(int i = 0; i < 50; ++i) {
- b.push_back(BallType(VectorType::Random(), 1e-7 + 1e-6 * ei_random(0., 1.)));
+ b.push_back(BallType(VectorType::Random(), 1e-7 + 1e-6 * internal::random(0., 1.)));
for(int j = 0; j < 3; ++j)
v.push_back(VectorType::Random());
}