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

int nhits
    Number of intersection hits.

MAV_objectIntersection *hits
    Array of intersection hits.

float scale
    Scaling factor.

MAV_objectIntersection *res
    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.