point_lies_in_face, point_face_angle_sum - does a point lie on the interior of a bounded convex polygon |
#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); |
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). |
Richard Jones <rich@annexia.org> |
GNU LGPL (see http://www.gnu.org/) |
c2lib-1.2.13 |
plane_coefficients(3), point_distance_to_face(3). |