Functions | |
HC_BOOLEAN | Compute_Polygon_Plane (int count, const HC_POINT *points, const char *hand, HC_PLANE *out_plane) |
HC_BOOLEAN Compute_Polygon_Plane | ( | int | count, |
const HC_POINT * | points, | ||
const char * | hand, | ||
HC_PLANE * | out_plane | ||
) |
count | - Number of xyz triplets in points |
points | - As in Insert_Polygon() , xyz triplets to specify the 3D vertices of the polygon. Must be coplanar. |
hand | - The definition order of the polygon --- "left" or "right". |
out_plane | - Plane equation parameters (a,b,c,d ). Returned to the caller. |
Compute_Polygon_Plane() is similar to Compute_Polygon_Normal() . The first three values are the polygon normal itself; the addition of the fourth value allows you to write the equation of the plane of the polygon in the form ax + by + cz + d = 0. If no plane can be found, false is returned and out_plane is unchanged.
If this function fails, it is often for the same reasons that Compute_Polygon_Normal would as well.