Intersection points of a 3D line with a mesh.
INTERS = intersectLineMesh3d(LINE, VERTICES, FACES)
Compute the intersection points between a 3D line and a 3D mesh defined
by vertices and faces.
[INTERS, POS, INDS] = intersectLineMesh3d(LINE, VERTICES, FACES)
Also returns the position of each intersection point on the input line,
and the index of the intersected faces.
If POS > 0, the point is also on the ray corresponding to the line.
Example
[V, F] = createCube;
line = [.2 .3 .4 1 0 0];
pts = intersectLineMesh3d(line, V, F)
pts =
1.0000 0.3000 0.4000
0 0.3000 0.4000
See also
meshes3d, triangulateFaces, intersectLineTriangle3d
Package: matgeom