Click or drag to resize
IntersectionMeshRay Method (Mesh, Ray3d, Int32)
Finds the first intersection of a ray with a mesh.

Namespace: Rhino.Geometry.Intersect
Assembly: RhinoCommon (in RhinoCommon.dll) Version: 5.1.50000.0 (5.0.20693.0)
Syntax
public static double MeshRay(
	Mesh mesh,
	Ray3d ray,
	out int[] meshFaceIndices
)

Parameters

mesh
Type: Rhino.GeometryMesh
A mesh to intersect.
ray
Type: Rhino.GeometryRay3d
A ray to be casted.
meshFaceIndices
Type: SystemInt32
faces on mesh that ray intersects.

Return Value

Type: Double
>= 0.0 parameter along ray if successful. < 0.0 if no intersection found.
Remarks
The ray may intersect more than one face in cases where the ray hits the edge between two faces or the vertex corner shared by multiple faces.
See Also