Raftel Engine
 
Loading...
Searching...
No Matches
Raftel::TransformComponent Struct Reference

Represents the transformation component of an entity. More...

#include <components.hpp>

Public Member Functions

glm::vec3 GetUpVector () const
 Gets the up vector of the transformation.
 
glm::vec3 GetRightVector () const
 Gets the right vector of the transformation.
 
glm::vec3 GetForwardVector () const
 Gets the forward vector of the transformation.
 
 TransformComponent ()
 Default constructor initializing transformation parameters.
 
 TransformComponent (const glm::vec3 &pos, const glm::vec3 &rot, const glm::vec3 &sca)
 Constructor initializing with position, rotation, and scale.
 
void Update ()
 Updates the transformation matrix.
 

Public Attributes

glm::vec3 position
 
glm::vec3 rotation
 
glm::vec3 scale
 
glm::mat4 transform
 

Detailed Description

Represents the transformation component of an entity.

Definition at line 36 of file components.hpp.

Constructor & Destructor Documentation

◆ TransformComponent() [1/2]

Raftel::TransformComponent::TransformComponent ( )
inline

Default constructor initializing transformation parameters.

Definition at line 68 of file components.hpp.

◆ TransformComponent() [2/2]

Raftel::TransformComponent::TransformComponent ( const glm::vec3 & pos,
const glm::vec3 & rot,
const glm::vec3 & sca )
inline

Constructor initializing with position, rotation, and scale.

Parameters
posInitial position.
rotInitial rotation.
scaInitial scale.

Definition at line 75 of file components.hpp.

Member Function Documentation

◆ GetForwardVector()

glm::vec3 Raftel::TransformComponent::GetForwardVector ( ) const
inline

Gets the forward vector of the transformation.

Returns
Normalized forward vector.

Definition at line 61 of file components.hpp.

◆ GetRightVector()

glm::vec3 Raftel::TransformComponent::GetRightVector ( ) const
inline

Gets the right vector of the transformation.

Returns
Normalized right vector.

Definition at line 53 of file components.hpp.

◆ GetUpVector()

glm::vec3 Raftel::TransformComponent::GetUpVector ( ) const
inline

Gets the up vector of the transformation.

Returns
Normalized up vector.

Definition at line 46 of file components.hpp.

◆ Update()

void Raftel::TransformComponent::Update ( )
inline

Updates the transformation matrix.

Definition at line 80 of file components.hpp.

Member Data Documentation

◆ position

glm::vec3 Raftel::TransformComponent::position

Position of the entity.

Definition at line 37 of file components.hpp.

◆ rotation

glm::vec3 Raftel::TransformComponent::rotation

Rotation of the entity.

Definition at line 38 of file components.hpp.

◆ scale

glm::vec3 Raftel::TransformComponent::scale

Scale of the entity.

Definition at line 39 of file components.hpp.

◆ transform

glm::mat4 Raftel::TransformComponent::transform

Transformation matrix.

Definition at line 40 of file components.hpp.


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