Helios++
Helios software for LiDAR simulations
rigidmotion::RigidMotion Class Reference

Interface that must be implemented by any class which represents a specific rigid motions. More...

#include <RigidMotion.h>

Inheritance diagram for rigidmotion::RigidMotion:

Public Types

enum  SuperType {
  R2_BASE , R2_REFLECTION , R2_ROTATION , R3_BASE ,
  R3_REFLECTION , R3_ROTATION , R3_ROTATIONAL_SYMMETRY
}
 Rigid motions supertypes. It is, the classification of a rigid motion attending to its fixed origin transformation matrix \(A\) only. More...
 
enum  Type {
  IDENTITY_R2 , TRANSLATION_R2 , REFLECTION_R2 , GLIDE_REFLECTION_R2 ,
  ROTATION_R2 , IDENTITY_R3 , TRANSLATION_R3 , REFLECTION_R3 ,
  GLIDE_REFLECTION_R3 , ROTATION_R3 , HELICAL_R3 , ROTATIONAL_SYMMETRY_R3
}
 Rigid motions types. It is, the classification of a rigid motion attending to its associated isometry and fixed points. More...
 

Public Member Functions

 RigidMotion ()=default
 RigidMotion default constructor. Notice rigid motions should be instantiated through corresponding factories. More...
 
 RigidMotion (colvec const &C, arma::mat const &A)
 Build a rigid motion with given translation vector and fixed origin transformation matrix. More...
 
virtual RigidMotion compose (RigidMotion const rm) const
 Compose this rigid motion \(f\) with given rigid motion \(g\) so \(f \circ g = f(g(x))\) is obtained. More...
 
virtual void composeInPlace (RigidMotion const rm)
 Like compose method but updating this rigid motion instead of returning a new one. More...
 
virtual SuperType findSuperType () const
 Obtain the supertype of the rigid motion. More...
 
virtual bool hasFixedPoints () const
 Check if rigid motion has fixed points. More...
 
virtual Type findType () const
 Obtain the type of the rigid motion. More...
 
virtual size_t findInvariantDimensionality () const
 Obtain the dimensionality of the associated invariant which can be either the set of fixed points or the associated invariant variety if there are no fixed points. More...
 
colvec getC () const
 Get the translation column vector. More...
 
void setC (colvec const C)
 Set the translation column vector. More...
 
arma::mat getA () const
 Get the fixed origin transformation matrix. More...
 
void setA (arma::mat const A)
 Set the fixed origin transformation matrix. More...
 
size_t getDimensionality () const
 Get the dimensionality of the rigid motion. More...
 

Protected Attributes

colvec C
 The column vector representing the translation.
 
arma::mat A
 The matrix representing the fixed origin transformation.
 

Private Member Functions

template<typename Archive >
void serialize (Archive &ar, const unsigned int version)
 Serialize a rigid motion to a stream of bytes. More...
 

Friends

class boost::serialization::access
 

Detailed Description

Interface that must be implemented by any class which represents a specific rigid motions.

Author
Alberto M. Esmoris Pena
Version
1.0

A rigid motion is an affine application which preserves the distance between points. It is both, an endomorphism and an isometry. Any rigid motion in an affine euclidean space can be expressed as a composition of a transformation which preserves the origin with a translation. Thus \(f\) is a rigid motion if it satisfies:

