2D transform composed of scale, rotation, and translation.
More...
#include <aeongui/Transform.hpp>
2D transform composed of scale, rotation, and translation.
Convenience class that decomposes a 2D affine transformation into its constituent components and can produce a Matrix2x3.
◆ Transform()
| AeonGUI::Transform::Transform |
( |
const Vector2 & | aScale, |
|
|
float | aRotation, |
|
|
const Vector2 | aTranslation ) |
Construct from scale, rotation, and translation.
- Parameters
-
| aScale | Scale factors per axis. |
| aRotation | Rotation angle in radians. |
| aTranslation | Translation vector. |
◆ GetMatrix()
| Matrix2x3 AeonGUI::Transform::GetMatrix |
( |
| ) |
const |
Build the equivalent 2x3 transformation matrix.
- Returns
- The composed Matrix2x3.
◆ GetRotation()
| float AeonGUI::Transform::GetRotation |
( |
| ) |
const |
Get the rotation angle.
- Returns
- Rotation in radians.
◆ GetScale()
| const Vector2 & AeonGUI::Transform::GetScale |
( |
| ) |
const |
Get the scale component.
- Returns
- Const reference to the scale vector.
◆ GetTranslation()
| const Vector2 & AeonGUI::Transform::GetTranslation |
( |
| ) |
const |
Get the translation component.
- Returns
- Const reference to the translation vector.
◆ operator*=()
Combine this transform with another (post-multiply).
- Parameters
-
| aTransform | The right-hand-side transform. |
- Returns
- Reference to this transform.
◆ SetRotation()
| void AeonGUI::Transform::SetRotation |
( |
float | aRotation | ) |
|
Set the rotation angle.
- Parameters
-
| aRotation | The new rotation in radians. |
◆ SetScale()
| void AeonGUI::Transform::SetScale |
( |
const Vector2 & | aScale | ) |
|
Set the scale component.
- Parameters
-
| aScale | The new scale vector. |
◆ SetTranslation()
| void AeonGUI::Transform::SetTranslation |
( |
const Vector2 & | aTranslation | ) |
|
Set the translation component.
- Parameters
-
| aTranslation | The new translation vector. |
The documentation for this class was generated from the following files: