Click or drag to resize

IntersectionMeshRays Method (Mesh, IEnumerableRay3d)

Finds the first intersection of each one of a set of rays with a mesh.

Namespace:  Rhino.Geometry.Intersect
Assembly:  RhinoCommon (in RhinoCommon.dll)
Since: 9.0
Syntax
public static double[] MeshRays(
	Mesh mesh,
	IEnumerable<Ray3d> rays
)

Parameters

mesh
Type: Rhino.GeometryMesh
A mesh to intersect.
rays
Type: System.Collections.GenericIEnumerableRay3d
The rays to cast.

Return Value

Type: Double
One value for each ray, in the order of the rays: the parameter along that ray of its first intersection with the mesh, or a value smaller than 0.0 where that ray does not meet the mesh. Null when the mesh or the set of rays is null.
Remarks
The rays are cast on several threads, so this is much faster than one call of MeshRay(Mesh, Ray3d) per ray.
See Also