|
Flint Engine
Modular C++20 2D game engine powered by SDL3
|
Holds the 2-D transform components for a game object. More...
#include <flint/math/transform.h>
Collaboration diagram for Flint::Transform:Public Attributes | |
| Vec2f | position {0.f, 0.f} |
| float | rotation = 0.f |
| Vec2f | scale {1.f, 1.f} |
| Vec2f | origin {0.f, 0.f} |
Holds the 2-D transform components for a game object.
Combines position, rotation, scale, and a local pivot (origin) into a single plain-data struct. Pass to buildModelMatrix() to produce the corresponding GPU matrix.
Definition at line 14 of file transform.h.
| Vec2f Flint::Transform::origin {0.f, 0.f} |
Local pivot point (subtracted before rotation).
Definition at line 18 of file transform.h.
| Vec2f Flint::Transform::position {0.f, 0.f} |
World-space translation.
Definition at line 15 of file transform.h.
| float Flint::Transform::rotation = 0.f |
Rotation angle in radians (counter-clockwise).
Definition at line 16 of file transform.h.
| Vec2f Flint::Transform::scale {1.f, 1.f} |
Per-axis scale factors.
Definition at line 17 of file transform.h.