mav_linePolygonIntersection - Geometrical intersection functions.

[ Maverik Level 2 functions ]

#

mav_linePolygonIntersection

mav_linePolygonIntersection, mav_lineInfPlaneIntersection, mav_lineAxisPlaneIntersection

## Summary

Geometrical intersection functions.

## 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.

- mav_linePolygonIntersection tests for intersection between line `ln` and polygon `p`, returning the closest intersection point (if any) in `oi`.

  = item mav_lineInfPlaneIntersection tests for intersection between the line `ln` and the plane defined by the point `pt` and the normal vector `norm`.

- mav_lineAxisPlaneIntersection 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`.

Back to the index page.