void PTK_Plane_normalize(PTK_Plane *dst, PTK_Plane *src)
Normalize plane parameters so that nx^2+ny^2+nz^2=1.
void PTK_Plane_projectPoint(PTK_Plane *plane, PTK_Point *proj, PTK_Point *point)
Project 3D point onto the plane.
Declarations for PTK_Point and PTK_Vector struct+functions.
float ny
Definition: plane.h:96
float PTK_Plane_dot(const PTK_Plane *plane, const PTK_Point *point)
Dot product between a plane and a 3d point (x,y,z), which is out = x*nx + y*nx + z*nz - d...
int32_t PTK_Plane_set(PTK_Plane *dst, float nx, float ny, float nz, float d)
Set all four values for a point as a convenience function. At least one of nx, ny, nz must be non-zero.
void PTK_Plane_transform(PTK_Plane *dst, PTK_Plane *src, const PTK_RigidTransform *M_dst_src)
Apply the given rigid transformation to represent the plane (given in src reference frame) in dst ref...
float nz
Definition: plane.h:99
Definition of a plane.
Definition: plane.h:90
Definition of a point.
Definition: point.h:136
float nx
Definition: plane.h:93
float d
Definition: plane.h:102
int32_t PTK_Plane_construct(PTK_Plane *plane, PTK_Point *a, PTK_Point *b, PTK_Point *c)
Construct normalized plane from 3 non-colinear points in 3D space by taking cross product...