diff --git a/GeoLib/MinimalBoundingSphere.cpp b/GeoLib/MinimalBoundingSphere.cpp index 115cc7facd20af4b668d8fac998322a486435f9b..64bac9e610f2a67888502bd13a7313495ae3f240 100644 --- a/GeoLib/MinimalBoundingSphere.cpp +++ b/GeoLib/MinimalBoundingSphere.cpp @@ -94,7 +94,7 @@ MinimalBoundingSphere::MinimalBoundingSphere(MathLib::Point3d const& p, if (!MathLib::isCoplanar(p, q, r, s)) { - double const denom = 2.0 * MathLib::scalarTriple(va, vb, vc); + double const denom = 2.0 * va.cross(vb).dot(vc); Eigen::Vector3d o = (vc.dot(vc) * va.cross(vb) + vb.dot(vb) * vc.cross(va) + va.dot(va) * vb.cross(vc)) / diff --git a/MathLib/MathTools.cpp b/MathLib/MathTools.cpp index 996c04d316c5b9b00a59829c5bfd5503871ca902..ba12e31768e97b348630d1809863e21419062e45 100644 --- a/MathLib/MathTools.cpp +++ b/MathLib/MathTools.cpp @@ -52,10 +52,4 @@ double getAngle(Point3d const& p0, Point3d const& p1, Point3d const& p2) return std::acos(v0.dot(v1) / (v0.norm() * v1.norm())); } -double scalarTriple(Eigen::Vector3d const& u, Eigen::Vector3d const& v, - Eigen::Vector3d const& w) -{ - return u.cross(v).dot(w); -} - } // namespace MathLib diff --git a/MathLib/MathTools.h b/MathLib/MathTools.h index 699d3ff7225ed3ea8c2368d25c29b90ad54060d2..812fb833fc922bb493594e4edd4392b05a58b889 100644 --- a/MathLib/MathTools.h +++ b/MathLib/MathTools.h @@ -91,8 +91,4 @@ double calcProjPntToLineAndDists(MathLib::Point3d const& pp, * @return the angle between the edges */ double getAngle(Point3d const& p0, Point3d const& p1, Point3d const& p2); - -/// Calculates the scalar triple (u x v) . w -double scalarTriple(Eigen::Vector3d const& u, Eigen::Vector3d const& v, - Eigen::Vector3d const& w); } // namespace MathLib