Public Member Functions

sp::scene::Transformation3D< T > Class Template Reference

#include <spTransformation3D.hpp>

List of all members.

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.

Detailed Description

template<typename T>
class sp::scene::Transformation3D< T >

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).

See also:
vector3d
quaternion
matrix4
Since:
Version 3.2

Constructor & Destructor Documentation

template<typename T>
sp::scene::Transformation3D< T >::Transformation3D (  )  [inline]
template<typename T>
sp::scene::Transformation3D< T >::Transformation3D ( const dim::matrix4< T > &  Matrix  )  [inline]
template<typename T>
sp::scene::Transformation3D< T >::Transformation3D ( const dim::vector3d< T > &  Position,
const dim::quaternion4< T > &  Rotation,
const dim::vector3d< T > &  Scale = T(1) 
) [inline]
template<typename T>
sp::scene::Transformation3D< T >::Transformation3D ( const Transformation3D< T > &  Other  )  [inline]
template<typename T>
sp::scene::Transformation3D< T >::~Transformation3D (  )  [inline]

Member Function Documentation

template<typename T>
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.

template<typename T>
Transformation3D<T> sp::scene::Transformation3D< T >::getInverse (  )  const [inline]

Returns the inverse transformation.

template<typename T>
dim::matrix4<T> sp::scene::Transformation3D< T >::getInverseMatrix (  )  const [inline]

Returns the inverse matrix.

See also:
getMatrix
template<typename T>
const dim::matrix4<T>& sp::scene::Transformation3D< T >::getMatrix (  )  const [inline]

Returns the transformation as a 4x4 matrix.

template<typename T>
void sp::scene::Transformation3D< T >::getMatrix ( dim::matrix4< T > &  Matrix  )  const [inline]

Transforms the given matrix by the current transformation.

template<typename T>
const dim::matrix4<T>& sp::scene::Transformation3D< T >::getMatrixDirect (  )  const [inline]

Returns the matrix transformation directly.

template<typename T>
dim::matrix4<T>& sp::scene::Transformation3D< T >::getMatrixDirect (  )  [inline]

Returns a reference of the matrix transformation.

template<typename T>
const dim::vector3d<T>& sp::scene::Transformation3D< T >::getPosition (  )  const [inline]

Returns the position vector.

template<typename T>
const dim::quaternion4<T>& sp::scene::Transformation3D< T >::getRotation (  )  const [inline]

Returns the rotation quaternion.

template<typename T>
dim::matrix4<T> sp::scene::Transformation3D< T >::getRotationMatrix (  )  const [inline]

Returns the rotation as 4x4 matrix.

template<typename T>
const dim::vector3d<T>& sp::scene::Transformation3D< T >::getScale (  )  const [inline]

Returns the scaling vector. By default ( 1 | 1 | 1 ).

template<typename T>
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].

template<typename T>
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.

template<typename T>
Transformation3D<T> sp::scene::Transformation3D< T >::operator* ( const Transformation3D< T > &  Other  )  const [inline]
template<typename T>
Transformation3D<T>& sp::scene::Transformation3D< T >::operator*= ( const Transformation3D< T > &  Other  )  [inline]
template<typename T>
Transformation3D<T>& sp::scene::Transformation3D< T >::operator= ( const Transformation3D< T > &  Other  )  [inline]
template<typename T>
void sp::scene::Transformation3D< T >::setMatrixDirect ( const dim::matrix4< T > &  Matrix  )  [inline]

Sets the final matrix transformation directly.

Note:
This will be overwritten the next time "getMatrix" is called!
template<typename T>
void sp::scene::Transformation3D< T >::setPosition ( const dim::vector3d< T > &  Position  )  [inline]

Sets the position vector.

template<typename T>
void sp::scene::Transformation3D< T >::setRotation ( const dim::quaternion4< T > &  Rotation  )  [inline]

Sets the rotation quaternion.

template<typename T>
void sp::scene::Transformation3D< T >::setScale ( const dim::vector3d< T > &  Scale  )  [inline]

Sets the scaling vector.

template<typename T>
void sp::scene::Transformation3D< T >::transform ( const dim::vector3d< T > &  Size  )  [inline]

Adds the specified size to the scaling vector.

template<typename T>
void sp::scene::Transformation3D< T >::translate ( const dim::vector3d< T > &  Direction  )  [inline]

Adds the specified direction to the position vector.

template<typename T>
void sp::scene::Transformation3D< T >::turn ( const dim::vector3d< T > &  Rotation  )  [inline]

Turns the transformation into the specified rotation.


The documentation for this class was generated from the following file:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines