#include <transform.h>
Public Member Functions | |
Transform () | |
Create an identity transformation. | |
Transform (const Matrix4x4 &_m, const Matrix4x4 &_mi) | |
Create a transformation with the given matrix and its inverse. | |
Transform (const Matrix4x4 &_m, const Matrix4x4 &_mi, const Matrix4x4 &_mit) | |
Create a transformation with the given matrix, its inverse, and its inverse transpose. | |
Transform | operator* (const Transform &other) const |
Multiply this with the given transformation, thereby composing the two, and return the result. | |
Transform & | operator*= (const Transform &otherz) |
Multiply this with the given transformation, thereby composing the two, and set this to the result. | |
bool | is_near (const Transform &other, float threshold=0.0001f) |
Check whether the given transform other is within threshold of this. | |
Static Public Member Functions | |
static Transform | identity () |
Create an identity transformation. | |
static Transform | translate (float x, float y, float z) |
Create a translation. | |
static Transform | translate_x (float x) |
Create a translation along the x-axis. | |
static Transform | translate_y (float y) |
Create a translation along the y-axis. | |
static Transform | translate_z (float z) |
Create a translation along the z-axis. | |
static Transform | scale (float x, float y, float z) |
Create a scaling. | |
static Transform | scale (float s) |
Create a scaling with the same scaling factor s along all axes. | |
static Transform | scale_x (float x) |
Create a scaling along the x-axis. | |
static Transform | scale_y (float y) |
Create a scaling along the y-axis. | |
static Transform | scale_z (float z) |
Create a scaling along the z-axis. | |
static Transform | rotate (float degrees, Vector3 axis) |
Create a rotation, specifying the degrees to rotate and the axis of rotation. | |
static Transform | rotate_x (float degrees) |
Create a rotation around the x-axis. | |
static Transform | rotate_y (float degrees) |
Create a rotation around the y-axis. | |
static Transform | rotate_z (float degrees) |
Create a rotation around the z-axis. | |
Public Attributes | |
Matrix4x4 | m |
the matrix of the transformation | |
Matrix4x4 | mi |
the inverse of the matrix of the transformation | |
Matrix4x4 | mit |
the inverse transpose of the matrix of the transformation |
Transform::Transform | ( | ) |
Create an identity transformation.
Create a transformation with the given matrix and its inverse.
Create a transformation with the given matrix, its inverse, and its inverse transpose.
static Transform Transform::identity | ( | ) | [static] |
Create an identity transformation.
bool Transform::is_near | ( | const Transform & | other, | |
float | threshold = 0.0001f | |||
) |
Check whether the given transform other is within threshold of this.
Multiply this with the given transformation, thereby composing the two, and return the result.
Multiply this with the given transformation, thereby composing the two, and set this to the result.
Create a rotation, specifying the degrees to rotate and the axis of rotation.
static Transform Transform::rotate_x | ( | float | degrees | ) | [static] |
Create a rotation around the x-axis.
static Transform Transform::rotate_y | ( | float | degrees | ) | [static] |
Create a rotation around the y-axis.
static Transform Transform::rotate_z | ( | float | degrees | ) | [static] |
Create a rotation around the z-axis.
static Transform Transform::scale | ( | float | s | ) | [static] |
Create a scaling with the same scaling factor s along all axes.
static Transform Transform::scale | ( | float | x, | |
float | y, | |||
float | z | |||
) | [static] |
Create a scaling.
static Transform Transform::scale_x | ( | float | x | ) | [static] |
Create a scaling along the x-axis.
static Transform Transform::scale_y | ( | float | y | ) | [static] |
Create a scaling along the y-axis.
static Transform Transform::scale_z | ( | float | z | ) | [static] |
Create a scaling along the z-axis.
static Transform Transform::translate | ( | float | x, | |
float | y, | |||
float | z | |||
) | [static] |
Create a translation.
static Transform Transform::translate_x | ( | float | x | ) | [static] |
Create a translation along the x-axis.
static Transform Transform::translate_y | ( | float | y | ) | [static] |
Create a translation along the y-axis.
static Transform Transform::translate_z | ( | float | z | ) | [static] |
Create a translation along the z-axis.
the matrix of the transformation
the inverse of the matrix of the transformation
the inverse transpose of the matrix of the transformation