Transform composed of Scale, Rotation (as a quaternion), and Translation. Transformation is applied in the order: Scale -> Rotate -> Translate.
More...
#include <Transform.h>
Transform composed of Scale, Rotation (as a quaternion), and Translation. Transformation is applied in the order: Scale -> Rotate -> Translate.
Transform::Transform |
( |
glm::vec3 |
position, |
|
|
float |
scale, |
|
|
glm::quat |
rotation |
|
) |
| |
Transform::~Transform |
( |
| ) |
|
glm::mat4 Transform::getRotationMatrix |
( |
| ) |
const |
Gets rotation matrix.
- Returns
- The rotation matrix.
glm::mat4 Transform::getScaleMatrix |
( |
| ) |
const |
Gets scale matrix.
- Returns
- The scale matrix.
glm::mat4 Transform::getTransformMatrix |
( |
| ) |
const |
Gets transformation matrix. Transformation applied in the order: Scale -> Rotate -> Translate.
- Returns
- The transform matrix.
glm::mat4 Transform::getTranslationMatrix |
( |
| ) |
const |
Gets translation matrix.
- Returns
- The translation matrix.
void Transform::IncRotation |
( |
float |
angle, |
|
|
glm::vec3 |
axis |
|
) |
| |
Increment rotation.
- Parameters
-
angle | The angle in degrees. |
axis | The axis. |
Transform & Transform::operator= |
( |
const btTransform & |
trans | ) |
|
Assignment operator.
- Parameters
-
trans | The transform from ASSIMP |
- Returns
- A shallow copy of this object.
void Transform::RotateX |
( |
float |
angle | ) |
|
Rotate along x axis.
- Parameters
-
angle | The angle in degrees. |
void Transform::RotateY |
( |
float |
angle | ) |
|
Rotate along y axis.
- Parameters
-
angle | The angle in degrees. |
void Transform::RotateZ |
( |
float |
angle | ) |
|
Rotate along z axis.
- Parameters
-
angle | The angle in degrees. |
void Transform::SetPosition |
( |
const glm::vec3 & |
position | ) |
|
Sets a position.
- Parameters
-
void Transform::SetRotation |
( |
float |
angle, |
|
|
glm::vec3 |
axis |
|
) |
| |
Sets a rotation.
- Parameters
-
angle | The angle in degrees. |
axis | The axis. |
void Transform::SetScale |
( |
float |
scale | ) |
|
glm::vec3 Transform::position |
glm::quat Transform::rotation |