A plane in 3D space in Hessian normal form.
More...
#include <cvb/plane_3d.hpp>
|
| Plane3D () noexcept=default |
| Creates a default plane at (0, 0, 0, 0).
|
|
| Plane3D (double nx, double ny, double nz, double distanceToOrigin) noexcept |
| Creates a new Plane3D object from the given normal vector components and the distanceToOrigin.
|
|
| Plane3D (Point3D< double > normal, double distanceToOrigin) noexcept |
| Creates a new Plane3D object.
|
|
Point3D< double > | Normal () const noexcept |
| Gets the normal vector of the plane.
|
|
void | SetNormal (Point3D< double > normal) noexcept |
| Sets the normal vector of the plane.
|
|
double | DistanceToOrigin () const noexcept |
| Gets the distance to the origin in point units.
|
|
void | SetDistanceToOrigin (double distanceToOrigin) noexcept |
| Sets the distance to the origin in point units.
|
|
double | DistanceToPoint (const Point3D< double > &pt) const noexcept |
| Calculates the distance to the point pt.
|
|
double | DistanceToPoint (double x, double y, double z) const noexcept |
| Calculates the distance to the point pt.
|
|
AffineMatrix3D | AlignToXYPlane () |
| Calculates a rigid body transformation that maps the plane into the xy plane of the global coordinate system.
|
|
bool | operator== (const Plane3D &plane) const noexcept |
| Compares to an other plane.
|
|
bool | operator!= (const Plane3D &plane) const noexcept |
| Compares to an other plane.
|
|
A plane in 3D space in Hessian normal form.
◆ Plane3D() [1/3]
Creates a default plane at (0, 0, 0, 0).
- Exceptions
-
Does | not throw any exception. |
◆ Plane3D() [2/3]
Plane3D |
( |
double | nx, |
|
|
double | ny, |
|
|
double | nz, |
|
|
double | distanceToOrigin ) |
|
inlinenoexcept |
Creates a new Plane3D object from the given normal vector components and the distanceToOrigin.
- Parameters
-
[in] | nx | Normal vector x component. |
[in] | ny | Normal vector y component. |
[in] | nz | Normal vector z component. |
[in] | distanceToOrigin | Distance to origin in point units. |
- Exceptions
-
Does | not throw any exception. |
◆ Plane3D() [3/3]
Creates a new Plane3D object.
- Parameters
-
[in] | normal | Three dimensional point. |
[in] | distanceToOrigin | Distance to origin in point units. |
- Exceptions
-
Does | not throw any exception. |
◆ AlignToXYPlane()
Calculates a rigid body transformation that maps the plane into the xy plane of the global coordinate system.
If a point cloud contains a tilted plane (e.g. representing a conveyer belt), which is not aligned to the xy plane, the following steps should be taken:
- Calulate a plane fit on the data using function FitPlane.
- Align the output plane to the xy plane with AlignToXYPlane.
Please note the following:
◆ DistanceToOrigin()
double DistanceToOrigin |
( |
| ) |
const |
|
inlinenoexcept |
Gets the distance to the origin in point units.
- Returns
- distance to the origin in point units.
- Exceptions
-
Does | not throw any exception. |
◆ DistanceToPoint() [1/2]
double DistanceToPoint |
( |
const Point3D< double > & | pt | ) |
const |
|
inlinenoexcept |
Calculates the distance to the point pt.
- Parameters
-
[in] | pt | Point to calculate the distance to. |
- Returns
- Distance of point pt to this plane.
- Exceptions
-
Does | not throw any exception. |
◆ DistanceToPoint() [2/2]
double DistanceToPoint |
( |
double | x, |
|
|
double | y, |
|
|
double | z ) const |
|
inlinenoexcept |
Calculates the distance to the point pt.
- Parameters
-
[in] | x | Point x component. |
[in] | y | Point y component. |
[in] | z | Point z component. |
- Returns
- Distance of point pt to this plane.
- Exceptions
-
Does | not throw any exception. |
◆ Normal()
Gets the normal vector of the plane.
- Returns
- normal vector.
- Exceptions
-
Does | not throw any exception. |
◆ operator!=()
bool operator!= |
( |
const Plane3D & | plane | ) |
const |
|
inlinenoexcept |
Compares to an other plane.
- Parameters
-
- Returns
- True if not equal, otherwise false.
- Exceptions
-
Does | not throw any exception. |
◆ operator==()
bool operator== |
( |
const Plane3D & | plane | ) |
const |
|
inlinenoexcept |
Compares to an other plane.
- Parameters
-
- Returns
- True if equal, otherwise false.
- Exceptions
-
Does | not throw any exception. |
◆ SetDistanceToOrigin()
void SetDistanceToOrigin |
( |
double | distanceToOrigin | ) |
|
|
inlinenoexcept |
Sets the distance to the origin in point units.
- Parameters
-
[in] | distanceToOrigin | to the origin in point units. |
- Exceptions
-
Does | not throw any exception. |
◆ SetNormal()
void SetNormal |
( |
Point3D< double > | normal | ) |
|
|
inlinenoexcept |
Sets the normal vector of the plane.
- Parameters
-
- Exceptions
-
Does | not throw any exception. |