|
CeresEngine 0.2.0
A game development framework
|
A class that simplifies working with transformation matrices. More...
#include <CeresEngine/Math/Transform.hpp>
Public Member Functions | |
| constexpr | TTransform () noexcept=default |
| Creates a new default transform object. | |
| constexpr | TTransform (const TMatrix4< T > &matrix) noexcept |
| Decomposes a transformation matrix into a transform object. | |
| constexpr | TTransform (const TVector3< T > &position, const TQuaternion< T > &rotation, const TVector3< T > &scale) |
| Creates a new transform from explicit values. | |
| constexpr | TTransform (const TTransform &) noexcept=default |
| constexpr TTransform & | operator= (const TTransform &) noexcept=default |
| constexpr TMatrix4< T > | getMatrix () const noexcept |
| Computes the transformation matrix. | |
| constexpr | operator TMatrix4< T > () const noexcept |
| Computes the transformation matrix. | |
| constexpr TVector4< T > | transform (const TVector4< T > &input) const noexcept |
| Transforms the given point by the transform. | |
| constexpr TVector4< T > | operator() (const TVector4< T > &input) const noexcept |
| constexpr TVector3< T > | transform (const TVector3< T > &input) const noexcept |
| constexpr TVector3< T > | operator() (const TVector3< T > &input) const noexcept |
| constexpr TVector3< T > | getDirection () const noexcept |
| Computes the direction vector by applying the rotation to the base forward-facing vector. | |
| constexpr TFacing< T > | getFacing () const noexcept |
| Gets the facing vectors of the transform. | |
| constexpr TVector3< T > | getFront () const noexcept |
| The transform front facing direction vector. | |
| constexpr TVector3< T > | getBack () const noexcept |
| The transform back facing direction vector. | |
| constexpr TVector3< T > | getUp () const noexcept |
| The transform up facing direction vector. | |
| constexpr TVector3< T > | getDown () const noexcept |
| The transform down facing direction vector. | |
| constexpr TVector3< T > | getRight () const noexcept |
| The transform right facing direction vector. | |
| constexpr TVector3< T > | getLeft () const noexcept |
| The transform left facing direction vector. | |
| constexpr TTransform | moving (const TVector3< T > &distance) const noexcept |
Moves the transform by the given distance. | |
| constexpr TTransform | moving (const TVector3< T > &direction, T distance) const noexcept |
Moves the transform by distance in the given direction. | |
| constexpr TTransform | rotating (const TQuaternion< T > &quaternion) const noexcept |
Rotates the transform by the given quaternion. | |
| constexpr TTransform | rotating (const TVector3< T > &axis, const TRadian< T > &angle) const noexcept |
Rotates the transform angle radians on the given axis. | |
| constexpr TTransform | rolling (const TRadian< T > &angle) const noexcept |
Rolls the transform by angle radians. | |
| constexpr TTransform | yawing (const TRadian< T > &angle) const noexcept |
Yaws the transform by angle radians. | |
| constexpr TTransform | pitching (const TRadian< T > &angle) const noexcept |
Pitches the transform by angle radians. | |
| constexpr TTransform | scaling (const TVector3< T > &factor) const noexcept |
Scales the transform by the given factor. | |
| constexpr TTransform | scaling (T factor) const noexcept |
Scales the transform on all axes by the given factor. | |
Public Attributes | |
| TVector3< T > | position = TVector3<T>(0.0) |
| The transform position. | |
| TQuaternion< T > | rotation = TQuaternion<T>(TVector3<T>(0.0)) |
| The transform rotation. | |
| TVector3< T > | scale = TVector3<T>(1.0) |
| The transform scale. | |
Friends | |
| TVector3< T > | operator* (const TTransform &transform, const TVector3< T > &input) noexcept |
| TVector4< T > | operator* (const TTransform &transform, const TVector4< T > &input) noexcept |
| TTransform | operator* (const TTransform &lhs, const TTransform &rhs) noexcept |
| TTransform | inverse (const TTransform &transform) noexcept |
| TTransform | transpose (const TTransform &transform) noexcept |
A class that simplifies working with transformation matrices.
| T | The scalar type used by the transform. |
|
explicitconstexprdefaultnoexcept |
Creates a new default transform object.
|
inlineexplicitconstexprnoexcept |
Decomposes a transformation matrix into a transform object.
|
inlineconstexpr |
Creates a new transform from explicit values.
|
constexprdefaultnoexcept |
|
inlineconstexprnoexcept |
The transform back facing direction vector.
|
inlineconstexprnoexcept |
Computes the direction vector by applying the rotation to the base forward-facing vector.
|
inlineconstexprnoexcept |
The transform down facing direction vector.
|
inlineconstexprnoexcept |
Gets the facing vectors of the transform.
|
inlineconstexprnoexcept |
The transform front facing direction vector.
|
inlineconstexprnoexcept |
The transform left facing direction vector.
|
inlineconstexprnoexcept |
Computes the transformation matrix.
|
inlineconstexprnoexcept |
The transform right facing direction vector.
|
inlineconstexprnoexcept |
The transform up facing direction vector.
|
inlineconstexprnoexcept |
Moves the transform by distance in the given direction.
|
inlineconstexprnoexcept |
Moves the transform by the given distance.
|
inlineexplicitconstexprnoexcept |
Computes the transformation matrix.
|
inlineconstexprnoexcept |
|
inlineconstexprnoexcept |
|
constexprdefaultnoexcept |
|
inlineconstexprnoexcept |
Pitches the transform by angle radians.
|
inlineconstexprnoexcept |
Rolls the transform by angle radians.
|
inlineconstexprnoexcept |
Rotates the transform by the given quaternion.
|
inlineconstexprnoexcept |
Rotates the transform angle radians on the given axis.
|
inlineconstexprnoexcept |
Scales the transform by the given factor.
|
inlineconstexprnoexcept |
Scales the transform on all axes by the given factor.
|
inlineconstexprnoexcept |
|
inlineconstexprnoexcept |
Transforms the given point by the transform.
|
inlineconstexprnoexcept |
Yaws the transform by angle radians.
|
friend |
|
friend |
|
friend |
|
friend |
|
friend |
| TVector3<T> Math::TTransform< T >::position = TVector3<T>(0.0) |
The transform position.
| TQuaternion<T> Math::TTransform< T >::rotation = TQuaternion<T>(TVector3<T>(0.0)) |
The transform rotation.
| TVector3<T> Math::TTransform< T >::scale = TVector3<T>(1.0) |
The transform scale.