Represents the position, rotation, and scale of an entity in 3D space.
More...
#include <Transform.hpp>
|
| glm::quat | rotationQuat () const |
| | Converts the Euler rotation angles to a quaternion.
|
| glm::vec3 | forward () const |
| | Gets the forward direction vector in local space.
|
| glm::vec3 | right () const |
| | Gets the right direction vector in local space.
|
| glm::vec3 | up () const |
| | Gets the up direction vector in local space.
|
| glm::mat4 | matrix () const |
| | Computes the model matrix representing the transform.
|
| | Transform ()=default |
| | Default constructor for Transform.
|
| | Transform (glm::vec3 pos, glm::vec3 rot=glm::vec3(0.f), glm::vec3 s=glm::vec3(1.f)) |
| | Construct a new Transform object.
|
Represents the position, rotation, and scale of an entity in 3D space.
◆ Transform() [1/2]
◆ Transform() [2/2]
| Transform::Transform |
( |
glm::vec3 | pos, |
|
|
glm::vec3 | rot = glm::vec3(0.f), |
|
|
glm::vec3 | s = glm::vec3(1.f) ) |
|
inline |
Construct a new Transform object.
- Parameters
-
| pos | Initial position. |
| rot | Initial rotation. |
| s | Initial scale. |
◆ forward()
| glm::vec3 Transform::forward |
( |
| ) |
const |
|
inline |
Gets the forward direction vector in local space.
- Returns
- Normalized forward vector.
◆ matrix()
| glm::mat4 Transform::matrix |
( |
| ) |
const |
|
inline |
Computes the model matrix representing the transform.
- Returns
- The 4x4 transform matrix.
◆ right()
| glm::vec3 Transform::right |
( |
| ) |
const |
|
inline |
Gets the right direction vector in local space.
- Returns
- Normalized right vector.
◆ rotationQuat()
| glm::quat Transform::rotationQuat |
( |
| ) |
const |
|
inline |
Converts the Euler rotation angles to a quaternion.
- Returns
- The rotation quaternion.
◆ up()
| glm::vec3 Transform::up |
( |
| ) |
const |
|
inline |
Gets the up direction vector in local space.
- Returns
- Normalized up vector.
◆ position
| glm::vec3 Transform::position { 0.0f } |
◆ rotation
◆ scale
| glm::vec3 Transform::scale { 1.0f } |
The documentation for this struct was generated from the following file: