HatchitGame
Public Member Functions | Friends | List of all members
Hatchit::Game::Transform Class Reference

Public Member Functions

 Transform (float posX, float posY, float posZ, float rotX, float rotY, float rotZ, float scaleX, float scaleY, float scaleZ)
 
 Transform (Math::Vector3 position, Math::Vector3 rotation, Math::Vector3 scale)
 
 Transform (const Transform &transform)
 
Math::Matrix4 * GetWorldMatrix ()
 Returns world transformation matrix. More...
 
Math::Matrix4 * GetLocalMatrix ()
 Returns local transformation matrix. More...
 
void UpdateWorldMatrix ()
 Recomputes world matrix.
 
void SetDirty ()
 Flags transformation matrix for recomputation.
 
void RotateX (float val)
 Rotates around the local X axis. More...
 
void RotateY (float val)
 Rotates around the local Y axis. More...
 
void RotateZ (float val)
 Rotates around the local Z axis. More...
 
void TranslateX (float val)
 Translates on the local X axis. More...
 
void TranslateY (float val)
 Translates on the local Y axis. More...
 
void TranslateZ (float val)
 Translates on the local Z axis. More...
 
void Translate (Math::Vector3 val)
 Translates by Vector3 val. More...
 
Math::Vector3 GetPosition ()
 Returns position as a Vector3. More...
 
Math::Vector3 GetWorldPosition ()
 Returns world position as a Vector3. More...
 
Math::Vector3 GetRotation ()
 Returns rotation as a Vector3. More...
 
Math::Vector3 GetScale ()
 Returns scale as a Vector3. More...
 
Math::Vector3 GetForward ()
 Returns forward vector as a Vector3. More...
 
Math::Vector3 GetUp ()
 Returns up vector as a Vector3. More...
 
Math::Vector3 GetRight ()
 Returns right vector as a Vector3. More...
 
Math::Vector3 * GetRotationRef ()
 Returns pointer to rotation vector. More...
 
void SetPosition (Math::Vector3 val)
 Sets position values from a Vector3. More...
 
void SetRotation (Math::Vector3 val)
 Sets rotation values from a Vector3. More...
 
void SetScale (Math::Vector3 val)
 Sets scale values from a Vector3. More...
 
void SetForward (Math::Vector3 val)
 Sets the forward direction from a Vector3. More...
 
float X () const
 Returns X value of position. More...
 
float Y () const
 Returns Y value of position. More...
 
float Z () const
 Returns Z value of position. More...
 
float RotX () const
 Returns X value of rotation. More...
 
float RotY () const
 Returns Y value of rotation. More...
 
float RotZ () const
 Returns Z value of rotation. More...
 
float ScaleX () const
 Returns X value of scale. More...
 
float ScaleY () const
 Returns Y value of scale. More...
 
float ScaleZ () const
 Returns Z value of scale. More...
 
void DebugPrint ()
 Prints transform data.
 
bool IsDirty ()
 Returns whether or not transformation matrices are dirty. More...
 

Friends

class GameObject
 

Member Function Documentation

Math::Vector3 Hatchit::Game::Transform::GetForward ( )

Returns forward vector as a Vector3.

Returns
Vector3 Forward vector.
Math::Matrix4 * Hatchit::Game::Transform::GetLocalMatrix ( )

Returns local transformation matrix.

Returns
Matrix4* Pointer to local transformation matrix.
Math::Vector3 Hatchit::Game::Transform::GetPosition ( )

Returns position as a Vector3.

Returns
Vector3 Local position vector.
Math::Vector3 Hatchit::Game::Transform::GetRight ( )

Returns right vector as a Vector3.

Returns
Vector3 Right vector.
Math::Vector3 Hatchit::Game::Transform::GetRotation ( )

Returns rotation as a Vector3.

Returns
Vector3 Rotation vector.
Math::Vector3 * Hatchit::Game::Transform::GetRotationRef ( )

Returns pointer to rotation vector.

Returns
Vector3* Pointer to rotation vector.
Math::Vector3 Hatchit::Game::Transform::GetScale ( )

Returns scale as a Vector3.

Returns
Vector3 World position vector.
Math::Vector3 Hatchit::Game::Transform::GetUp ( )

Returns up vector as a Vector3.

Returns
Vector3 Up vector.
Math::Matrix4 * Hatchit::Game::Transform::GetWorldMatrix ( )

Returns world transformation matrix.

Returns
Matrix4* Pointer to world transformation matrix.
Math::Vector3 Hatchit::Game::Transform::GetWorldPosition ( )

Returns world position as a Vector3.

Returns
Vector3 World position vector.
bool Hatchit::Game::Transform::IsDirty ( )

Returns whether or not transformation matrices are dirty.

Returns
bool Value of dirty flag of transformation matrics.
void Hatchit::Game::Transform::RotateX ( float  val)

Rotates around the local X axis.

Parameters
valAmount to rotate around axis.
void Hatchit::Game::Transform::RotateY ( float  val)

Rotates around the local Y axis.

Parameters
valAmount to rotate around axis.
void Hatchit::Game::Transform::RotateZ ( float  val)

Rotates around the local Z axis.

Parameters
valAmount to rotate around axis.
float Hatchit::Game::Transform::RotX ( ) const

Returns X value of rotation.

Returns
float Rotation around X.
float Hatchit::Game::Transform::RotY ( ) const

Returns Y value of rotation.

Returns
float Rotation around Y.
float Hatchit::Game::Transform::RotZ ( ) const

Returns Z value of rotation.

Returns
float Rotation around Z.
float Hatchit::Game::Transform::ScaleX ( ) const

Returns X value of scale.

Returns
float Scale on X axis.
float Hatchit::Game::Transform::ScaleY ( ) const

Returns Y value of scale.

Returns
float Scale on Y axis.
float Hatchit::Game::Transform::ScaleZ ( ) const

Returns Z value of scale.

Returns
float Scale on Z axis.
void Hatchit::Game::Transform::SetForward ( Math::Vector3  val)

Sets the forward direction from a Vector3.

Parameters
valNew forward vector which will be normalized
void Hatchit::Game::Transform::SetPosition ( Math::Vector3  val)

Sets position values from a Vector3.

Parameters
valNew position vector.
void Hatchit::Game::Transform::SetRotation ( Math::Vector3  val)

Sets rotation values from a Vector3.

Parameters
valNew rotation vector.
void Hatchit::Game::Transform::SetScale ( Math::Vector3  val)

Sets scale values from a Vector3.

Parameters
valNew scale vector.
void Hatchit::Game::Transform::Translate ( Math::Vector3  val)

Translates by Vector3 val.

Parameters
valAmount to translate on each axis.
void Hatchit::Game::Transform::TranslateX ( float  val)

Translates on the local X axis.

Parameters
valAmount to translate on axis.
void Hatchit::Game::Transform::TranslateY ( float  val)

Translates on the local Y axis.

Parameters
valAmount to translate on axis.
void Hatchit::Game::Transform::TranslateZ ( float  val)

Translates on the local Z axis.

Parameters
valAmount to translate on axis.
float Hatchit::Game::Transform::X ( ) const

Returns X value of position.

Returns
float X position.
float Hatchit::Game::Transform::Y ( ) const

Returns Y value of position.

Returns
float Y position.
float Hatchit::Game::Transform::Z ( ) const

Returns Z value of position.

Returns
float Z position.

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