Loading...
Searching...
No Matches
hellfire::TransformComponent Class Reference

#include <TransformComponent.h>

Inheritance diagram for hellfire::TransformComponent:
Collaboration diagram for hellfire::TransformComponent:

Public Member Functions

 TransformComponent ()=default
 
glm::vec3 & get_position ()
 
const glm::vec3 & get_position () const
 
void set_position (float x, float y, float z)
 
void set_position (const glm::vec3 &position)
 
const glm::vec3 & get_rotation () const
 
void set_rotation (const glm::vec3 &eulers)
 
void set_rotation (float x, float y, float z)
 
void set_rotation (const glm::quat &quaternion)
 
glm::vec3 get_scale () const
 
glm::vec3 & get_scale ()
 
void set_scale (float x, float y, float z)
 
void set_scale (float value)
 
void set_scale (glm::vec3 &scale)
 
void set_scale (const glm::vec3 &scale)
 
const glm::vec3 & get_world_position () const
 
const glm::mat4 & get_local_matrix () const
 
const glm::mat4 & get_world_matrix () const
 
glm::mat4 get_rotation_matrix () const
 
glm::mat4 get_translation_matrix () const
 
glm::mat4 get_scale_matrix () const
 
void look_at (const glm::vec3 &target, const glm::vec3 &up=glm::vec3(0, 1, 0))
 
void update_local_matrix ()
 
void update_world_matrix (const glm::mat4 &parent_world_matrix)
 
- Public Member Functions inherited from hellfire::Component
virtual ~Component ()=default
 
Entityget_owner () const
 
virtual void on_added (Entity *owner)
 
virtual void on_removed ()
 

Private Attributes

Transform3D transform_
 

Detailed Description

Definition at line 10 of file TransformComponent.h.

Constructor & Destructor Documentation

◆ TransformComponent()

hellfire::TransformComponent::TransformComponent ( )
default

Member Function Documentation

◆ get_local_matrix()

const glm::mat4 & hellfire::TransformComponent::get_local_matrix ( ) const
inline

Definition at line 35 of file TransformComponent.h.

◆ get_position() [1/2]

glm::vec3 & hellfire::TransformComponent::get_position ( )
inline

Definition at line 13 of file TransformComponent.h.

◆ get_position() [2/2]

const glm::vec3 & hellfire::TransformComponent::get_position ( ) const
inline

Definition at line 14 of file TransformComponent.h.

◆ get_rotation()

const glm::vec3 & hellfire::TransformComponent::get_rotation ( ) const
inline

Definition at line 19 of file TransformComponent.h.

◆ get_rotation_matrix()

glm::mat4 hellfire::TransformComponent::get_rotation_matrix ( ) const
inline

Definition at line 38 of file TransformComponent.h.

◆ get_scale() [1/2]

glm::vec3 & hellfire::TransformComponent::get_scale ( )
inline

Definition at line 26 of file TransformComponent.h.

◆ get_scale() [2/2]

glm::vec3 hellfire::TransformComponent::get_scale ( ) const
inline

Definition at line 25 of file TransformComponent.h.

◆ get_scale_matrix()

glm::mat4 hellfire::TransformComponent::get_scale_matrix ( ) const
inline

Definition at line 40 of file TransformComponent.h.

◆ get_translation_matrix()

glm::mat4 hellfire::TransformComponent::get_translation_matrix ( ) const
inline

Definition at line 39 of file TransformComponent.h.

◆ get_world_matrix()

const glm::mat4 & hellfire::TransformComponent::get_world_matrix ( ) const
inline

Definition at line 36 of file TransformComponent.h.

◆ get_world_position()

const glm::vec3 & hellfire::TransformComponent::get_world_position ( ) const
inline

Definition at line 33 of file TransformComponent.h.

◆ look_at()

void hellfire::TransformComponent::look_at ( const glm::vec3 &  target,
const glm::vec3 &  up = glm::vec3(0,1,0) 
)
inline

Definition at line 43 of file TransformComponent.h.

◆ set_position() [1/2]

void hellfire::TransformComponent::set_position ( const glm::vec3 &  position)
inline

Definition at line 16 of file TransformComponent.h.

◆ set_position() [2/2]

void hellfire::TransformComponent::set_position ( float  x,
float  y,
float  z 
)
inline

Definition at line 15 of file TransformComponent.h.

◆ set_rotation() [1/3]

void hellfire::TransformComponent::set_rotation ( const glm::quat &  quaternion)
inline

Definition at line 22 of file TransformComponent.h.

◆ set_rotation() [2/3]

void hellfire::TransformComponent::set_rotation ( const glm::vec3 &  eulers)
inline

Definition at line 20 of file TransformComponent.h.

◆ set_rotation() [3/3]

void hellfire::TransformComponent::set_rotation ( float  x,
float  y,
float  z 
)
inline

Definition at line 21 of file TransformComponent.h.

◆ set_scale() [1/4]

void hellfire::TransformComponent::set_scale ( const glm::vec3 &  scale)
inline

Definition at line 30 of file TransformComponent.h.

◆ set_scale() [2/4]

void hellfire::TransformComponent::set_scale ( float  value)
inline

Definition at line 28 of file TransformComponent.h.

◆ set_scale() [3/4]

void hellfire::TransformComponent::set_scale ( float  x,
float  y,
float  z 
)
inline

Definition at line 27 of file TransformComponent.h.

◆ set_scale() [4/4]

void hellfire::TransformComponent::set_scale ( glm::vec3 &  scale)
inline

Definition at line 29 of file TransformComponent.h.

◆ update_local_matrix()

void hellfire::TransformComponent::update_local_matrix ( )
inline

Definition at line 47 of file TransformComponent.h.

◆ update_world_matrix()

void hellfire::TransformComponent::update_world_matrix ( const glm::mat4 &  parent_world_matrix)
inline

Definition at line 50 of file TransformComponent.h.

Member Data Documentation

◆ transform_

Transform3D hellfire::TransformComponent::transform_
private

Definition at line 55 of file TransformComponent.h.


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