![]() |
Perception Tool Kit (PTK) API Guide
|
![]() |
Data Structures | |
struct | PTK_Plane |
Definition of a plane. More... | |
Functions | |
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. More... | |
void | PTK_Plane_normalize (PTK_Plane *dst, PTK_Plane *src) |
Normalize plane parameters so that nx^2+ny^2+nz^2=1. More... | |
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 reference frame. Output plane will have the same normalization factor as the input plane. More... | |
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. If the plane is the normalized, then out is the signed distance of the point from the plane, where positive is in the direction of the normal vector. More... | |
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. More... | |
void | PTK_Plane_projectPoint (PTK_Plane *plane, PTK_Point *proj, PTK_Point *point) |
Project 3D point onto the plane. More... | |
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.
[in,out] | dst | Pointer to Plane to be modified |
[in] | nx | New nx value |
[in] | ny | New ny value |
[in] | nz | New nz value |
[in] | d | New d value |
return
Normalize plane parameters so that nx^2+ny^2+nz^2=1.
[in,out] | src | Pointer to input plane |
[in,out] | dst | Pointer to normalized plane. Can be same as src. |
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 reference frame. Output plane will have the same normalization factor as the input plane.
[in] | src | Pointer to source plane |
[in,out] | dst | Pointer to destination plane, which may be the same as src |
[in] | M_dst_src | The rigid transformation to be applied |
Dot product between a plane and a 3d point (x,y,z), which is out = x*nx + y*nx + z*nz - d. If the plane is the normalized, then out is the signed distance of the point from the plane, where positive is in the direction of the normal vector.
[in] | plane | Pointer to plane |
[in] | point | Pointer to point |
Construct normalized plane from 3 non-colinear points in 3D space by taking cross product.
[out] | plane | Pointer to normalized plane. |
[in] | a | Pointer to first point. |
[in] | b | Pointer to second point. |
[in] | c | Pointer to third point. |
return