Defines spatial properties and provides model matrix calculation.
More...
#include <transform_component.hpp>
|
| glm::mat4 | getModelMatrix () const |
| | Computes the model transformation matrix.
|
Defines spatial properties and provides model matrix calculation.
◆ getModelMatrix()
| glm::mat4 solarsim::TransformComponent::getModelMatrix |
( |
| ) |
const |
|
inline |
Computes the model transformation matrix.
- Returns
- glm::mat4 The composed model matrix (translation * rotation * scale)
- Note
- Only recalculates when dirty flag is set
- Warning
- Modifying position, rotation, or scale does NOT currently set dirty=true automatically
◆ dirty
| bool solarsim::TransformComponent::dirty = true |
|
mutable |
Flag indication if matrix needs recalculation
◆ modelMatrix
| glm::mat4 solarsim::TransformComponent::modelMatrix |
|
mutable |
Cached tranformation matrix (set via getModelMatrix below)
◆ position
| glm::vec3 solarsim::TransformComponent::position {0.0f} |
World space position vector
◆ rotation
| glm::quat solarsim::TransformComponent::rotation {1.0f, 0.0f, 0.0f, 0.0f} |
Orientation as a quaternion
◆ scale
| glm::vec3 solarsim::TransformComponent::scale {1.0f} |
The documentation for this struct was generated from the following file: