MIRA
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Public Types | Public Member Functions | Public Attributes | Protected Member Functions | Static Protected Member Functions | Friends | List of all members
RigidTransform< T, 3 > Class Template Reference

Specialization of RigidTransform for 3 dimensions. More...

#include <transform/RigidTransform.h>

Inheritance diagram for RigidTransform< T, 3 >:
Inheritance graph
[legend]

Public Types

enum  
 
typedef T Type
 The used floating point type (float, double, long double) More...
 
typedef Eigen::Matrix< T, D, 1 > TranslationType
 Vector type used to represent the translational part (dimension depends on dimensionality of transform). More...
 
typedef Eigen::Quaternion< T > RotationType
 Type used to represent the rotational part (Eigen::Rotation2D for 2D transforms, Eigen::Quaternion for 3D transforms) More...
 
typedef Eigen::Matrix< T, HDim,
HDim
MatrixType
 Type of the matrix that can describe the full affine transform in homogeneous space. More...
 

Public Member Functions

 RigidTransform ()
 
 RigidTransform (const Eigen::Matrix< T, 3, 1 > &translation, const Eigen::Quaternion< T > &rotation)
 
 RigidTransform (T x, T y, T z, T yaw, T pitch, T roll)
 
template<typename U >
RigidTransform< U, 3 > cast () const
 Returns *this casted to U. More...
 
T & x ()
 Returns the x-coordinate of the translational part of the transform. More...
 
x () const
 Returns the x-coordinate of the translational part of the transform. More...
 
T & y ()
 Returns the y-coordinate of the translational part of the transform. More...
 
y () const
 Returns the y-coordinate of the translational part of the transform. More...
 
T & z ()
 Returns the z-coordinate of the translational part of the transform. More...
 
z () const
 Returns the z-coordinate of the translational part of the transform. More...
 
yaw () const
 Returns the yaw angle in rad (This corresponds to phi in a 2D transform). More...
 
pitch () const
 Returns the pitch angle in rad. More...
 
roll () const
 Returns the roll angle in rad. More...
 
template<typename Derived >
void reflect (BinarySerializer< Derived > &r)
 
template<typename Derived >
void reflect (BinaryDeserializer< Derived > &r)
 
template<typename Reflector >
void reflectRead (Reflector &r)
 
template<typename Reflector >
void reflectWrite (Reflector &r)
 
RigidTransform< T, 3 > inverse () const
 Computes and returns the inverse transform of this. More...
 
bool isApprox (const RigidTransformBase &other, T prec=std::numeric_limits< T >::epsilon()) const
 Returns true if this is approximately equal to other, within the precision determined by prec. More...
 
RigidTransform< T, 3 > & operator*= (const RigidTransformBase &other)
 Concatenates this transform with an other transform. More...
 
ei_rigidtransform_product_impl
< D, RigidTransform< T, 3 >
, OtherDerived >::TResult 
operator* (const Eigen::MatrixBase< OtherDerived > &other) const
 Apply the transformation to an Eigen matrix. More...
 
 operator Eigen::Transform< T, D, Eigen::Isometry > ()
 Cast operator that casts the rigid transform into a generic Eigen::Transform object. More...
 
MatrixType getMatrix () const
 Computes and returns the matrix that describes the affine transformation in homogeneous space. More...
 

Public Attributes

TranslationType t
 Vector that describes the translational part of the transform. More...
 
RotationType r
 The rotational part of the transform. More...
 

Protected Member Functions

RigidTransform< T, 3 > * This ()
 casts this to the actual derived type (see Curiously recurring template pattern) More...
 
const RigidTransform< T, 3 > * This () const
 casts this to the actual derived type (see Curiously recurring template pattern) More...
 

Static Protected Member Functions

static RigidTransform< T, 3 > mul (const RigidTransformBase &a, const RigidTransformBase &b)
 

Friends

MIRA_SPLIT_REFLECT_MEMBER
friend std::ostream & 
operator<< (std::ostream &os, const RigidTransform &tf)
 

Detailed Description

template<typename T>
class mira::RigidTransform< T, 3 >

Specialization of RigidTransform for 3 dimensions.

This class represents an affine transformation that supports a translation followed by a rotation (a so called rigid transform). A rigid transformation is one in which the pre-image and the image both has the exact same size and shape.

These limitations are sufficient for our purposes (rigid body transform, transformation of coordinate frames, etc) and allows efficient computation of the operations. Moreover, the limitation to rigid transforms allows efficient interpolation between two different transformations.

Member Typedef Documentation

typedef T Type
inherited

The used floating point type (float, double, long double)

typedef Eigen::Matrix<T,D,1> TranslationType
inherited