\[ \left\{\begin{array}{lll} f & : &\mathcal{A} \rightarrow \mathcal{A} \\ \left\Vert{\overrightarrow{AB}}\right\Vert & = & \left\Vert{\overrightarrow{f(A)f(B)}}\right\Vert \end{array}\right. \]

Any rigid motion can be expressed as an affine application \(Y = C + AX\) and also in block matrix notation as follows:

\[ \left[\begin{array}{c|c} 1 & 0 \\ \hline C & A \end{array}\right] = \left[\begin{array}{c|c} 1 & 0 \\ \hline C & I \end{array}\right] \left[\begin{array}{c|c} 1 & 0 \\ \hline 0 & A \end{array}\right] \]

Member Enumeration Documentation

◆ SuperType

Rigid motions supertypes. It is, the classification of a rigid motion attending to its fixed origin transformation matrix \(A\) only.

For instance, a reflection and a glide reflection would be different types which share the same supertype (reflection).

The supertype is determined attending to \(\mathrm{rank}\left(I-A\right)\)

NOTICE both identity and translation transformations are considered as base supertype, since both of them have \(\mathrm{rank}\left(I-A\right) = 0\)

See also
rigidmotion::RigidMotion::findSuperType

◆ Type

Rigid motions types. It is, the classification of a rigid motion attending to its associated isometry and fixed points.

The type is fully determined attending to:

\[ \left\{\begin{array}{l} \mathrm{rank}\left(I-A\right) \\ \mathrm{rank}\left(I-A | C\right) \end{array}\right. \]

See also
rigidmotion::RigidMotion::findType

Constructor & Destructor Documentation

◆ RigidMotion() [1/2]

rigidmotion::RigidMotion::RigidMotion ( )
default

RigidMotion default constructor. Notice rigid motions should be instantiated through corresponding factories.

See also
rigidmotion::RigidMotionFactory

◆ RigidMotion() [2/2]

rigidmotion::RigidMotion::RigidMotion ( colvec const &  C,
arma::mat const &  A 
)
inline

Build a rigid motion with given translation vector and fixed origin transformation matrix.

Parameters
CTranslation vector
AFixed origin transformation matrix
See also
rigidmotion::RigidMotion::C
rigidmotion::RigidMotion::A

Member Function Documentation

◆ compose()

RigidMotion RigidMotion::compose ( RigidMotion const  rm) const
virtual

Compose this rigid motion \(f\) with given rigid motion \(g\) so \(f \circ g = f(g(x))\) is obtained.

Parameters
rmRigid motion to compose with, it is also notated as \(g\)
Returns
Rigid motion resulting from composition. It can be notated as \(f \circ g = f(g(x))\).

◆ composeInPlace()

void RigidMotion::composeInPlace ( RigidMotion const  rm)
virtual

Like compose method but updating this rigid motion instead of returning a new one.

See also
rigidmotion::RigidMotion::compose(RigidMotion)

◆ findInvariantDimensionality()

size_t RigidMotion::findInvariantDimensionality ( ) const
virtual

Obtain the dimensionality of the associated invariant which can be either the set of fixed points or the associated invariant variety if there are no fixed points.

The dimensionality \(d\) of the associated invariant can be obtained computing as follows, where \(n\) is the dimensionality of the space for which the rigid motion is defined:

\[ d = n - \mathrm{rank}\left(I-A\right) \]

A dimension of \(0\) means the associated invariant is a point, a dimension of \(1\) means it is a line, a dimension of \(2\) means it is a plane and for the general case a dimension of \(d\) means the associated invariant is a \(d\)-dimensional hyperplane

Returns
Dimensionality of the associated invariant

◆ findSuperType()

RigidMotion::SuperType RigidMotion::findSuperType ( ) const
virtual

Obtain the supertype of the rigid motion.

Returns
Rigid motion supertype
See also
rigidmotion::RigidMotion::SuperType

◆ findType()

RigidMotion::Type RigidMotion::findType ( ) const
virtual

Obtain the type of the rigid motion.

Returns
Rigid motion type
See also
rigidmotion::RigidMotion::Type

◆ getA()

arma::mat rigidmotion::RigidMotion::getA ( ) const
inline

Get the fixed origin transformation matrix.

Returns
Fixed origin transformation matrix of the rigid motion

◆ getC()

colvec rigidmotion::RigidMotion::getC ( ) const
inline

Get the translation column vector.

Returns
Translation column vector of the rigid motion

◆ getDimensionality()

size_t rigidmotion::RigidMotion::getDimensionality ( ) const
inline

Get the dimensionality of the rigid motion.

Returns
Rigid motion dimensionality

◆ hasFixedPoints()

bool RigidMotion::hasFixedPoints ( ) const
virtual

Check if rigid motion has fixed points.

A rigid motion is said to have fixed points by applying Rouché-Frobenius theorem to check if the system \((I-A | C)\) can be solved or not. Thus, if \(\mathrm{rank}(I-A) = \mathrm{rank}(I-A|C)\) the system has solution and hence fixed points. Otherwise, the system cannot be solved so there are no fixed points.

Returns
True if rigid motion has fixed points, false otherwise

◆ serialize()

template<typename Archive >
void rigidmotion::RigidMotion::serialize ( Archive &  ar,
const unsigned int  version 
)
inlineprivate

Serialize a rigid motion to a stream of bytes.

Template Parameters
ArchiveType of rendering
Parameters
arSpecific rendering for the stream of bytes
versionVersion number for the rigid motion

◆ setA()

void rigidmotion::RigidMotion::setA ( arma::mat const  A)
inline

Set the fixed origin transformation matrix.

Parameters
ANew fixed origin transformation matrix for the rigid motion

◆ setC()

void rigidmotion::RigidMotion::setC ( colvec const  C)
inline

Set the translation column vector.

Parameters
CNew translation column vector for the rigid motion

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