M_Rhino_Geometry_Intersect_Intersection_MeshRay_1 - mcneel/rhinocommon-api-docs GitHub Wiki

Intersection.MeshRay Method (Mesh, Ray3d, Int32[])

Finds the first intersection of a ray with a mesh.

Namespace: Rhino.Geometry.Intersect
Assembly: RhinoCommon (in RhinoCommon.dll) Version: Rhino 6.0

Syntax

C#

public static double MeshRay(
	Mesh mesh,
	Ray3d ray,
	out int[] meshFaceIndices
)

VB

Public Shared Function MeshRay ( 
	mesh As Mesh,
	ray As Ray3d,
	<OutAttribute> ByRef meshFaceIndices As Integer()
) As Double

Parameters

 

mesh
Type: Rhino.Geometry.Mesh
A mesh to intersect.
ray
Type: Rhino.Geometry.Ray3d
A ray to be casted.
meshFaceIndices
Type: System.Int32[]
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.

Version Information

Supported in: 6.0.16224.21491, 5D58w

See Also

Reference

Intersection Class
MeshRay Overload
Rhino.Geometry.Intersect Namespace

⚠️ **GitHub.com Fallback** ⚠️