Overload  1.1
Game engine with editor
Public Member Functions | Public Attributes | List of all members
OvMaths::FTransform Class Reference

#include <FTransform.h>

Public Member Functions

 FTransform (FVector3 p_localPosition=FVector3(0.0f, 0.0f, 0.0f), FQuaternion p_localRotation=FQuaternion::Identity(), FVector3 p_localScale=FVector3(1.0f, 1.0f, 1.0f))
 
 ~FTransform ()
 
void NotificationHandler (Internal::TransformNotifier::ENotification p_notification)
 
void SetParent (FTransform &p_parent)
 
bool RemoveParent ()
 
bool HasParent () const
 
void GenerateMatrices (FVector3 p_position, FQuaternion p_rotation, FVector3 p_scale)
 
void UpdateWorldMatrix ()
 
void SetLocalPosition (FVector3 p_newPosition)
 
void SetLocalRotation (FQuaternion p_newRotation)
 
void SetLocalScale (FVector3 p_newScale)
 
void TranslateLocal (const FVector3 &p_translation)
 
void RotateLocal (const FQuaternion &p_rotation)
 
void ScaleLocal (const FVector3 &p_scale)
 
const FVector3GetLocalPosition () const
 
const FQuaternionGetLocalRotation () const
 
const FVector3GetLocalScale () const
 
const FVector3GetWorldPosition () const
 
const FQuaternionGetWorldRotation () const
 
const FVector3GetWorldScale () const
 
const FMatrix4GetLocalMatrix () const
 
const FMatrix4GetWorldMatrix () const
 
FVector3 GetWorldForward () const
 
FVector3 GetWorldUp () const
 
FVector3 GetWorldRight () const
 
FVector3 GetLocalForward () const
 
FVector3 GetLocalUp () const
 
FVector3 GetLocalRight () const
 

Public Attributes

Internal::TransformNotifier Notifier
 
Internal::TransformNotifier::NotificationHandlerID m_notificationHandlerID
 

Detailed Description

Mathematic representation of a 3D transformation with float precision

Constructor & Destructor Documentation

◆ FTransform()

OvMaths::FTransform::FTransform ( FVector3  p_localPosition = FVector3(0.0f, 0.0f, 0.0f),
FQuaternion  p_localRotation = FQuaternion::Identity(),
FVector3  p_localScale = FVector3(1.0f, 1.0f, 1.0f) 
)

Create a transform without setting a parent

Parameters
p_localPosition
p_localRotation
p_localScale@project: Overload
Author
: Overload Tech. @restrictions: This software may not be resold, redistributed or otherwise conveyed to a third party.

◆ ~FTransform()

OvMaths::FTransform::~FTransform ( )

Destructor of the transform. Will notify children on destruction

Member Function Documentation

◆ GenerateMatrices()

void OvMaths::FTransform::GenerateMatrices ( FVector3  p_position,
FQuaternion  p_rotation,
FVector3  p_scale 
)

Initialize transform with raw data

Parameters
p_position
p_rotation
p_scale

◆ GetLocalForward()

OvMaths::FVector3 OvMaths::FTransform::GetLocalForward ( ) const

Return the transform local forward

◆ GetLocalMatrix()

const OvMaths::FMatrix4 & OvMaths::FTransform::GetLocalMatrix ( ) const

Return the local matrix

◆ GetLocalPosition()

const OvMaths::FVector3 & OvMaths::FTransform::GetLocalPosition ( ) const

Return the position in local space

◆ GetLocalRight()

OvMaths::FVector3 OvMaths::FTransform::GetLocalRight ( ) const

Return the transform local right

◆ GetLocalRotation()

const OvMaths::FQuaternion & OvMaths::FTransform::GetLocalRotation ( ) const

Return the rotation in local space

◆ GetLocalScale()

const OvMaths::FVector3 & OvMaths::FTransform::GetLocalScale ( ) const

Return the scale in local space

◆ GetLocalUp()

OvMaths::FVector3 OvMaths::FTransform::GetLocalUp ( ) const

Return the transform local up

◆ GetWorldForward()

OvMaths::FVector3 OvMaths::FTransform::GetWorldForward ( ) const

Return the transform world forward

◆ GetWorldMatrix()

const OvMaths::FMatrix4 & OvMaths::FTransform::GetWorldMatrix ( ) const

Return the world matrix

◆ GetWorldPosition()

const OvMaths::FVector3 & OvMaths::FTransform::GetWorldPosition ( ) const

Return the position in world space

◆ GetWorldRight()

OvMaths::FVector3 OvMaths::FTransform::GetWorldRight ( ) const

Return the transform world right

◆ GetWorldRotation()

const OvMaths::FQuaternion & OvMaths::FTransform::GetWorldRotation ( ) const

Return the rotation in world space

◆ GetWorldScale()

const OvMaths::FVector3 & OvMaths::FTransform::GetWorldScale ( ) const

Return the scale in world space

◆ GetWorldUp()

OvMaths::FVector3 OvMaths::FTransform::GetWorldUp ( ) const

Return the transform world up

◆ HasParent()

bool OvMaths::FTransform::HasParent ( ) const

Check if the transform has a parent

◆ NotificationHandler()

void OvMaths::FTransform::NotificationHandler ( Internal::TransformNotifier::ENotification  p_notification)

Simple callback that will treat parent notifications

Parameters
p_notification

◆ RemoveParent()

bool OvMaths::FTransform::RemoveParent ( )

Set the parent to nullptr and recalculate world matrix Returns true on success

◆ RotateLocal()

void OvMaths::FTransform::RotateLocal ( const FQuaternion p_rotation)

Rotate in the local space

Parameters
p_rotation

◆ ScaleLocal()

void OvMaths::FTransform::ScaleLocal ( const FVector3 p_scale)

Scale in the local space

Parameters
p_scale

◆ SetLocalPosition()

void OvMaths::FTransform::SetLocalPosition ( FVector3  p_newPosition)

Set the position of the transform in the local space

Parameters
p_newPosition

◆ SetLocalRotation()

void OvMaths::FTransform::SetLocalRotation ( FQuaternion  p_newRotation)

Set the rotation of the transform in the local space

Parameters
p_newRotation

◆ SetLocalScale()

void OvMaths::FTransform::SetLocalScale ( FVector3  p_newScale)

Set the scale of the transform in the local space

Parameters
p_newScale

◆ SetParent()

void OvMaths::FTransform::SetParent ( FTransform p_parent)

Defines a parent to the transform

Parameters
p_parent

◆ TranslateLocal()

void OvMaths::FTransform::TranslateLocal ( const FVector3 p_translation)

Translate in the local space

Parameters
p_translation

◆ UpdateWorldMatrix()

void OvMaths::FTransform::UpdateWorldMatrix ( )

Re-update world matrix to use parent transformations

Member Data Documentation

◆ m_notificationHandlerID

Internal::TransformNotifier::NotificationHandlerID OvMaths::FTransform::m_notificationHandlerID

◆ Notifier

Internal::TransformNotifier OvMaths::FTransform::Notifier

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