CVB.Net 15.0
Plane Struct Reference

A plane in 3D space in Hessian normal form. More...

Public Member Functions

 Plane (double nx, double ny, double nz, double distanceToOrigin)
 Creates a new Plane object from the given normal vector components and the distanceToOrigin . More...
 
 Plane (Point3Dd normal, double distanceToOrigin)
 Creates a new Plane object. More...
 
double DistanceToPoint (Point3Df pt)
 Calculates the distance to the point pt . More...
 
double DistanceToPoint (Point3Dd pt)
 Calculates the distance to the point pt . More...
 
double DistanceToPoint (double x, double y, double z)
 Calculates the distance to the point given by its components. More...
 
AffineMatrix3D AlignToXYPlane ()
 Calculates a rigid body transformation that maps the plane into the xy plane of the global coordinate system. More...
 

Properties

Point3Dd Normal [get, set]
 The normal vector of the plane.
 
double DistanceToOrigin [get, set]
 Distance to the origin in point units.
 

Detailed Description

A plane in 3D space in Hessian normal form.

Constructor & Destructor Documentation

◆ Plane() [1/2]

Plane ( double  nx,
double  ny,
double  nz,
double  distanceToOrigin 
)

Creates a new Plane object from the given normal vector components and the distanceToOrigin .

Parameters
nxNormal vector x component.
nyNormal vector y component.
nzNormal vector z component
distanceToOriginDistance to origin in point units.

◆ Plane() [2/2]

Plane ( Point3Dd  normal,
double  distanceToOrigin 
)

Creates a new Plane object.

Parameters
normalNormal vector.
distanceToOriginDistance to origin in point units.

Member Function Documentation

◆ AlignToXYPlane()

AffineMatrix3D 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:

  1. Calulate a plane fit on the data using function FitPlane.
  2. Align the output plane to the xy plane with AlignToXYPlane.

Please note the following:

  • The transformation includes only a rotation about x and y axis. The resulting transformation will not contain any rotation about the global Z-axis.
  • The translation to the origin of the global coordinate system is done along z axis.
Returns
Calculated transformation to move the plane to xy plane.

◆ DistanceToPoint() [1/3]

double DistanceToPoint ( double  x,
double  y,
double  z 
)

Calculates the distance to the point given by its components.

Parameters
xPoint x component.
yPoint y component.
zPoint z component.
Returns
Distance to this plane.

◆ DistanceToPoint() [2/3]

double DistanceToPoint ( Point3Dd  pt)

Calculates the distance to the point pt .

Parameters
ptPoint to calculate the distance to.
Returns
Distance of point pt to this plane.

◆ DistanceToPoint() [3/3]

double DistanceToPoint ( Point3Df  pt)

Calculates the distance to the point pt .

Parameters
ptPoint to calculate the distance to.
Returns
Distance of point pt to this plane.