|
||
int get_plane ( SS_XYZ *xyz1, SS_XYZ *xyz2, SS_XYZ *xyz3, SS_COEF *coef )
SS_XYZ *xyz1; // address of a 3D point SS_XYZ *xyz2; // address of a 3D point SS_XYZ *xyz3; // address of a 3D point
|
|
|
Synopsis |
#include "silver.h"
The get_plane function computes the plane equation Ax + By + Cz + D = 0 of the plane formed by points p1 , p2 and p3 . The plane equation is placed in the coefficient structure coef , where the x , y and z members of coef->abc specifies the A, B and C components of the equation, and coef->d specifies the constant D.
|
|
Parameters |
xyz1 , xyz2 and xyz3 are 3D points that specify the plane. coef is the address of the SS_COEF structure that is to receive the plane coefficients.
|
|
Return Value |
If the points do not specify a plane, get_plane returns 0, and coef is unmodified; otherwise, get_plane returns 1.
|
|
Comments |
The plane equation returned in coef is normalized.
|
|
|
|