intersection_rays_mesh
- intersection_rays_mesh(rays, M)[source]
Compute the intersection(s) between multiple rays and a mesh.
- Parameters:
- rayslist[tuple[list[float], list[float]]]
List of rays, each represented by a point and a direction vector.
- Mtuple[list[list[float]], list[list[int]]]
A mesh represented by a tuple of (vertices, faces) where vertices are 3D points and faces are triangles
- Returns:
- list[list[tuple[int, float, float, float]]]
List of intersection results, one per ray. Each intersection result contains tuples with:
the index of the intersected face
the u coordinate of the intersection in the barycentric coordinates of the face
the u coordinate of the intersection in the barycentric coordinates of the face
the distance between the ray origin and the hit