Vector type used to represent the translational part (dimension depends on dimensionality of transform).

typedef Eigen::Quaternion< T > RotationType
inherited

Type used to represent the rotational part (Eigen::Rotation2D for 2D transforms, Eigen::Quaternion for 3D transforms)

typedef Eigen::Matrix<T,HDim,HDim> MatrixType
inherited

Type of the matrix that can describe the full affine transform in homogeneous space.

Member Enumeration Documentation

anonymous enum
inherited

Constructor & Destructor Documentation

RigidTransform ( )
inline
RigidTransform ( const Eigen::Matrix< T, 3, 1 > &  translation,
const Eigen::Quaternion< T > &  rotation 
)
inline
RigidTransform ( x,
y,
z,
yaw,
pitch,
roll 
)
inline

Member Function Documentation

RigidTransform<U,3> cast ( ) const
inline

Returns *this casted to U.

T& x ( )
inline

Returns the x-coordinate of the translational part of the transform.

T x ( ) const
inline

Returns the x-coordinate of the translational part of the transform.

T& y ( )
inline

Returns the y-coordinate of the translational part of the transform.

T y ( ) const
inline

Returns the y-coordinate of the translational part of the transform.

T& z ( )
inline

Returns the z-coordinate of the translational part of the transform.

T z ( ) const
inline

Returns the z-coordinate of the translational part of the transform.

T yaw ( ) const
inline

Returns the yaw angle in rad (This corresponds to phi in a 2D transform).

Note
: This method is provided for convenience. It's computation can be quite expensive. Hence, use it with care and use the underlying quaternion instead whenever possible.
T pitch ( ) const
inline

Returns the pitch angle in rad.

Note
: This method is provided for convenience. It's computation can be quite expensive. Hence, use it with care and use the underlying quaternion instead whenever possible.
T roll ( ) const
inline

Returns the roll angle in rad.

Note
: This method is provided for convenience. It's computation can be quite expensive. Hence, use it with care and use the underlying quaternion instead whenever possible.
void reflect ( BinarySerializer< Derived > &  r)
inline
void reflect ( BinaryDeserializer< Derived > &  r)
inline
void reflectRead ( Reflector &  r)
inline
void reflectWrite ( Reflector &  r)
inline
RigidTransform< T, 3 > inverse ( ) const
inlineinherited

Computes and returns the inverse transform of this.

bool isApprox ( const RigidTransformBase< T, 3, Eigen::Quaternion< T >, RigidTransform< T, 3 > > &  other,
prec = std::numeric_limits<T>::epsilon() 
) const
inlineinherited

Returns true if this is approximately equal to other, within the precision determined by prec.

Returns
true if approximately equal, false otherwise
RigidTransform< T, 3 > & operator*= ( const RigidTransformBase< T, 3, Eigen::Quaternion< T >, RigidTransform< T, 3 > > &  other)
inlineinherited

Concatenates this transform with an other transform.

ei_rigidtransform_product_impl<D, RigidTransform< T, 3 > , OtherDerived>::TResult operator* ( const Eigen::MatrixBase< OtherDerived > &  other) const
inlineinherited

Apply the transformation to an Eigen matrix.

The matrix must be a fixed matrix of the size Dx1 or a dynamic matrix of the same size.

operator Eigen::Transform< T, D, Eigen::Isometry > ( )
inlineinherited

Cast operator that casts the rigid transform into a generic Eigen::Transform object.

MatrixType getMatrix ( ) const
inlineinherited

Computes and returns the matrix that describes the affine transformation in homogeneous space.

The dimensions of the matrix is 3x3 for 2D transformations and 4x4 for 3D transformations.

RigidTransform< T, 3 > * This ( )
inlineprotectedinherited

casts this to the actual derived type (see Curiously recurring template pattern)

const RigidTransform< T, 3 > * This ( ) const
inlineprotectedinherited

casts this to the actual derived type (see Curiously recurring template pattern)

static RigidTransform< T, 3 > mul ( const RigidTransformBase< T, 3, Eigen::Quaternion< T >, RigidTransform< T, 3 > > &  a,
const RigidTransformBase< T, 3, Eigen::Quaternion< T >, RigidTransform< T, 3 > > &  b 
)
inlinestaticprotectedinherited

Friends And Related Function Documentation

MIRA_SPLIT_REFLECT_MEMBER friend std::ostream& operator<< ( std::ostream &  os,
const RigidTransform< T, 3 > &  tf 
)
friend

Member Data Documentation

TranslationType t
inherited

Vector that describes the translational part of the transform.

RotationType r
inherited

The rotational part of the transform.


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