Click or drag to resize
AB4D logo

OptimizedPointMeshTGetClosestPositionIndex Method

Overload List
 NameDescription
Public methodGetClosestPositionIndex(Ray) 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).
Public methodGetClosestPositionIndex(Ray, Single) Returns an index of the position that is the closest to the specified ray. The method also sets the distance to the out parameter. 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 and distance is set to NaN.
Top
See Also