# opentl::math::Transform Class Reference

special class for a homogeneous transformation matrix More...

Inherits opentl::math::Matrix.

List of all members.

## Public Member Functions
virtual Transform | exponential (const int p=6)
| result = exp(this) Exponential mapping with Pade's scaling and squaring method
virtual void | identity ()
| Set matrix values to identity.
virtual bool | invert (opentl::math::Transform &out, const InversionMethod &method=LU) const
virtual opentl::math::Transform | invert (const InversionMethod &method=LU) const
void | rotate (double x, double y, double z, double a, bool world=false)
void | rotateX (double angle, bool world=false)
void | rotateY (double angle, bool world=false)
void | rotateZ (double angle, bool world=false)
virtual void | rotationFromRodrigues (const Vector3 &rod)
void | scale (double x, double y, double z, bool world=false)
void | setTransform (const double values[4][4])
void | setTransform (const float values[4][4])
void | setTranslation (double x, double y, double z)
| Transform (double x, double y, double z, double alpha, double beta, double gamma)
| Transform (const SquareMatrix &matrix)
| Transform (const Matrix &matrix)
| Transform (const Transform &matrix)
| Transform ()
void | translate (double x, double y, double z, bool world=false)
virtual | ~Transform ()

## Detailed Description

special class for a homogeneous transformation matrix

Author:
  Claus Lenz <lenz@in.tum.de>

  Thomas Friedlhuber <friedlhu@in.tum.de>

## Constructor & Destructor Documentation

opentl::math::Transform::Transform | ( |  | ) |

constructor

opentl::math::Transform::Transform | ( | const Transform & | matrix | ) |

constructor based on content of an existing Transform matrix

Parameters:

  | matrix | existing matrix

opentl::math::Transform::Transform | ( | const Matrix & | matrix | ) | `[explicit]`

constructor based on content of an existing matrix (cols=rows=4)

Parameters:

  | matrix | existing matrix

opentl::math::Transform::Transform | ( | const SquareMatrix & | matrix | ) | `[explicit]`

constructor based on content of an existing matrix (cols=rows=4)

Parameters:

  | matrix | existing matrix

opentl::math::Transform::Transform | ( | double | x,
|  | double | y,
|  | double | z,
|  | double | alpha,
|  | double | beta,
|  | double | gamma |
| ) |  |  |

constructor based on transformation data

Parameters:

  | x,y,z | translation along x,y,z axis
  | alpha,beta,gamma | rotation about x,y,z axis in rad

virtual opentl::math::Transform::~Transform | ( |  | ) | `[virtual]`

destructor

## Member Function Documentation

virtual Transform opentl::math::Transform::exponential | ( | const int | p = `6` | ) | `[virtual]`

result = exp(this) Exponential mapping with Pade's scaling and squaring method

Returns:
  matrix exponential

virtual void opentl::math::Transform::identity | ( |  | ) | `[virtual]`

Set matrix values to identity.

virtual bool opentl::math::Transform::invert | ( | opentl::math::Transform & | out,
|  | const InversionMethod & | method = `LU` |
| ) |  |  | const`[virtual]`

brief inverts this matrix

Parameters:

  | method | LU - Gaussian elimination with optimal pivot element chose; SVD - Singular value decomposition (SVD) method; SVD_SYM - SVD method for a symmetric positively-defined matrix

Returns:
  was the solving successful?

virtual opentl::math::Transform opentl::math::Transform::invert | ( | const InversionMethod & | method = `LU` | ) | const`[virtual]`

brief inverts square matrices

Parameters:

  | method | LU - Gaussian elimination with optimal pivot element chose; SVD - Singular value decomposition (SVD) method; SVD_SYM - SVD method for a symmetric positively-defined matrix Note: if the inversion fails the resulting matrix is a ZERO matrix!

void opentl::math::Transform::rotate | ( | double | x,
|  | double | y,
|  | double | z,
|  | double | a,
|  | bool | world = `false` |
| ) |  |  |

rotate about XYZ axes

Parameters:

  | x,y,z | values of axis
  | a,b,c | rotation angles in rad
  | world | if true do rotation in world coordinate system else in local system

void opentl::math::Transform::rotateX | ( | double | angle,
|  | bool | world = `false` |
| ) |  |  |

rotate about x axis

Parameters:

  | angle | rotation angle in rad
  | world | if true do rotation in world coordinate system else in local system

void opentl::math::Transform::rotateY | ( | double | angle,
|  | bool | world = `false` |
| ) |  |  |

rotate about y axis

Parameters:

  | angle | rotation angle
  | world | if true do rotation in world coordinate system else in local system

void opentl::math::Transform::rotateZ | ( | double | angle,
|  | bool | world = `false` |
| ) |  |  |

rotate about z axis

Parameters:

  | angle | rotation angle in rad
  | world | if true do rotation in world coordinate system else in local system

virtual void opentl::math::Transform::rotationFromRodrigues | ( | const Vector3 & | rod | ) | `[virtual]`

brief set rotation from a rodriguez vector

void opentl::math::Transform::scale | ( | double | x,
|  | double | y,
|  | double | z,
|  | bool | world = `false` |
| ) |  |  |

scale along arbitrary axis

Parameters:

  | x,y,z | values of axisopentl::math::
  | world | if true do scaling in word coordinate system else in local system

void opentl::math::Transform::setTransform | ( | const double | values[4][4] | ) |

set transformation data

Parameters:

  | values | transformation data

void opentl::math::Transform::setTransform | ( | const float | values[4][4] | ) |

set transformation data

Parameters:

  | values | transformation data

void opentl::math::Transform::setTranslation | ( | double | x,
|  | double | y,
|  | double | z |
| ) |  |  |

set translation data

Parameters:

  | x,y,z | translation data

void opentl::math::Transform::translate | ( | double | x,
|  | double | y,
|  | double | z,
|  | bool | world = `false` |
| ) |  |  |

translate along arbitrary axis

Parameters:

  | x,y,z | values of axis
  | world | if true do translation in word coordinate system else in local sys