point_lies_in_face(3)

NAME
point_lies_in_face, point_face_angle_sum - does a point lie on the interior of a bounded convex polygon

SYNOPSIS
#include <matvec.h>

int point_lies_in_face (const float *points, int nr_points, const float *point);
float point_face_angle_sum (const float *points, int nr_points, const float *point);

DESCRIPTION

Take a bounded convex polygon (a "face") and a point. The function point_lies_in_face returns true iff the point is both (a) coplanar with the face, and (b) lies inside the edges of the face.

In order to do this, point_lies_in_face calls point_face_angle_sum which works out the sum of the interior angles. If conditions (a) and (b) are both satisfied then the sum of the interior angles will be very close to 2.PI.

The face is expressed as a flat list of points (3-vectors).

AUTHOR
Richard Jones <rich@annexia.org>

LICENSE
GNU LGPL (see http://www.gnu.org/)

VERSION
c2lib-1.2.14

SEE ALSO
plane_coefficients(3), point_distance_to_face(3).