Skip to content
Snippets Groups Projects
Commit f670becb authored by Tom Fischer's avatar Tom Fischer
Browse files

[GL] Use Eigen functions instead scalarTriple.

parent b359e305
No related branches found
No related tags found
No related merge requests found
...@@ -377,17 +377,17 @@ std::unique_ptr<GeoLib::Point> triangleLineIntersection( ...@@ -377,17 +377,17 @@ std::unique_ptr<GeoLib::Point> triangleLineIntersection(
Eigen::Vector3d const pb = vb - vp; Eigen::Vector3d const pb = vb - vp;
Eigen::Vector3d const pc = vc - vp; Eigen::Vector3d const pc = vc - vp;
double u(MathLib::scalarTriple(pq, pc, pb)); double u = pq.cross(pc).dot(pb);
if (u < 0) if (u < 0)
{ {
return nullptr; return nullptr;
} }
double v(MathLib::scalarTriple(pq, pa, pc)); double v = pq.cross(pa).dot(pc);
if (v < 0) if (v < 0)
{ {
return nullptr; return nullptr;
} }
double w(MathLib::scalarTriple(pq, pb, pa)); double w = pq.cross(pb).dot(pa);
if (w < 0) if (w < 0)
{ {
return nullptr; return nullptr;
......
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