PCL
pcl::LinearTransformation Class Reference

A linear geometric transformation on the plane defined as a 2x3 matrix of 64-bit floating point scalars. More...

#include <LinearTransformation.h>

Public Member Functions

 LinearTransformation ()=default
 
 LinearTransformation (const LinearTransformation &)=default
 
 LinearTransformation (double a00, double a01, double a02, double a10, double a11, double a12)
 
double A00 () const
 
double A01 () const
 
double A02 () const
 
double A10 () const
 
double A11 () const
 
double A12 () const
 
double Determinant () const
 
LinearTransformation Inverse () const
 
bool IsSingularMatrix () const
 
LinearTransformation Multiply (const LinearTransformation &T) const
 
DPoint operator() (const DPoint &p) const
 
LinearTransformationoperator= (const LinearTransformation &)=default
 
Matrix To2x3Matrix () const
 
Matrix ToMatrix () const
 
String ToString (int indent=0) const
 
Vector ToVector () const
 
DPoint Transform (const DPoint &p) const
 
DPoint TransformInverse (const DPoint &p) const
 

Static Public Member Functions

static LinearTransformation Null ()
 

Detailed Description

LinearTransformation is a simple structure where the six transformation coefficients are stored directly as double scalars. Since the third row of the transformation matrix is (0, 0, 1) implicitly, this class can only represent an affine transformation consisting of translations, rotations and scale changes. This class is primarily intended to support WCS coordinate transformations.

Definition at line 87 of file LinearTransformation.h.

Constructor & Destructor Documentation

◆ LinearTransformation() [1/3]

pcl::LinearTransformation::LinearTransformation ( )
default

Default constructor. Constructs a unit linear transformation.

Referenced by Null().

◆ LinearTransformation() [2/3]

pcl::LinearTransformation::LinearTransformation ( const LinearTransformation )
default

Copy constructor.

◆ LinearTransformation() [3/3]

pcl::LinearTransformation::LinearTransformation ( double  a00,
double  a01,
double  a02,
double  a10,
double  a11,
double  a12 
)
inline

Constructs a linear transformation with the specified matrix elements.

Definition at line 109 of file LinearTransformation.h.

Member Function Documentation

◆ A00()

double pcl::LinearTransformation::A00 ( ) const
inline

Returns the transformation coefficient at the first row, first column.

Definition at line 200 of file LinearTransformation.h.

◆ A01()

double pcl::LinearTransformation::A01 ( ) const
inline

Returns the transformation coefficient at the first row, second column.

Definition at line 208 of file LinearTransformation.h.

◆ A02()

double pcl::LinearTransformation::A02 ( ) const
inline

Returns the transformation coefficient at the first row, third column.

Definition at line 216 of file LinearTransformation.h.

◆ A10()

double pcl::LinearTransformation::A10 ( ) const
inline

Returns the transformation coefficient at the second row, first column.

Definition at line 224 of file LinearTransformation.h.

◆ A11()

double pcl::LinearTransformation::A11 ( ) const
inline

Returns the transformation coefficient at the second row, second column.

Definition at line 232 of file LinearTransformation.h.

◆ A12()

double pcl::LinearTransformation::A12 ( ) const
inline

Returns the transformation coefficient at the third row, third column.

Definition at line 240 of file LinearTransformation.h.

◆ Determinant()

double pcl::LinearTransformation::Determinant ( ) const
inline

Returns the determinant of the transformation matrix.

Definition at line 119 of file LinearTransformation.h.

◆ Inverse()

LinearTransformation pcl::LinearTransformation::Inverse ( ) const
inline

Returns the inverse of this transformation.

If the transformation matrix is singular, this member function throws an Error exception.

Definition at line 185 of file LinearTransformation.h.

References IsSingularMatrix().

◆ IsSingularMatrix()

bool pcl::LinearTransformation::IsSingularMatrix ( ) const
inline

Returns true if this transformation has been defined by a singular matrix. A singular matrix has zero or insignificant (with respect to the machine epsilon for double) determinant and hence cannot be inverted.

Definition at line 129 of file LinearTransformation.h.

Referenced by Inverse(), and TransformInverse().

◆ Multiply()

LinearTransformation pcl::LinearTransformation::Multiply ( const LinearTransformation T) const
inline

Returns the product of this transformation by a transformation T.

Definition at line 169 of file LinearTransformation.h.

◆ Null()

static LinearTransformation pcl::LinearTransformation::Null ( )
inlinestatic

Returns a LinearTransformation instance representing a singular matrix with all its elements set to zero.

Definition at line 302 of file LinearTransformation.h.

References LinearTransformation().

◆ operator()()

DPoint pcl::LinearTransformation::operator() ( const DPoint p) const
inline

Returns the transformation of the specified point p. This operator is equivalent to the Transform() member function.

Definition at line 147 of file LinearTransformation.h.

References Transform().

◆ operator=()

LinearTransformation& pcl::LinearTransformation::operator= ( const LinearTransformation )
default

Copy assignment operator. Returns a reference to this object.

◆ To2x3Matrix()

Matrix pcl::LinearTransformation::To2x3Matrix ( ) const
inline

Returns a 2x3 matrix initialized with the transformation coefficients in this object.

Definition at line 260 of file LinearTransformation.h.

◆ ToMatrix()

Matrix pcl::LinearTransformation::ToMatrix ( ) const
inline

Returns a 3x3 matrix initialized with the transformation coefficients in this object.

Definition at line 249 of file LinearTransformation.h.

◆ ToString()

String pcl::LinearTransformation::ToString ( int  indent = 0) const
inline

Returns a string representation of the transformation matrix. The representation consists of two text lines, each with indent leading spaces, separated by a newline character.

Definition at line 286 of file LinearTransformation.h.

◆ ToVector()

Vector pcl::LinearTransformation::ToVector ( ) const
inline

Returns a six-component vector initialized with the transformation coefficients in this object.

Definition at line 276 of file LinearTransformation.h.

◆ Transform()

DPoint pcl::LinearTransformation::Transform ( const DPoint p) const
inline

Returns the transformation of the specified point p.

Definition at line 137 of file LinearTransformation.h.

References pcl::GenericPoint< T >::x, and pcl::GenericPoint< T >::y.

Referenced by operator()().

◆ TransformInverse()

DPoint pcl::LinearTransformation::TransformInverse ( const DPoint p) const
inline

Returns the inverse transformation of the specified point p.

If the transformation matrix is singular, this member function throws an Error exception.

Definition at line 158 of file LinearTransformation.h.

References IsSingularMatrix().


The documentation for this class was generated from the following file: