Skip to content
Snippets Groups Projects
Unverified Commit 64e4d0ba authored by Joseph Mirabel's avatar Joseph Mirabel Committed by GitHub
Browse files

Remove preprocessor if/else

parent 27325bb0
No related branches found
No related tags found
No related merge requests found
......@@ -317,11 +317,8 @@ bool obbDisjointAndLowerBoundDistance (const Matrix3f& B, const Vec3f& T,
// Corner of b axis aligned bounding box the closest to the origin
Vec3f AABB_corner (T.cwiseAbs () - Bf * b);
Vec3f diff3 (AABB_corner - a);
#if EIGEN_VERSION_AT_LEAST(3,1,0)
diff3 = diff3.cwiseMax (0);
#else
diff3 = diff3.cwiseMax (Vec3f::Zero());
#endif
//for (Vec3f::Index i=0; i<3; ++i) diff3 [i] = std::max (0, diff3 [i]);
squaredLowerBoundDistance = diff3.squaredNorm ();
if (squaredLowerBoundDistance > breakDistance2)
......@@ -330,11 +327,7 @@ bool obbDisjointAndLowerBoundDistance (const Matrix3f& B, const Vec3f& T,
AABB_corner = (B.transpose () * T).cwiseAbs () - Bf.transpose () * a;
// diff3 = | B^T T| - b - Bf^T a
diff3 = AABB_corner - b;
#if EIGEN_VERSION_AT_LEAST(3,1,0)
diff3 = diff3.cwiseMax (0);
#else
diff3 = diff3.cwiseMax (Vec3f::Zero());
#endif
squaredLowerBoundDistance = diff3.squaredNorm ();
if (squaredLowerBoundDistance > breakDistance2)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment