mav_objectIntersectionsSort(3)

NAME
mav_objectIntersectionsSort - Find nearest in list of object intersections.

LEVEL
Maverik Level 2

SYNTAX
int mav_objectIntersectionsSort(int nhits, MAV_objectIntersection *hits, float scale, MAV_objectIntersection *res);

ARGUMENTS
Number of intersection hits. Array of intersection hits. Scaling factor. Closest intersection.

DESCRIPTION
This function takes an array hits of nhits intersections, and returns in res the intersection closest to the origin of the intersecting line. scale accounts for non-unity scaling of the intersected object.