Engine
Frameworkcreatedbymeusableforthecreationofsimplegames.CurrentlysupportsOpenGL(Verysimple)andVulkan.
Public Member Functions | List of all members
Engine::TransformComponent Class Reference

#include <TransformComponent.hpp>

Inheritance diagram for Engine::TransformComponent:
Engine::Component

Public Member Functions

 TransformComponent () noexcept
 
 TransformComponent (bool isStatic) noexcept
 
 TransformComponent (glm::vec3 position) noexcept
 
 TransformComponent (glm::vec3 position, bool isStatic) noexcept
 
 TransformComponent (glm::vec3 position, glm::vec3 rotation) noexcept
 
 TransformComponent (glm::vec3 position, glm::vec3 rotation, bool isStatic) noexcept
 
 TransformComponent (glm::vec3 position, glm::vec3 rotation, glm::vec3 scale) noexcept
 
 TransformComponent (glm::vec3 position, glm::vec3 rotation, glm::vec3 scale, bool isStatic) noexcept
 
void SetPosition (glm::vec3 position) noexcept
 
void SetPosition (float x, float y, float z) noexcept
 
glm::vec3 GetPosition () noexcept
 
void SetRotation (glm::vec3 rotation) noexcept
 
void SetRotation (float x, float y, float z) noexcept
 
glm::vec3 GetRotation () noexcept
 
void SetScale (glm::vec3 scale) noexcept
 
void SetScale (float x, float y, float z) noexcept
 
glm::vec3 GetScale () noexcept
 
void SetModelMatrix (glm::mat4x4 modelMatrix) noexcept
 
void SetModelMatrix (float modelMatrix[16]) noexcept
 
void SetModelMatrix (glm::vec4 modelMatrix[4]) noexcept
 
glm::mat4x4 GetModelMatrix () noexcept
 
void SetIsStatic (bool isStatic) noexcept
 
bool GetIsStatic () noexcept
 
void Translate (glm::vec3 positionToAdd) noexcept
 
void Translate (float x) noexcept
 
void Translate (float x, float y) noexcept
 
void Translate (float x, float y, float z) noexcept
 
void AddRotate (glm::vec3 rotationToAdd) noexcept
 
void AddRotate (float x) noexcept
 
void AddRotate (float x, float y) noexcept
 
void AddRotate (float x, float y, float z) noexcept
 
void AddScale (glm::vec3 scaleToAdd) noexcept
 
void AddScale (float x) noexcept
 
void AddScale (float x, float y) noexcept
 
void AddScale (float x, float y, float z) noexcept
 
glm::vec3 GetRight () noexcept
 
glm::vec3 GetUp () noexcept
 
glm::vec3 GetForward () noexcept
 
void LookAt (TransformComponent target) noexcept
 
void LookAt (glm::vec3 targetPosition) noexcept
 
void RotateAround (float angle, glm::vec3 axis) noexcept
 
void Update () override
 The update method of this component. NOTE: This method will not be called in case the entity is disabled. More...
 
void UpdateModelMatrix () noexcept
 
bool operator!= (TransformComponent &other)
 
bool operator== (TransformComponent &other)
 
- Public Member Functions inherited from Engine::Component
virtual ~Component ()=default
 
eastl::weak_ptr< EntityGetOwner () const
 This method allows you to get the entity holding this component. More...
 

Additional Inherited Members

- Public Attributes inherited from Engine::Component
bool isEnabled
 
- Protected Member Functions inherited from Engine::Component
 Component ()
 
virtual void InitializeComponent ()
 This method is used to initialize your component in. This method is called after the setting of the owner. More...
 
virtual void OnComponentAdded (eastl::weak_ptr< Component > addedComponent)
 This method will be called whenever a component has been added to the entity. More...
 
virtual void OnComponentRemoved (eastl::weak_ptr< Component > removedComponent)
 This method will be called whenever a component has been removed from the entity. More...
 
template<typename ComponentType >
eastl::weak_ptr< ComponentType > GetComponent ()
 This method allows you to get the first component of the given type. More...
 
template<typename ComponentType >
eastl::vector< eastl::weak_ptr< ComponentType > > GetComponents ()
 This method allows you to get all of the components of the given type. More...
 
