intersection_ray_mesh
-
compas.geometry.
intersection_ray_mesh
(ray, mesh)[source] Compute the intersection(s) between a ray and a mesh.
- Parameters
ray (tuple of point and vector) – A ray represented by a point and a direction vector.
mesh (tuple of vertices and faces) – A mesh represented by a list of vertices and a list of faces.
- Returns
list of tuple – Per intersection of the ray with the mesh:
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
Examples
>>>