From 4716040703be1ee906439385d20475dcddad5ce3 Mon Sep 17 00:00:00 2001 From: Benoit Jacob Date: Mon, 25 Oct 2010 10:15:22 -0400 Subject: bug #86 : use internal:: namespace instead of ei_ prefix --- unsupported/test/BVH.cpp | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) (limited to 'unsupported/test/BVH.cpp') 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 AlignedBox ei_bounding_box(const Matrix &v) { return AlignedBox(v); } -template AlignedBox ei_bounding_box(const Ball &b) +template AlignedBox bounding_box(const Matrix &v) { return AlignedBox(v); } +template AlignedBox bounding_box(const Ball &b) { return AlignedBox(b.center.array() - b.radius, b.center.array() + b.radius); } +} // end namespace internal +} template 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 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 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()); } -- cgit v1.2.3