Affine or projective transformation in 3D. More...
#include <Transform3D.hpp>
Public Types | |
enum | Axis { X_AXIS, Y_AXIS, Z_AXIS } |
enum | Plane { XY_PLANE, XZ_PLANE, YZ_PLANE } |
enum | Unit { DEGREES, RADIANS } |
enum | Error { DIVISION_BY_ZERO, INVALID_ARGUMENT, INVALID_AXIS, INVALID_UNIT, UNKNOWN_ERROR, WRONG_COORDINATE_SIZE } |
typedef T | value_type |
typedef Eigen::Matrix< T, 4, 4 > | Matrix4T |
typedef Eigen::Matrix< T, 4, 1 > | Vector4T |
typedef Eigen::Matrix< T, 3, 1 > | Vector3T |
typedef Coordinate< T > | coordinate_type |
Public Member Functions | |
Transform3D () | |
Constructs an instance of Transform3D. | |
Transform3D (const Matrix4T &) | |
Constructs an instance of Transform3D. | |
Transform3D (T a11, T a12, T a13, T a14, T a21, T a22, T a23, T a24, T a31, T a32, T a33, T a34, T a41, T a42, T a43, T a44) | |
Constructs an instance of Transform3D. | |
Transform3D (const Transform3D< T > &transform3D) | |
Copy constructor. | |
template<class U > | |
Transform3D (const Transform3D< U > &transform3D) | |
Copy constructor. | |
virtual | ~Transform3D () |
Destroys the instance of Transform3D. | |
T & | a11 () |
Element access (readable and writable). | |
T & | a12 () |
Element access (readable and writable). | |
T & | a13 () |
Element access (readable and writable). | |
T & | a14 () |
Element access (readable and writable). | |
T & | a21 () |
Element access (readable and writable). | |
T & | a22 () |
Element access (readable and writable). | |
T & | a23 () |
Element access (readable and writable). | |
T & | a24 () |
Element access (readable and writable). | |
T & | a31 () |
Element access (readable and writable). | |
T & | a32 () |
Element access (readable and writable). | |
T & | a33 () |
Element access (readable and writable). | |
T & | a34 () |
Element access (readable and writable). | |
T & | a41 () |
Element access (readable and writable). | |
T & | a42 () |
Element access (readable and writable). | |
T & | a43 () |
Element access (readable and writable). | |
T & | a44 () |
Element access (readable and writable). | |
const T & | a11 () const |
Read-only element access. | |
const T & | a12 () const |
Read-only element access. | |
const T & | a13 () const |
Read-only element access. | |
const T & | a14 () const |
Read-only element access. | |
const T & | a21 () const |
Read-only element access. | |
const T & | a22 () const |
Read-only element access. | |
const T & | a23 () const |
Read-only element access. | |
const T & | a24 () const |
Read-only element access. | |
const T & | a31 () const |
Read-only element access. | |
const T & | a32 () const |
Read-only element access. | |
const T & | a33 () const |
Read-only element access. | |
const T & | a34 () const |
Read-only element access. | |
const T & | a41 () const |
Read-only element access. | |
const T & | a42 () const |
Read-only element access. | |
const T & | a43 () const |
Read-only element access. | |
const T & | a44 () const |
Read-only element access. | |
const Coordinate< T > | operator* (const Coordinate< T > &) const |
Transforms a coordinate with the internally saved transformation. | |
const Matrix4T | operator* (const Matrix4T &) const |
Composition of two transformations. | |
const Vector3T | operator* (const Vector3T &) const |
Transforms a 3D vector with the internally saved transformation. | |
const Vector4T | operator* (const Vector4T &) const |
Transforms a vector with the internally saved transformation. | |
const Transform3D | operator* (const Transform3D &) const |
Composition of two transformations. | |
const Transform3D | operator>> (const Transform3D &) const |
Composition of two transformations. | |
Transform3D & | operator= (const Transform3D &) |
Copy assignment. | |
Matrix4T & | getTransformationMatrix () |
Returns the internal transformation matrix. | |
const Matrix4T & | getTransformationMatrix () const |
Returns the internal transformation matrix. | |
const Transform3D | inverse () const |
Returns the inverse transformation. | |
Transform3D | orthographicProjection (const Plane=XY_PLANE) const |
Constructs an orthographic projection matrix. | |
Transform3D | perspectiveProjection (const T distance, const Plane=XY_PLANE) const |
Constructs a perspective projection matrix. | |
Transform3D & | reset () |
Sets the internal matrix to the identity matrix. | |
Transform3D & | rotate (const double angle, const Axis=Z_AXIS, const Unit unit=RADIANS) |
Rotation around the x-, y-, or z-axis. | |
Transform3D & | rotateX (const double angle, const Unit unit=RADIANS) |
Rotation around the x-axis. | |
Transform3D & | rotateY (const double angle, const Unit unit=RADIANS) |
Rotation around the y-axis. | |
Transform3D & | rotateZ (const double angle, const Unit unit=RADIANS) |
Rotation around the z-axis. | |
Transform3D & | rotateAxis (const double angle, const Coordinate< T > &axis, const Unit unit=RADIANS) |
Rotation around an arbitrary axis. | |
Transform3D & | rotateAxis (const double angle, const Vector3T &axis, const Unit unit=RADIANS) |
Rotation around an arbitrary axis. | |
Transform3D & | rotateAxis (const double angle, const Vector4T &axis, const Unit unit=RADIANS) |
Rotation around an arbitrary axis. | |
Transform3D & | scale (const T sx, const T sy, const T sz) |
Non-uniform scaling. | |
Transform3D & | translate (const T dx, const T dy, const T dz) |
Translation. | |
Transform3D & | translate (const Coordinate< T > &position) |
Translation. | |
bool | is_affine () const |
Returns whether the internally saved transformation is affine or not. | |
Static Public Attributes | |
static const double | pi = 3.14159265358979323846264338327950288419716939937510 |
Affine or projective transformation in 3D.
This class provides means to transform 3D coordinates via an affine or a projective transformation. The transformation can be composed from a sequence of elementary transformations such as translation, scaling, rotation etc. or by directly setting the entries of a \( 4 \times 4 \) transformation matrix. The coordinates may be given as 3D or as 4D coordinates in case of homogeneous coordinates.
The transformation is computed by multiplying a \( 4 \times 4 \) matrix with a 4D homogeneous coordinate followed by a potential normalization step. That is, if \( x \) is transformed to \( y \), first an intermediate vector \( w \) is computed
\[ \begin{pmatrix} w_1 \\ w_2 \\ w_3 \\ w_4 \end{pmatrix} = \begin{pmatrix} a_{11} & a_{12} & a_{13} & a_{14} \\ a_{21} & a_{22} & a_{23} & a_{24} \\ a_{31} & a_{32} & a_{33} & a_{34} \\ a_{41} & a_{42} & a_{43} & a_{44} \end{pmatrix} \begin{pmatrix} x_1 \\ x_2 \\ x_3 \\ 1 \end{pmatrix} \]
followed by a normalization step
\[ \begin{pmatrix} y_1 \\ y_2 \\ y_3 \\ 1 \end{pmatrix} = \frac{1}{w_4} \begin{pmatrix} w_1 \\ w_2 \\ w_3 \\ w_4 \end{pmatrix} \]
In case of affine transformations
\[ y = Ax + b \]
or
\[ \begin{pmatrix} y_1 \\ y_2 \\ y_3 \\ 1 \end{pmatrix} = \begin{pmatrix} a_{11} & a_{12} & a_{13} & b_1 \\ a_{21} & a_{22} & a_{23} & b_2 \\ a_{31} & a_{32} & a_{33} & b_3 \\ 0 & 0 & 0 & 1 \end{pmatrix} \begin{pmatrix} x_1 \\ x_2 \\ x_3 \\ 1 \end{pmatrix} \]
the subsequent normalization step can be omitted since the last entry of the above intermediate vector \( w \) would be \( 1 \) in any event.
Most functions check for certain assertions (e.g. if the coordinate size is valid) and trigger an assertion failure if the assumption does not hold. This is meant for debugging purposes only and can be disabled by defining the macro NDEBUG
.
Here are some examples of how to use the Transform3D class:
Example 1:
TRTK::Coordinate<double> coordinate(1, 4, 3); TRTK::Transform3D<double> transform; const double pi = transform::pi; transform.rotateZ(pi/2).translate(2, 0, 0); cout << transform * coordinate << endl;
Output:
(-2, 1, 3)
Example 2:
using namespace TRTK; Coordinate<double> coordinate(1, 4, 3); Transform3D<double> transform1; Transform3D<double> transform2; Transform3D<double> transform3; Transform3D<double> transform4; transform1.translate(1, 1, 0); // rotation of 90 degrees transform2.a11() = 0; transform2.a12() = 1; transform2.a21() = -1; transform2.a22() = 0; transform3.translate(-1, 0, 0); transform4 = transform3 * transform2 * transform1; cout << transform4 * coordinate << endl; transform4.reset() = transform1 >> transform2 >> transform3; cout << transform4 * coordinate << endl; cout << endl << transform4.getTransformationMatrix() << endl;
Output:
(4, -2, 3) (4, -2, 3) 0 1 0 0 -1 0 0 -1 0 0 1 0 0 0 0 1
Definition at line 208 of file Transform3D.hpp.
TRTK::Transform3D< T >::Transform3D | ( | ) |
Constructs an instance of Transform3D.
T | scalar type |
The internal matrix is set to the identity matrix.
Definition at line 341 of file Transform3D.hpp.
TRTK::Transform3D< T >::Transform3D | ( | const Matrix4T & | matrix ) |
Constructs an instance of Transform3D.
T | scalar type |
[in] | matrix | Tranformation matrix. |
Sets the internal matrix to the given matrix
.
Definition at line 359 of file Transform3D.hpp.
TRTK::Transform3D< T >::Transform3D | ( | T | a11, |
T | a12, | ||
T | a13, | ||
T | a14, | ||
T | a21, | ||
T | a22, | ||
T | a23, | ||
T | a24, | ||
T | a31, | ||
T | a32, | ||
T | a33, | ||
T | a34, | ||
T | a41, | ||
T | a42, | ||
T | a43, | ||
T | a44 | ||
) |
Constructs an instance of Transform3D.
T | scalar type |
Sets the internal matrix to the given coefficients.
Definition at line 390 of file Transform3D.hpp.
TRTK::Transform3D< T >::Transform3D | ( | const Transform3D< T > & | transform3D ) |
Copy constructor.
T | scalar type |
Definition at line 459 of file Transform3D.hpp.
TRTK::Transform3D< T >::Transform3D | ( | const Transform3D< U > & | transform3D ) |
Copy constructor.
T | scalar type of the newly created instance |
U | scalar type of the copied instance |
Definition at line 427 of file Transform3D.hpp.
TRTK::Transform3D< T >::~Transform3D | ( | ) | [virtual] |
Destroys the instance of Transform3D.
T | scalar type |
Definition at line 501 of file Transform3D.hpp.
T & TRTK::Transform3D< T >::a11 | ( | ) |
Element access (readable and writable).
T | scalar type |
Definition at line 517 of file Transform3D.hpp.
const T & TRTK::Transform3D< T >::a11 | ( | ) | const |
Read-only element access.
T | scalar type |
Definition at line 777 of file Transform3D.hpp.
T & TRTK::Transform3D< T >::a12 | ( | ) |
Element access (readable and writable).
T | scalar type |
Definition at line 533 of file Transform3D.hpp.
const T & TRTK::Transform3D< T >::a12 | ( | ) | const |
Read-only element access.
T | scalar type |
Definition at line 793 of file Transform3D.hpp.
const T & TRTK::Transform3D< T >::a13 | ( | ) | const |
Read-only element access.
T | scalar type |
Definition at line 809 of file Transform3D.hpp.
T & TRTK::Transform3D< T >::a13 | ( | ) |
Element access (readable and writable).
T | scalar type |
Definition at line 549 of file Transform3D.hpp.
T & TRTK::Transform3D< T >::a14 | ( | ) |
Element access (readable and writable).
T | scalar type |
Definition at line 565 of file Transform3D.hpp.
const T & TRTK::Transform3D< T >::a14 | ( | ) | const |
Read-only element access.
T | scalar type |
Definition at line 825 of file Transform3D.hpp.
T & TRTK::Transform3D< T >::a21 | ( | ) |
Element access (readable and writable).
T | scalar type |
Definition at line 581 of file Transform3D.hpp.
const T & TRTK::Transform3D< T >::a21 | ( | ) | const |
Read-only element access.
T | scalar type |
Definition at line 841 of file Transform3D.hpp.
const T & TRTK::Transform3D< T >::a22 | ( | ) | const |
Read-only element access.
T | scalar type |
Definition at line 857 of file Transform3D.hpp.
T & TRTK::Transform3D< T >::a22 | ( | ) |
Element access (readable and writable).
T | scalar type |
Definition at line 597 of file Transform3D.hpp.
const T & TRTK::Transform3D< T >::a23 | ( | ) | const |
Read-only element access.
T | scalar type |
Definition at line 873 of file Transform3D.hpp.
T & TRTK::Transform3D< T >::a23 | ( | ) |
Element access (readable and writable).
T | scalar type |
Definition at line 613 of file Transform3D.hpp.
T & TRTK::Transform3D< T >::a24 | ( | ) |
Element access (readable and writable).
T | scalar type |
Definition at line 629 of file Transform3D.hpp.
const T & TRTK::Transform3D< T >::a24 | ( | ) | const |
Read-only element access.
T | scalar type |
Definition at line 889 of file Transform3D.hpp.
T & TRTK::Transform3D< T >::a31 | ( | ) |
Element access (readable and writable).
T | scalar type |
Definition at line 645 of file Transform3D.hpp.
const T & TRTK::Transform3D< T >::a31 | ( | ) | const |
Read-only element access.
T | scalar type |
Definition at line 905 of file Transform3D.hpp.
T & TRTK::Transform3D< T >::a32 | ( | ) |
Element access (readable and writable).
T | scalar type |
Definition at line 661 of file Transform3D.hpp.
const T & TRTK::Transform3D< T >::a32 | ( | ) | const |
Read-only element access.
T | scalar type |
Definition at line 921 of file Transform3D.hpp.
T & TRTK::Transform3D< T >::a33 | ( | ) |
Element access (readable and writable).
T | scalar type |
Definition at line 677 of file Transform3D.hpp.
const T & TRTK::Transform3D< T >::a33 | ( | ) | const |
Read-only element access.
T | scalar type |
Definition at line 937 of file Transform3D.hpp.
T & TRTK::Transform3D< T >::a34 | ( | ) |
Element access (readable and writable).
T | scalar type |
Definition at line 693 of file Transform3D.hpp.
const T & TRTK::Transform3D< T >::a34 | ( | ) | const |
Read-only element access.
T | scalar type |
Definition at line 953 of file Transform3D.hpp.
T & TRTK::Transform3D< T >::a41 | ( | ) |
Element access (readable and writable).
T | scalar type |
Definition at line 709 of file Transform3D.hpp.
const T & TRTK::Transform3D< T >::a41 | ( | ) | const |
Read-only element access.
T | scalar type |
Definition at line 969 of file Transform3D.hpp.
T & TRTK::Transform3D< T >::a42 | ( | ) |
Element access (readable and writable).
T | scalar type |
Definition at line 726 of file Transform3D.hpp.
const T & TRTK::Transform3D< T >::a42 | ( | ) | const |
Read-only element access.
T | scalar type |
Definition at line 985 of file Transform3D.hpp.
const T & TRTK::Transform3D< T >::a43 | ( | ) | const |
Read-only element access.
T | scalar type |
Definition at line 1001 of file Transform3D.hpp.
T & TRTK::Transform3D< T >::a43 | ( | ) |
Element access (readable and writable).
T | scalar type |
Definition at line 743 of file Transform3D.hpp.
T & TRTK::Transform3D< T >::a44 | ( | ) |
Element access (readable and writable).
T | scalar type |
Definition at line 760 of file Transform3D.hpp.
const T & TRTK::Transform3D< T >::a44 | ( | ) | const |
Read-only element access.
T | scalar type |
Definition at line 1017 of file Transform3D.hpp.
Transform3D< T >::Matrix4T & TRTK::Transform3D< T >::getTransformationMatrix | ( | ) |
Returns the internal transformation matrix.
T | scalar type |
Definition at line 1358 of file Transform3D.hpp.
const Transform3D< T >::Matrix4T & TRTK::Transform3D< T >::getTransformationMatrix | ( | ) | const |
Returns the internal transformation matrix.
T | scalar type |
Definition at line 1372 of file Transform3D.hpp.
const Transform3D< T > TRTK::Transform3D< T >::inverse | ( | ) | const |
Returns the inverse transformation.
T | scalar type |
Definition at line 1386 of file Transform3D.hpp.
bool TRTK::Transform3D< T >::is_affine | ( | ) | const [inline] |
Returns whether the internally saved transformation is affine or not.
T | scalar type |
Definition at line 1906 of file Transform3D.hpp.
const Transform3D< T > TRTK::Transform3D< T >::operator* | ( | const Transform3D< T > & | transform ) | const |
Composition of two transformations.
T | scalar type |
[in] | transform | A transformation described by Transform3D. |
This function computes the composition of the currently internally saved transformation with the transformation given by transform
. Here, the composition is a simple matrix multiplication.
Example:
typedef TRTK::Transform3D<double> Transform; Transform T1(1, 0, 0, 0, 0, 1, 0, 1, 0, 0, 2, 2, 0, 0, 0, 1); Transform T2(1, 0, 0, 0, 0, 2, 0, 3, 0, 0, 2, 2, 0, 0, 0, 1); Transform T3 = T1 * T2; std::cout << T3.getTransformationMatrix();
Output:
1 0 0 0 0 2 0 4 0 0 4 6 0 0 0 1
Definition at line 1286 of file Transform3D.hpp.
const Coordinate< T > TRTK::Transform3D< T >::operator* | ( | const Coordinate< T > & | coordinate ) | const |
Transforms a coordinate with the internally saved transformation.
T | scalar type |
[in] | coordinate | Coordinate to be transformed. coordinate may be homogeneous. |
The given coordinate
must be of size three or four. If coordinate
has a size of four (homogeneous coordinate), it is assumed that its fourth component is equal to one.
Example:
TRTK::Coordinate<double> coordinate(1, 4, 3); TRTK::Transform3D<double> transform; transform.rotateZ(90).translate(2, 0, 0); cout << transform * coordinate << endl;
Output:
(-2, 1, 3)
Definition at line 1055 of file Transform3D.hpp.
const Transform3D< T >::Matrix4T TRTK::Transform3D< T >::operator* | ( | const Matrix4T & | matrix ) | const |
Composition of two transformations.
T | scalar type |
[in] | matrix | 4x4 transformation matrix. |
This function computes the composition of the currently internally saved transformation with the transformation given by matrix
. Here, the composition is a simple matrix multiplication.
Example:
typedef TRTK::Transform3D<double> Transform; Transform T1(1, 0, 0, 0, 0, 1, 0, 1, 0, 0, 2, 2, 0, 0, 0, 1); Transform::Matrix4T A; A << 1, 0, 0, 0, 0, 2, 0, 3, 0, 0, 2, 2, 0, 0, 0, 1; Transform T2 = T1 * A; std::cout << T2.getTransformationMatrix();
Output:
1 0 0 0 0 2 0 4 0 0 4 6 0 0 0 1
Definition at line 1232 of file Transform3D.hpp.
const Transform3D< T >::Vector4T TRTK::Transform3D< T >::operator* | ( | const Vector4T & | vector ) | const |
Transforms a vector with the internally saved transformation.
T | scalar type |
[in] | vector | 4D vector to be transformed. |
The vector is assumed to be a normalized homogeneous coordinate, i.e. its last component is assumed to be equal to one.
Example:
TRTK::Transform3D<double> transform; TRTK::Transform3D<double>::Vector4T vec(1, 4, 3, 1); transform.rotateZ(90).translate(2, 0, 0); std::cout << transform * vec;
Output:
-2 1 3 1
Definition at line 1172 of file Transform3D.hpp.
const Transform3D< T >::Vector3T TRTK::Transform3D< T >::operator* | ( | const Vector3T & | vector ) | const |
Transforms a 3D vector with the internally saved transformation.
T | scalar type |
[in] | vector | 3D vector to be transformed. |
Example:
TRTK::Transform3D<double> transform; TRTK::Transform3D<double>::Vector3T vec(1, 4, 3); transform.rotateZ(90).translate(2, 0, 0); std::cout << transform * vec;
Output:
-2 1 3
Definition at line 1123 of file Transform3D.hpp.
Transform3D< T > & TRTK::Transform3D< T >::operator= | ( | const Transform3D< T > & | transform3D ) |
Copy assignment.
T | scalar type |
Definition at line 487 of file Transform3D.hpp.
const Transform3D< T > TRTK::Transform3D< T >::operator>> | ( | const Transform3D< T > & | transform ) | const |
Composition of two transformations.
T | scalar type |
[in] | transform | A transformation described by Transform3D. |
This function computes the composition of the currently internally saved transformation with the transformation given by transform
. Here, the composition is a simple matrix multiplication.
Example:
typedef TRTK::Transform3D<double> Transform; Transform T1(1, 0, 0, 0, 0, 1, 0, 1, 0, 0, 2, 2, 0, 0, 0, 1); Transform T2(1, 0, 0, 0, 0, 2, 0, 3, 0, 0, 2, 2, 0, 0, 0, 1); Transform T3 = T1 >> T2; // == T2 * T1 std::cout << T3.getTransformationMatrix();
Output:
1 0 0 0 0 2 0 5 0 0 4 6 0 0 0 1
Definition at line 1341 of file Transform3D.hpp.
Transform3D< T > TRTK::Transform3D< T >::orthographicProjection | ( | const Plane | plane = XY_PLANE ) |
const |
Constructs an orthographic projection matrix.
T | scalar type |
[in] | plane | XY_PLANE , XZ_PLANE , or YZ_PLANE |
Projects points to the x-y, x-z, or y-z plane. For example, in the case of projecting to the x-y plane, the coordinte (3, 1, 4)
would be transformed to (3, 1, 0)
.
*this!
).Definition at line 1410 of file Transform3D.hpp.
Transform3D< T > TRTK::Transform3D< T >::perspectiveProjection | ( | const T | distance, |
const Plane | plane = XY_PLANE |
||
) | const |
Constructs a perspective projection matrix.
T | scalar type |
[in] | plane | XY_PLANE , XZ_PLANE , or YZ_PLANE |
The point of view is at the point of origin (0, 0, 0). Every point is projected on a plane with distance d to the point of origin, that is, for instance the origin of the xy-plane is (0, 0, d).
*this!
).Definition at line 1459 of file Transform3D.hpp.
Transform3D< T > & TRTK::Transform3D< T >::reset | ( | ) |
Sets the internal matrix to the identity matrix.
T | scalar type |
*this
Definition at line 1509 of file Transform3D.hpp.
Transform3D< T > & TRTK::Transform3D< T >::rotate | ( | const double | angle, |
const Axis | axis = Z_AXIS , |
||
const Unit | unit = RADIANS |
||
) |
Rotation around the x-, y-, or z-axis.
T | scalar type |
[in] | angle | Rotation angle. |
[in] | axis | The axis. |
[in] | unit | Radian or degree. |
*this
Definition at line 1532 of file Transform3D.hpp.
Transform3D< T > & TRTK::Transform3D< T >::rotateAxis | ( | const double | angle, |
const Vector3T & | axis, | ||
const Unit | unit = RADIANS |
||
) |
Rotation around an arbitrary axis.
T | scalar type |
[in] | axis | Axis to rotate around (need not to be normalized). |
[in] | angle | Angle in degrees or radian. |
[in] | unit | The unit of angle . |
*this
Definition at line 1784 of file Transform3D.hpp.
Transform3D< T > & TRTK::Transform3D< T >::rotateAxis | ( | const double | angle, |
const Vector4T & | axis, | ||
const Unit | unit = RADIANS |
||
) |
Rotation around an arbitrary axis.
T | scalar type |
[in] | axis | Axis to rotate around (need not to be normalized). |
[in] | angle | Angle in degrees or radian. |
[in] | unit | The unit of angle . |
*this
Definition at line 1803 of file Transform3D.hpp.
Transform3D< T > & TRTK::Transform3D< T >::rotateAxis | ( | const double | angle, |
const Coordinate< T > & | axis, | ||
const Unit | unit = RADIANS |
||
) |
Rotation around an arbitrary axis.
T | scalar type |
[in] | axis | Axis to rotate around (need not to be normalized). |
[in] | angle | Angle in degrees or radian. |
[in] | unit | The unit of angle . |
*this
Definition at line 1718 of file Transform3D.hpp.
Transform3D< T > & TRTK::Transform3D< T >::rotateX | ( | const double | angle, |
const Unit | unit = RADIANS |
||
) |
Rotation around the x-axis.
T | scalar type |
[in] | angle | Angle in degrees or radian. |
[in] | unit | The unit of angle . |
*this
Definition at line 1567 of file Transform3D.hpp.
Transform3D< T > & TRTK::Transform3D< T >::rotateY | ( | const double | angle, |
const Unit | unit = RADIANS |
||
) |
Rotation around the y-axis.
T | scalar type |
[in] | angle | Angle in degrees or radian. |
[in] | unit | The unit of angle . |
*this
Definition at line 1617 of file Transform3D.hpp.
Transform3D< T > & TRTK::Transform3D< T >::rotateZ | ( | const double | angle, |
const Unit | unit = RADIANS |
||
) |
Rotation around the z-axis.
T | scalar type |
[in] | angle | Angle in degrees or radian. |
[in] | unit | The unit of angle . |
*this
Definition at line 1667 of file Transform3D.hpp.
Transform3D< T > & TRTK::Transform3D< T >::scale | ( | const T | sx, |
const T | sy, | ||
const T | sz | ||
) |
Non-uniform scaling.
T | scalar type |
[in] | sx | Scaling factor in x direction. |
[in] | sy | Scaling factor in y direction. |
[in] | sz | Scaling factor in z direction. |
This function scales the axes of the currently internally saved transformation.
*this
Definition at line 1825 of file Transform3D.hpp.
Transform3D< T > & TRTK::Transform3D< T >::translate | ( | const Coordinate< T > & | position ) |
Translation.
T | scalar type |
[in] | position | Translation (must be a coordinate of size 3) |
This function adds a translation to the currently stored transformation.
*this
Definition at line 1881 of file Transform3D.hpp.
Transform3D< T > & TRTK::Transform3D< T >::translate | ( | const T | dx, |
const T | dy, | ||
const T | dz | ||
) |
Translation.
T | scalar type |
[in] | dx | Translation in x direction. |
[in] | dy | Translation in y direction. |
[in] | dz | Translation in z direction. |
This function adds a translation to the currently stored transformation.
*this
Definition at line 1854 of file Transform3D.hpp.
Documentation generated by Doxygen