Overload  1.1
Game engine with editor
Public Member Functions | List of all members
OvCore::ECS::Components::CTransform Class Reference

#include <CTransform.h>

Inheritance diagram for OvCore::ECS::Components::CTransform:
OvCore::ECS::Components::AComponent OvCore::API::IInspectorItem OvCore::API::ISerializable

Public Member Functions

 CTransform (ECS::Actor &p_owner, struct OvMaths::FVector3 p_localPosition=OvMaths::FVector3(0.0f, 0.0f, 0.0f), OvMaths::FQuaternion p_localRotation=OvMaths::FQuaternion::Identity(), struct OvMaths::FVector3 p_localScale=OvMaths::FVector3(1.0f, 1.0f, 1.0f))
 
std::string GetName () override
 
void SetParent (CTransform &p_parent)
 
bool RemoveParent ()
 
bool HasParent () const
 
void SetLocalPosition (struct OvMaths::FVector3 p_newPosition)
 
void SetLocalRotation (OvMaths::FQuaternion p_newRotation)
 
void SetLocalScale (struct OvMaths::FVector3 p_newScale)
 
void TranslateLocal (const struct OvMaths::FVector3 &p_translation)
 
void RotateLocal (const OvMaths::FQuaternion &p_rotation)
 
void ScaleLocal (const struct OvMaths::FVector3 &p_scale)
 
const OvMaths::FVector3GetLocalPosition () const
 
const OvMaths::FQuaternionGetLocalRotation () const
 
const OvMaths::FVector3GetLocalScale () const
 
const OvMaths::FVector3GetWorldPosition () const
 
const OvMaths::FQuaternionGetWorldRotation () const
 
const OvMaths::FVector3GetWorldScale () const
 
const OvMaths::FMatrix4GetLocalMatrix () const
 
const OvMaths::FMatrix4GetWorldMatrix () const
 
OvMaths::FTransformGetFTransform ()
 
OvMaths::FVector3 GetWorldForward () const
 
OvMaths::FVector3 GetWorldUp () const
 
OvMaths::FVector3 GetWorldRight () const
 
OvMaths::FVector3 GetLocalForward () const
 
OvMaths::FVector3 GetLocalUp () const
 
OvMaths::FVector3 GetLocalRight () const
 
virtual void OnSerialize (tinyxml2::XMLDocument &p_doc, tinyxml2::XMLNode *p_node) override
 
virtual void OnDeserialize (tinyxml2::XMLDocument &p_doc, tinyxml2::XMLNode *p_node) override
 
virtual void OnInspector (OvUI::Internal::WidgetContainer &p_root) override
 
- Public Member Functions inherited from OvCore::ECS::Components::AComponent
 AComponent (ECS::Actor &p_owner)
 
virtual ~AComponent ()
 
virtual void OnAwake ()
 
virtual void OnStart ()
 
virtual void OnEnable ()
 
virtual void OnDisable ()
 
virtual void OnDestroy ()
 
virtual void OnUpdate (float p_deltaTime)
 
virtual void OnFixedUpdate (float p_deltaTime)
 
virtual void OnLateUpdate (float p_deltaTime)
 
virtual void OnCollisionEnter (Components::CPhysicalObject &p_otherObject)
 
virtual void OnCollisionStay (Components::CPhysicalObject &p_otherObject)
 
virtual void OnCollisionExit (Components::CPhysicalObject &p_otherObject)
 
virtual void OnTriggerEnter (Components::CPhysicalObject &p_otherObject)
 
virtual void OnTriggerStay (Components::CPhysicalObject &p_otherObject)
 
virtual void OnTriggerExit (Components::CPhysicalObject &p_otherObject)
 

Additional Inherited Members

- Public Attributes inherited from OvCore::ECS::Components::AComponent
ECS::Actorowner
 

Detailed Description

Represents the 3D transformations applied to an actor

Constructor & Destructor Documentation

◆ CTransform()

