mav_linePolygonIntersection(3)

NAME
mav_linePolygonIntersection - Geometrical intersection functions.

LEVEL
Maverik Level 2

SYNTAX
int mav_linePolygonIntersection(MAV_polygon *p, MAV_line ln, MAV_objectIntersection *oi);

int mav_lineInfPlaneIntersection(MAV_vector pt, MAV_vector norm, MAV_line ln, MAV_objectIntersection *oi);

int mav_lineAxisPlaneIntersection(float xmin, float xmax, float ymin, float ymax, float zmin, float zmax, MAV_vector pt, MAV_vector norm, MAV_line ln, MAV_objectIntersection *oi);

DESCRIPTION
These are utility functions for computing intersections between lines and polygons, and lines and planes. Each function returns MAV_TRUE if an intersection was detected, otherwise MAV_FALSE. tests for intersection between line ln and polygon p, returning the closest intersection point (if any) in oi. calculates the intersection of a line ln with a finite axis-aligned plane. The plane is defined by a point pt and plane normal norm. The extent of the plane is defined by providing 3 sets of min/max values, one for each axis. The extent for the two axes over which the plane is defined are set to the appropriate values. The extent for the remaining axis, to which the plane is perpendicular, should be set to +/- MAV_INFINITY.