Skip to content

Commit

Permalink
Fix extents
Browse files Browse the repository at this point in the history
  • Loading branch information
masterleinad committed Apr 17, 2024
1 parent 92d6731 commit fd4ef51
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/geometry/ArborX_DetailsAlgorithms.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -613,8 +613,9 @@ struct intersects<BoxTag, TriangleTag, Box, Triangle>
using Point = decltype(a);
Point vector_ab{b[0] - a[0], b[1] - a[1], b[2] - a[2]};
Point vector_ac{c[0] - a[0], c[1] - a[1], c[2] - a[2]};
Point extents{max_corner[0] - min_corner[0], max_corner[1] - min_corner[1],
max_corner[2] - min_corner[2]};
Point extents{(max_corner[0] - min_corner[0]) / 2,
(max_corner[1] - min_corner[1]) / 2,
(max_corner[2] - min_corner[2]) / 2};

// Test normal of the triangle
Point normal{{vector_ab[1] * vector_ac[2] - vector_ab[2] * vector_ac[1],
Expand Down

0 comments on commit fd4ef51

Please sign in to comment.