A rotation.
More...
#include <gf/Transform.h>
|
float | cos |
| The cosine of the rotation angle. More...
|
|
float | sin |
| The sine of the rotation angle. More...
|
|
◆ Rotation() [1/2]
gf::Rotation::Rotation |
( |
| ) |
|
|
inline |
Default constructor.
The default rotation is a rotation of angle \( 0 \).
◆ Rotation() [2/2]
gf::Rotation::Rotation |
( |
float |
angle | ) |
|
|
inline |
Constructor with an angle.
- Parameters
-
◆ getAngle()
float gf::Rotation::getAngle |
( |
| ) |
const |
|
inline |
Get the rotation angle.
- Returns
- The current rotation angle
◆ setAngle()
void gf::Rotation::setAngle |
( |
float |
angle | ) |
|
|
inline |
Set the rotation angle.
- Parameters
-
angle | The new rotation angle |
◆ inverseTransform()
Apply an inverse rotation to a 2D point.
- Parameters
-
rotation | The rotation |
point | The point to transform |
- Returns
- The transformed point
◆ transform()
Apply a rotation to a 2D point.
- Parameters
-
rotation | The rotation |
point | The point to transform |
- Returns
- The transformed point
◆ cos
The cosine of the rotation angle.
◆ sin
The sine of the rotation angle.