point_distance_to_plane, point_is_inside_plane - distance from point to plane |
#include <matvec.h> float point_distance_to_plane (const float *plane, const float *point); int point_is_inside_plane (const float *plane, const float *point); |
point_distance_to_plane calculates the (shortest) distance from the point point to the plane plane. This distance is positive if the point is "inside" the plane -- that is, if the normal vector drawn from the plane points towards the point. It is negative if the point is "outside" the plane. It is zero if the point lies on the plane. |
point_is_inside_plane returns true if the point is strictly inside the plane, and false if the point lies on the plane or is outside. It is much faster to compute this than to use point_distance_to_plane and take the sign of the result. |
Richard Jones <rich@annexia.org> |
GNU LGPL (see http://www.gnu.org/) |
c2lib-1.2.13 |
plane_coefficients(3), point_distance_to_face(3). |