File tree Expand file tree Collapse file tree 1 file changed +6
-5
lines changed Expand file tree Collapse file tree 1 file changed +6
-5
lines changed Original file line number Diff line number Diff line change @@ -175,14 +175,15 @@ namespace geode
175175 {
176176 const auto & facet_vertices =
177177 Tetrahedron::tetrahedron_facet_vertex[f];
178- const auto volume = tetrahedron_signed_volume (
179- { vertices[facet_vertices[0 ]], vertices[facet_vertices[1 ]],
180- vertices[facet_vertices[2 ]], point } );
181- if ( volume < -10 * global_epsilon )
178+ const Triangle3D facet{ vertices[facet_vertices[0 ]],
179+ vertices[facet_vertices[1 ]], vertices[facet_vertices[2 ]] };
180+ const auto signed_distance =
181+ std::get< 0 >( point_triangle_signed_distance ( point, facet ) );
182+ if ( signed_distance < -global_epsilon )
182183 {
183184 return Position::outside;
184185 }
185- if ( volume < 10 * global_epsilon )
186+ if ( signed_distance < global_epsilon )
186187 {
187188 return point_tetrahedron_position_exact ( point, tetra );
188189 }
You can’t perform that action at this time.
0 commit comments