Topaz 5.0
Topaz Game Engine
|
Encapsulates a combination of a Translation, Rotation, and Scale in 3D space.
#include "trs.hpp"
Public Member Functions | |
trs | lerp (const trs &rhs, float factor) const |
Linearly interpolate between this transform and another based on a factor, and return that result. | |
m4f | matrix () const |
Create a matrix that performs an identical transformation. | |
trs | inverse () const |
Return an inverse transform that does the exact opposite (such that multiplying a transform by its inverse yields no transformation). | |
trs | combine (const trs &rhs) |
Combine one transform with another, and return the result. | |
Static Public Member Functions | |
static trs | from_matrix (m4f mat) |
Create a new TRS that performs the identical transformation to the given matrix. | |
Public Attributes | |
tz::v3f | translate = tz::v3f::zero() |
Translation Component. | |
tz::quat | rotate = tz::quat::iden() |
Rotation Component. | |
tz::v3f | scale = tz::v3f::filled(1.0f) |
Scale Component. | |
Linearly interpolate between this transform and another based on a factor, and return that result.
m4f tz::trs::matrix | ( | ) | const |
Create a matrix that performs an identical transformation.
Create a new TRS that performs the identical transformation to the given matrix.
trs tz::trs::inverse | ( | ) | const |
Return an inverse transform that does the exact opposite (such that multiplying a transform by its inverse yields no transformation).
Combine one transform with another, and return the result.
tz::v3f tz::trs::translate = tz::v3f::zero() |
Translation Component.
tz::quat tz::trs::rotate = tz::quat::iden() |
Rotation Component.
tz::v3f tz::trs::scale = tz::v3f::filled(1.0f) |
Scale Component.