eastl::vector< eastl::shared_ptr< Component > > GetAllComponents () const
 Returns all the components of this entity. More...
 
template<class ComponentType , class... Args>
eastl::weak_ptr< ComponentType > AddComponent (Args &&...args)
 Allows you to create a component of the given type. More...
 
template<class ComponentType , class... Args>
eastl::vector< eastl::weak_ptr< ComponentType > > AddComponents (size_t count, Args &&...args)
 Allows you to create X amount of components of the given type. More...
 
template<typename ComponentType >
void RemoveComponent (size_t amountToRemove=1) const
 Allows X amount of components of the given type. More...
 
template<typename ComponentType >
void RemoveAllComponents () const
 Deletes all the components of the given type. More...
 
template<typename archive >
void SaveBaseComponent (archive ar)
 Saves the data of this component to a archive (all derived classes have their own version, but if needed they can call this one as a failsafe/default version) More...
 
template<typename archive >
void LoadBaseComponent (archive ar)
 loads the data from the archive to this component (all derived classes have their own version, but if needed they can call this one as a failsafe/default version) More...
 
virtual void OnBeginContact (eastl::weak_ptr< Entity > entity)
 
virtual void OnEndContact (eastl::weak_ptr< Entity > entity)
 
eastl::weak_ptr< ComponentGetPointerRefence () const
 This method allows you to get a direct refence to the weak pointer of this component. More...
 
template<typename ComponentType >
eastl::weak_ptr< ComponentType > GetPointerRefence ()
 This method allows you to get a direct refence to the weak pointer of this component. More...
 

Detailed Description

Definition at line 8 of file TransformComponent.hpp.

Constructor & Destructor Documentation

Engine::TransformComponent::TransformComponent ( )
explicitnoexcept

Definition at line 7 of file TransformComponent.cpp.

Engine::TransformComponent::TransformComponent ( bool  isStatic)
explicitnoexcept

Definition at line 11 of file TransformComponent.cpp.

Engine::TransformComponent::TransformComponent ( glm::vec3  position)
explicitnoexcept

Definition at line 15 of file TransformComponent.cpp.

Engine::TransformComponent::TransformComponent ( glm::vec3  position,
bool  isStatic 
)
explicitnoexcept

Definition at line 19 of file TransformComponent.cpp.

Engine::TransformComponent::TransformComponent ( glm::vec3  position,
glm::vec3  rotation 
)
explicitnoexcept

Definition at line 23 of file TransformComponent.cpp.

Engine::TransformComponent::TransformComponent ( glm::vec3  position,
glm::vec3  rotation,
bool  isStatic 
)
explicitnoexcept

Definition at line 27 of file TransformComponent.cpp.

Engine::TransformComponent::TransformComponent ( glm::vec3  position,
glm::vec3  rotation,
glm::vec3  scale 
)
explicitnoexcept

Definition at line 31 of file TransformComponent.cpp.

Engine::TransformComponent::TransformComponent ( glm::vec3  position,
glm::vec3  rotation,
glm::vec3  scale,
bool  isStatic 
)
explicitnoexcept

Definition at line 35 of file TransformComponent.cpp.

Member Function Documentation

void Engine::TransformComponent::AddRotate ( glm::vec3  rotationToAdd)
noexcept

Definition at line 156 of file TransformComponent.cpp.

void Engine::TransformComponent::AddRotate ( float  x)
noexcept

Definition at line 163 of file TransformComponent.cpp.

void Engine::TransformComponent::AddRotate ( float  x,
float  y 
)
noexcept

Definition at line 168 of file TransformComponent.cpp.

void Engine::TransformComponent::AddRotate ( float  x,
float  y,
float  z 
)
noexcept

Definition at line 173 of file TransformComponent.cpp.

void Engine::TransformComponent::AddScale ( glm::vec3  scaleToAdd)
noexcept

Definition at line 178 of file TransformComponent.cpp.

void Engine::TransformComponent::AddScale ( float  x)
noexcept

Definition at line 186 of file TransformComponent.cpp.

void Engine::TransformComponent::AddScale ( float  x,
float  y 
)
noexcept

Definition at line 191 of file TransformComponent.cpp.

void Engine::TransformComponent::AddScale ( float  x,
float  y,
float  z 
)
noexcept

Definition at line 196 of file TransformComponent.cpp.

