diff --git a/src/csgterm.cc b/src/csgterm.cc index bfa937b0..dc2a93dc 100644 --- a/src/csgterm.cc +++ b/src/csgterm.cc @@ -74,26 +74,16 @@ shared_ptr CSGTerm::createCSGTerm(type_e type, shared_ptr left const BoundingBox &rightbox = right->getBoundingBox(); Vector3d newmin, newmax; if (type == TYPE_INTERSECTION) { -#if EIGEN_WORLD_VERSION == 2 - newmin = leftbox.min().cwise().max( rightbox.min() ); - newmax = leftbox.max().cwise().min( rightbox.max() ); -#else newmin = leftbox.min().array().cwiseMax( rightbox.min().array() ); newmax = leftbox.max().array().cwiseMin( rightbox.max().array() ); -#endif BoundingBox newbox( newmin, newmax ); if (newbox.isNull()) { return shared_ptr(); // Prune entire product } } else if (type == TYPE_DIFFERENCE) { -#if EIGEN_WORLD_VERSION == 2 - newmin = leftbox.min().cwise().max( rightbox.min() ); - newmax = leftbox.max().cwise().min( rightbox.max() ); -#else newmin = leftbox.min().array().cwiseMax( rightbox.min().array() ); newmax = leftbox.max().array().cwiseMin( rightbox.max().array() ); -#endif BoundingBox newbox( newmin, newmax ); if (newbox.isNull()) { return left; // Prune the negative component @@ -143,23 +133,13 @@ void CSGTerm::initBoundingBox() Vector3d newmin, newmax; switch (this->type) { case TYPE_UNION: -#if EIGEN_WORLD_VERSION == 2 - newmin = leftbox.min().cwise().min( rightbox.min() ); - newmax = leftbox.max().cwise().max( rightbox.max() ); -#else newmin = leftbox.min().array().cwiseMin( rightbox.min().array() ); newmax = leftbox.max().array().cwiseMax( rightbox.max().array() ); -#endif this->bbox = this->m * BoundingBox( newmin, newmax ); break; case TYPE_INTERSECTION: -#if EIGEN_WORLD_VERSION == 2 - newmin = leftbox.min().cwise().max( rightbox.min() ); - newmax = leftbox.max().cwise().min( rightbox.max() ); -#else newmin = leftbox.min().array().cwiseMax( rightbox.min().array() ); newmax = leftbox.max().array().cwiseMin( rightbox.max().array() ); -#endif this->bbox = this->m * BoundingBox( newmin, newmax ); break; case TYPE_DIFFERENCE: diff --git a/src/linalg.h b/src/linalg.h index a8409baf..97d21007 100644 --- a/src/linalg.h +++ b/src/linalg.h @@ -15,13 +15,8 @@ typedef Eigen::AlignedBox BoundingBox; using Eigen::Matrix3f; using Eigen::Matrix3d; using Eigen::Matrix4d; -#if EIGEN_WORLD_VERSION >= 3 #define Transform3d Eigen::Affine3d #define Transform2d Eigen::Affine2d -#else -using Eigen::Transform3d; -using Eigen::Transform2d; -#endif bool matrix_contains_infinity( const Transform3d &m ); bool matrix_contains_nan( const Transform3d &m );