OvCore::ECS::Components::CTransform::CTransform ( ECS::Actor p_owner,
struct OvMaths::FVector3  p_localPosition = OvMaths::FVector3(0.0f, 0.0f, 0.0f),
OvMaths::FQuaternion  p_localRotation = OvMaths::FQuaternion::Identity(),
struct OvMaths::FVector3  p_localScale = OvMaths::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.

Member Function Documentation

◆ GetFTransform()

OvMaths::FTransform & OvCore::ECS::Components::CTransform::GetFTransform ( )

Return the FTransform attached to the CTransform

◆ GetLocalForward()

OvMaths::FVector3 OvCore::ECS::Components::CTransform::GetLocalForward ( ) const

Return the transform local forward

◆ GetLocalMatrix()

const OvMaths::FMatrix4 & OvCore::ECS::Components::CTransform::GetLocalMatrix ( ) const

Return the local matrix

◆ GetLocalPosition()

const OvMaths::FVector3 & OvCore::ECS::Components::CTransform::GetLocalPosition ( ) const

Return the position in local space

◆ GetLocalRight()

OvMaths::FVector3 OvCore::ECS::Components::CTransform::GetLocalRight ( ) const

Return the transform local right

◆ GetLocalRotation()

const OvMaths::FQuaternion & OvCore::ECS::Components::CTransform::GetLocalRotation ( ) const

Return the rotation in local space

◆ GetLocalScale()

const OvMaths::FVector3 & OvCore::ECS::Components::CTransform::GetLocalScale ( ) const

Return the scale in local space

◆ GetLocalUp()

OvMaths::FVector3 OvCore::ECS::Components::CTransform::GetLocalUp ( ) const

Return the transform local up

◆ GetName()

std::string OvCore::ECS::Components::CTransform::GetName ( )
overridevirtual

Returns the name of the component

Implements OvCore::ECS::Components::AComponent.

◆ GetWorldForward()

OvMaths::FVector3 OvCore::ECS::Components::CTransform::GetWorldForward ( ) const

Return the transform world forward

◆ GetWorldMatrix()

const OvMaths::FMatrix4 & OvCore::ECS::Components::CTransform::GetWorldMatrix ( ) const

Return the world matrix

◆ GetWorldPosition()

const OvMaths::FVector3 & OvCore::ECS::Components::CTransform::GetWorldPosition ( ) const

Return the position in world space

◆ GetWorldRight()

OvMaths::FVector3 OvCore::ECS::Components::CTransform::GetWorldRight ( ) const

Return the transform world right

◆ GetWorldRotation()

const OvMaths::FQuaternion & OvCore::ECS::Components::CTransform::GetWorldRotation ( ) const

Return the rotation in world space

◆ GetWorldScale()

const OvMaths::FVector3 & OvCore::ECS::Components::CTransform::GetWorldScale ( ) const

Return the scale in world space

◆ GetWorldUp()

OvMaths::FVector3 OvCore::ECS::Components::CTransform::GetWorldUp ( ) const

Return the transform world up

◆ HasParent()

bool OvCore::ECS::Components::CTransform::HasParent ( ) const

Check if the transform has a parent

◆ OnDeserialize()

void OvCore::ECS::Components::CTransform::OnDeserialize ( tinyxml2::XMLDocument &  p_doc,
tinyxml2::XMLNode *  p_node 
)
overridevirtual

Deserialize the component

Parameters
p_doc
p_node

Implements OvCore::API::ISerializable.

◆ OnInspector()

void OvCore::ECS::Components::CTransform::OnInspector ( OvUI::Internal::WidgetContainer p_root)
overridevirtual

Defines how the component should be drawn in the inspector

Parameters
p_root

Implements OvCore::API::IInspectorItem.

◆ OnSerialize()

void OvCore::ECS::Components::CTransform::OnSerialize ( tinyxml2::XMLDocument &  p_doc,
tinyxml2::XMLNode *  p_node 
)
overridevirtual

Serialize the component

Parameters
p_doc
p_node

Implements OvCore::API::ISerializable.

◆ RemoveParent()

bool OvCore::ECS::Components::CTransform::RemoveParent ( )

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

◆ RotateLocal()

void OvCore::ECS::Components::CTransform::RotateLocal ( const OvMaths::FQuaternion p_rotation)

Rotate in the local space

Parameters
p_rotation

◆ ScaleLocal()

void OvCore::ECS::Components::CTransform::ScaleLocal ( const struct OvMaths::FVector3 p_scale)

Scale in the local space

Parameters
p_scale

◆ SetLocalPosition()

void OvCore::ECS::Components::CTransform::SetLocalPosition ( struct OvMaths::FVector3  p_newPosition)

Set the position of the transform in the local space

Parameters
p_newPosition

◆ SetLocalRotation()

void OvCore::ECS::Components::CTransform::SetLocalRotation ( OvMaths::FQuaternion  p_newRotation)

Set the rotation of the transform in the local space

Parameters
p_newRotation

◆ SetLocalScale()

void OvCore::ECS::Components::CTransform::SetLocalScale ( struct OvMaths::FVector3  p_newScale)

Set the scale of the transform in the local space

Parameters
p_newScale

◆ SetParent()

void OvCore::ECS::Components::CTransform::SetParent ( CTransform p_parent)

Defines a parent to the transform

Parameters
p_parent

◆ TranslateLocal()

void OvCore::ECS::Components::CTransform::TranslateLocal ( const struct OvMaths::FVector3 p_translation)

Translate in the local space

Parameters
p_translation

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