#include <spTransformation3D.hpp>
Public Member Functions | |
Transformation3D () | |
Transformation3D (const dim::matrix4< T > &Matrix) | |
Transformation3D (const dim::vector3d< T > &Position, const dim::quaternion4< T > &Rotation, const dim::vector3d< T > &Scale=T(1)) | |
Transformation3D (const Transformation3D< T > &Other) | |
~Transformation3D () | |
Transformation3D< T > & | operator= (const Transformation3D< T > &Other) |
Transformation3D< T > & | operator*= (const Transformation3D< T > &Other) |
Transformation3D< T > | operator* (const Transformation3D< T > &Other) const |
const dim::matrix4< T > & | getMatrix () const |
Returns the transformation as a 4x4 matrix. | |
Transformation3D< T > | getInverse () const |
Returns the inverse transformation. | |
void | interpolate (const Transformation3D< T > &From, const Transformation3D< T > &To, const T &Interpolation) |
Interpolates this transformation between the given ones with the specified factor which is in the range [0.0 .. 1.0]. | |
void | move (const dim::vector3d< T > &Direction) |
Moves the transformation into the specified direction. This depends on the current rotation. | |
void | turn (const dim::vector3d< T > &Rotation) |
Turns the transformation into the specified rotation. | |
void | setPosition (const dim::vector3d< T > &Position) |
Sets the position vector. | |
const dim::vector3d< T > & | getPosition () const |
Returns the position vector. | |
void | setRotation (const dim::quaternion4< T > &Rotation) |
Sets the rotation quaternion. | |
const dim::quaternion4< T > & | getRotation () const |
Returns the rotation quaternion. | |
dim::matrix4< T > | getRotationMatrix () const |
Returns the rotation as 4x4 matrix. | |
void | setScale (const dim::vector3d< T > &Scale) |
Sets the scaling vector. | |
const dim::vector3d< T > & | getScale () const |
Returns the scaling vector. By default ( 1 | 1 | 1 ). | |
void | translate (const dim::vector3d< T > &Direction) |
Adds the specified direction to the position vector. | |
void | transform (const dim::vector3d< T > &Size) |
Adds the specified size to the scaling vector. | |
void | getMatrix (dim::matrix4< T > &Matrix) const |
Transforms the given matrix by the current transformation. | |
dim::matrix4< T > | getInverseMatrix () const |
void | setMatrixDirect (const dim::matrix4< T > &Matrix) |
dim::matrix4< T > & | getMatrixDirect () |
Returns a reference of the matrix transformation. | |
const dim::matrix4< T > & | getMatrixDirect () const |
Returns the matrix transformation directly. | |
dim::vector3df | getDirection (const dim::vector3df &upVector=dim::vector3df(0, 0, 1)) const |
Returns a vector which points into this transformation's direction. |
Base class for 3d transformations. Used for scene nodes and animation joints. This class was originally named "Transformation" but now this is the name of its typedef. So actually you will only need the typedef named "Transformation". This transformation is stored as position (3D Vector), rotation (Quaternion) and scale (3D vector).
sp::scene::Transformation3D< T >::Transformation3D | ( | ) | [inline] |
sp::scene::Transformation3D< T >::Transformation3D | ( | const dim::matrix4< T > & | Matrix | ) | [inline] |
sp::scene::Transformation3D< T >::Transformation3D | ( | const dim::vector3d< T > & | Position, | |
const dim::quaternion4< T > & | Rotation, | |||
const dim::vector3d< T > & | Scale = T(1) | |||
) | [inline] |
sp::scene::Transformation3D< T >::Transformation3D | ( | const Transformation3D< T > & | Other | ) | [inline] |
sp::scene::Transformation3D< T >::~Transformation3D | ( | ) | [inline] |
dim::vector3df sp::scene::Transformation3D< T >::getDirection | ( | const dim::vector3df & | upVector = dim::vector3df(0, 0, 1) |
) | const [inline] |
Returns a vector which points into this transformation's direction.
Transformation3D<T> sp::scene::Transformation3D< T >::getInverse | ( | ) | const [inline] |
Returns the inverse transformation.
dim::matrix4<T> sp::scene::Transformation3D< T >::getInverseMatrix | ( | ) | const [inline] |
Returns the inverse matrix.
const dim::matrix4<T>& sp::scene::Transformation3D< T >::getMatrix | ( | ) | const [inline] |
Returns the transformation as a 4x4 matrix.
void sp::scene::Transformation3D< T >::getMatrix | ( | dim::matrix4< T > & | Matrix | ) | const [inline] |
Transforms the given matrix by the current transformation.
const dim::matrix4<T>& sp::scene::Transformation3D< T >::getMatrixDirect | ( | ) | const [inline] |
Returns the matrix transformation directly.
dim::matrix4<T>& sp::scene::Transformation3D< T >::getMatrixDirect | ( | ) | [inline] |
Returns a reference of the matrix transformation.
const dim::vector3d<T>& sp::scene::Transformation3D< T >::getPosition | ( | ) | const [inline] |
Returns the position vector.
const dim::quaternion4<T>& sp::scene::Transformation3D< T >::getRotation | ( | ) | const [inline] |
Returns the rotation quaternion.
dim::matrix4<T> sp::scene::Transformation3D< T >::getRotationMatrix | ( | ) | const [inline] |
Returns the rotation as 4x4 matrix.
const dim::vector3d<T>& sp::scene::Transformation3D< T >::getScale | ( | ) | const [inline] |
Returns the scaling vector. By default ( 1 | 1 | 1 ).
void sp::scene::Transformation3D< T >::interpolate | ( | const Transformation3D< T > & | From, | |
const Transformation3D< T > & | To, | |||
const T & | Interpolation | |||
) | [inline] |
Interpolates this transformation between the given ones with the specified factor which is in the range [0.0 .. 1.0].
void sp::scene::Transformation3D< T >::move | ( | const dim::vector3d< T > & | Direction | ) | [inline] |
Moves the transformation into the specified direction. This depends on the current rotation.
Transformation3D<T> sp::scene::Transformation3D< T >::operator* | ( | const Transformation3D< T > & | Other | ) | const [inline] |
Transformation3D<T>& sp::scene::Transformation3D< T >::operator*= | ( | const Transformation3D< T > & | Other | ) | [inline] |
Transformation3D<T>& sp::scene::Transformation3D< T >::operator= | ( | const Transformation3D< T > & | Other | ) | [inline] |
void sp::scene::Transformation3D< T >::setMatrixDirect | ( | const dim::matrix4< T > & | Matrix | ) | [inline] |
Sets the final matrix transformation directly.
void sp::scene::Transformation3D< T >::setPosition | ( | const dim::vector3d< T > & | Position | ) | [inline] |
Sets the position vector.
void sp::scene::Transformation3D< T >::setRotation | ( | const dim::quaternion4< T > & | Rotation | ) | [inline] |
Sets the rotation quaternion.
void sp::scene::Transformation3D< T >::setScale | ( | const dim::vector3d< T > & | Scale | ) | [inline] |
Sets the scaling vector.
void sp::scene::Transformation3D< T >::transform | ( | const dim::vector3d< T > & | Size | ) | [inline] |
Adds the specified size to the scaling vector.
void sp::scene::Transformation3D< T >::translate | ( | const dim::vector3d< T > & | Direction | ) | [inline] |
Adds the specified direction to the position vector.
void sp::scene::Transformation3D< T >::turn | ( | const dim::vector3d< T > & | Rotation | ) | [inline] |
Turns the transformation into the specified rotation.