-
Hello! I am trying to compute the intersection between a ray and a tetrahedron. Does anyone know if this is already implemented in Geogram ? Thank you in advance for your help. Best regards. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
Hello, |
Beta Was this translation helpful? Give feedback.
Hello,
The function does not exist in geogram, but it is quite easy to implement,
In
geogram/mesh/mesh_AABB.cpp
, there is aray_triangle_intersection()
function that is used internally, not part of the API now, copy it to your file, then call it four times on the four triangles of your tetrahedron. If needed, I will make it part of the API (in a .h) in a future release.