Click or drag to resize
AB4D logo

OptimizedPointMeshTGetClosestPositionIndex(Ray) Method

Returns an index of the position that is the closest to the specified ray. The method is highly optimized and checks only the segments that ray goes through (ray intersects segment's bounding box) and this significantly reduces the number of checked positions. When no segment is hit by the ray, then -1 is returned. To also get the distance to the ray use the GetClosestPositionIndex(Ray, Single).

Namespace: Ab3d.DirectX
Assembly: Ab3d.DXEngine (in Ab3d.DXEngine.dll) Version: 7.0.8865.1045
Syntax
C#
public int GetClosestPositionIndex(
	Ray ray
)

Parameters

ray  Ray
SharpDX.Ray

Return Value

Int32
an index of the position that is the closest to the specified ray; or -1 when no segment is hit by the ray
See Also