glm::vec3 Engine::TransformComponent::GetForward ( )
noexcept

Definition at line 211 of file TransformComponent.cpp.

bool Engine::TransformComponent::GetIsStatic ( )
noexcept

Definition at line 128 of file TransformComponent.cpp.

glm::mat4x4 Engine::TransformComponent::GetModelMatrix ( )
noexcept

Definition at line 118 of file TransformComponent.cpp.

glm::vec3 Engine::TransformComponent::GetPosition ( )
noexcept

Definition at line 53 of file TransformComponent.cpp.

glm::vec3 Engine::TransformComponent::GetRight ( )
noexcept

Definition at line 201 of file TransformComponent.cpp.

glm::vec3 Engine::TransformComponent::GetRotation ( )
noexcept

Definition at line 71 of file TransformComponent.cpp.

glm::vec3 Engine::TransformComponent::GetScale ( )
noexcept

Definition at line 89 of file TransformComponent.cpp.

glm::vec3 Engine::TransformComponent::GetUp ( )
noexcept

Definition at line 206 of file TransformComponent.cpp.

void Engine::TransformComponent::LookAt ( TransformComponent  target)
noexcept

Definition at line 216 of file TransformComponent.cpp.

void Engine::TransformComponent::LookAt ( glm::vec3  targetPosition)
noexcept

Definition at line 221 of file TransformComponent.cpp.

bool Engine::TransformComponent::operator!= ( TransformComponent other)

Definition at line 257 of file TransformComponent.cpp.

bool Engine::TransformComponent::operator== ( TransformComponent other)

Definition at line 265 of file TransformComponent.cpp.

void Engine::TransformComponent::RotateAround ( float  angle,
glm::vec3  axis 
)
noexcept

Definition at line 229 of file TransformComponent.cpp.

void Engine::TransformComponent::SetIsStatic ( bool  isStatic)
noexcept

Definition at line 123 of file TransformComponent.cpp.

void Engine::TransformComponent::SetModelMatrix ( glm::mat4x4  modelMatrix)
noexcept

Definition at line 94 of file TransformComponent.cpp.

void Engine::TransformComponent::SetModelMatrix ( float  modelMatrix[16])
noexcept

Definition at line 102 of file TransformComponent.cpp.

void Engine::TransformComponent::SetModelMatrix ( glm::vec4  modelMatrix[4])
noexcept

Definition at line 110 of file TransformComponent.cpp.

void Engine::TransformComponent::SetPosition ( glm::vec3  position)
noexcept

Definition at line 40 of file TransformComponent.cpp.

void Engine::TransformComponent::SetPosition ( float  x,
float  y,
float  z 
)
noexcept

Definition at line 48 of file TransformComponent.cpp.

void Engine::TransformComponent::SetRotation ( glm::vec3  rotation)
noexcept

Definition at line 58 of file TransformComponent.cpp.

void Engine::TransformComponent::SetRotation ( float  x,
float  y,
float  z 
)
noexcept

Definition at line 66 of file TransformComponent.cpp.

void Engine::TransformComponent::SetScale ( glm::vec3  scale)
noexcept

Definition at line 76 of file TransformComponent.cpp.

void Engine::TransformComponent::SetScale ( float  x,
float  y,
float  z 
)
noexcept

Definition at line 84 of file TransformComponent.cpp.

void Engine::TransformComponent::Translate ( glm::vec3  positionToAdd)
noexcept

Definition at line 133 of file TransformComponent.cpp.

void Engine::TransformComponent::Translate ( float  x)
noexcept

Definition at line 141 of file TransformComponent.cpp.

void Engine::TransformComponent::Translate ( float  x,
float  y 
)
noexcept

Definition at line 146 of file TransformComponent.cpp.

void Engine::TransformComponent::Translate ( float  x,
float  y,
float  z 
)
noexcept

Definition at line 151 of file TransformComponent.cpp.

void Engine::TransformComponent::Update ( )
overridevirtual

The update method of this component. NOTE: This method will not be called in case the entity is disabled.

Reimplemented from Engine::Component.

Definition at line 240 of file TransformComponent.cpp.

void Engine::TransformComponent::UpdateModelMatrix ( )
noexcept

Definition at line 247 of file TransformComponent.cpp.


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