From 7013cc27e27ed1a03349d4afb0a332961c56549f Mon Sep 17 00:00:00 2001 From: panquez Date: Tue, 30 Jul 2024 17:06:22 +0200 Subject: [PATCH] PR review --- src/geode/geometry/intersection.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/geode/geometry/intersection.cpp b/src/geode/geometry/intersection.cpp index 48ffc0f66..8e9851864 100644 --- a/src/geode/geometry/intersection.cpp +++ b/src/geode/geometry/intersection.cpp @@ -374,11 +374,11 @@ namespace geode const Vector3D diff{ vertices[0], line.origin() }; const auto d_dot_q_cross_e2 = sign * line.direction().dot( diff.cross( edge2 ) ); - if( d_dot_q_cross_e2 >= 0 ) + if( d_dot_q_cross_e2 >= -GLOBAL_EPSILON ) { const auto d_dot_e1_cross_q = sign * line.direction().dot( edge1.cross( diff ) ); - if( d_dot_e1_cross_q >= 0 + if( d_dot_e1_cross_q >= -GLOBAL_EPSILON && d_dot_q_cross_e2 + d_dot_e1_cross_q <= d_dot_n ) { // InfiniteLine intersects triangle.