TDME2 1.9.121
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Public Member Functions | Private Attributes | List of all members
Transformations Class Reference

Transformations which contain scale, rotations and translation. More...

#include <tdme/engine/Transformations.h>

Inheritance diagram for Transformations:
Inheritance graph
Collaboration diagram for Transformations:
Collaboration graph

Public Member Functions

 Transformations ()
 Public constructor. More...
 
virtual ~Transformations ()
 Destructor. More...
 
const Vector3getTranslation () const
 
void setTranslation (const Vector3 &translation)
 Set translation. More...
 
const Vector3getScale () const
 
void setScale (const Vector3 &scale)
 Set scale. More...
 
const Vector3getPivot () const
 
void setPivot (const Vector3 &pivot)
 Set pivot. More...
 
const int getRotationCount () const
 
RotationgetRotation (const int idx)
 Get rotation at given index. More...
 
void addRotation (const Vector3 &axis, const float angle)
 Add rotation. More...
 
void removeRotation (const int idx)
 Remove rotation. More...
 
const Vector3getRotationAxis (const int idx) const
 
void setRotationAxis (const int idx, const Vector3 &axis)
 Set rotation axis. More...
 
const float getRotationAngle (const int idx) const
 
void setRotationAngle (const int idx, const float angle)
 
const QuaterniongetRotationsQuaternion () const
 
const Matrix4x4getTransformationsMatrix () const
 
virtual void fromTransformations (const Transformations &transformations)
 Set up this transformations from given transformations. More...
 
virtual void fromMatrix (const Matrix4x4 &matrix, RotationOrder *rotationOrder)
 Set up this transformations from given matrix and rotation order. More...
 
virtual void update ()
 Computes transformation matrix. More...
 
virtual void applyParentTransformations (const Transformations &parentTransformations)
 Apply parent transformations. More...
 
virtual void invert ()
 Invert this transformations. More...
 

Private Attributes

Vector3 translation
 
Vector3 scale
 
Vector3 pivot
 
Quaternion rotationsQuaternion
 
vector< Rotationrotations
 
Matrix4x4 transformationsMatrix
 

Detailed Description

Transformations which contain scale, rotations and translation.

Author
Andreas Drewke
Version
$Id$

Definition at line 27 of file Transformations.h.

Constructor & Destructor Documentation

◆ Transformations()

Public constructor.

Definition at line 22 of file Transformations.cpp.

◆ ~Transformations()

~Transformations ( )
virtual

Destructor.

Definition at line 29 of file Transformations.cpp.

Member Function Documentation

◆ addRotation()

void addRotation ( const Vector3 axis,
const float  angle 
)
inline

Add rotation.

Parameters
axisaxis
angleangle

Definition at line 113 of file Transformations.h.

◆ applyParentTransformations()

void applyParentTransformations ( const Transformations parentTransformations)
virtual

Apply parent transformations.

Parameters
parentTransformationsparent transformations

Reimplemented in EntityHierarchy, EnvironmentMapping, FogParticleSystem, ImposterObject3D, LinesObject3D, LODObject3D, LODObject3DImposter, Object3DRenderGroup, ObjectParticleSystem, ParticleSystemGroup, and PointsParticleSystem.

Definition at line 85 of file Transformations.cpp.

◆ fromMatrix()

void fromMatrix ( const Matrix4x4 matrix,
RotationOrder rotationOrder 
)
virtual

Set up this transformations from given matrix and rotation order.

Parameters
matrixmatrix
rotationOrderrotation order

Definition at line 38 of file Transformations.cpp.

◆ fromTransformations()

void fromTransformations ( const Transformations transformations)
virtual

◆ getPivot()

const Vector3 & getPivot ( ) const
inline
Returns
pivot or center of rotations

Definition at line 80 of file Transformations.h.

◆ getRotation()

Rotation & getRotation ( const int  idx)
inline

Get rotation at given index.

Parameters
idxrotation index
Returns
rotation

Definition at line 104 of file Transformations.h.

◆ getRotationAngle()

const float getRotationAngle ( const int  idx) const
inline
Parameters
idxrotation index
Returns
rotation angle for rotation with given index

Definition at line 146 of file Transformations.h.

◆ getRotationAxis()

const Vector3 & getRotationAxis ( const int  idx) const
inline
Parameters
idxrotation index
Returns
rotation axis for rotation with given index

Definition at line 129 of file Transformations.h.

◆ getRotationCount()

const int getRotationCount ( ) const
inline
Returns
rotation count

Definition at line 95 of file Transformations.h.

◆ getRotationsQuaternion()

const Quaternion & getRotationsQuaternion ( ) const
inline
Returns
rotations quaternion

Definition at line 162 of file Transformations.h.

◆ getScale()

const Vector3 & getScale ( ) const
inline
Returns
object scale

Definition at line 65 of file Transformations.h.

◆ getTransformationsMatrix()

const Matrix4x4 & getTransformationsMatrix ( ) const
inline
Returns
this transformations matrix

Definition at line 169 of file Transformations.h.

◆ getTranslation()

const Vector3 & getTranslation ( ) const
inline
Returns
object translation

Definition at line 50 of file Transformations.h.

◆ invert()

void invert ( )
virtual

Invert this transformations.

Definition at line 89 of file Transformations.cpp.

◆ removeRotation()

void removeRotation ( const int  idx)
inline

Remove rotation.

Parameters
idxindex

Definition at line 121 of file Transformations.h.

◆ setPivot()

void setPivot ( const Vector3 pivot)
inline

Set pivot.

Parameters
pivotpivot

Definition at line 88 of file Transformations.h.

◆ setRotationAngle()

void setRotationAngle ( const int  idx,
const float  angle 
)
inline
Parameters
idxrotation index
anglerotation angle
Returns
rotation angle for rotation with given index

Definition at line 155 of file Transformations.h.

◆ setRotationAxis()

void setRotationAxis ( const int  idx,
const Vector3 axis 
)
inline

Set rotation axis.

Parameters
idxrotation index
axisrotation axis

Definition at line 138 of file Transformations.h.

◆ setScale()

void setScale ( const Vector3 scale)
inline

Set scale.

Parameters
scalescale

Definition at line 73 of file Transformations.h.

◆ setTranslation()

void setTranslation ( const Vector3 translation)
inline

Set translation.

Parameters
translationtranslation

Definition at line 58 of file Transformations.h.

◆ update()

void update ( )
virtual

Member Data Documentation

◆ pivot

Vector3 pivot
private

Definition at line 31 of file Transformations.h.

◆ rotations

vector<Rotation> rotations
private

Definition at line 33 of file Transformations.h.

◆ rotationsQuaternion

Quaternion rotationsQuaternion
private

Definition at line 32 of file Transformations.h.

◆ scale

Vector3 scale
private

Definition at line 30 of file Transformations.h.

◆ transformationsMatrix

Matrix4x4 transformationsMatrix
private

Definition at line 34 of file Transformations.h.

◆ translation

Vector3 translation
private

Definition at line 29 of file Transformations.h.


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