Structure of Arrays representing translation, rotation, and scaling vectors.
More...
#include <TransformSoA.hpp>
|
| void | clear () |
| | Clears all vector arrays.
|
| size_t | push (const glm::vec3 &pos, const glm::vec3 &rot, const glm::vec3 &scale=glm::vec3(1.0f)) |
| | Appends transform component values.
|
| size_t | size () const |
| | Gets total transform entries count.
|
| glm::mat4 | modelMatrix (size_t i) const |
| | Computes the model matrix for a specific index.
|
| glm::vec3 | forward (size_t i) const |
| | Retrieves local forward direction vector for index.
|
| glm::vec3 | up (size_t i) const |
| | Retrieves local up direction vector for index.
|
| glm::vec3 | right (size_t i) const |
| | Retrieves local right direction vector for index.
|
|
| std::vector< glm::vec3 > | positions |
| | 3D position vectors.
|
| std::vector< glm::vec3 > | rotations |
| | 3D Euler rotation vectors in degrees.
|
| std::vector< glm::vec3 > | scales |
| | 3D scale vectors.
|
Structure of Arrays representing translation, rotation, and scaling vectors.
◆ clear()
| void TransformSoA::clear |
( |
| ) |
|
|
inline |
Clears all vector arrays.
◆ forward()
| glm::vec3 TransformSoA::forward |
( |
size_t | i | ) |
const |
|
inline |
Retrieves local forward direction vector for index.
- Parameters
-
- Returns
- Forward vector.
◆ modelMatrix()
| glm::mat4 TransformSoA::modelMatrix |
( |
size_t | i | ) |
const |
|
inline |
Computes the model matrix for a specific index.
- Parameters
-
- Returns
- 4x4 model matrix.
◆ push()
| size_t TransformSoA::push |
( |
const glm::vec3 & | pos, |
|
|
const glm::vec3 & | rot, |
|
|
const glm::vec3 & | scale = glm::vec3(1.0f) ) |
|
inline |
Appends transform component values.
- Parameters
-
| pos | 3D position. |
| rot | 3D Euler rotation. |
| scale | 3D scale. |
- Returns
- The index of the added transform.
◆ right()
| glm::vec3 TransformSoA::right |
( |
size_t | i | ) |
const |
|
inline |
Retrieves local right direction vector for index.
- Parameters
-
- Returns
- Right vector.
◆ size()
| size_t TransformSoA::size |
( |
| ) |
const |
|
inline |
Gets total transform entries count.
- Returns
- Transform count.
◆ up()
| glm::vec3 TransformSoA::up |
( |
size_t | i | ) |
const |
|
inline |
Retrieves local up direction vector for index.
- Parameters
-
- Returns
- Up vector.
◆ positions
| std::vector<glm::vec3> TransformSoA::positions |
◆ rotations
| std::vector<glm::vec3> TransformSoA::rotations |
3D Euler rotation vectors in degrees.
◆ scales
| std::vector<glm::vec3> TransformSoA::scales |
The documentation for this struct was generated from the following file: