|
Momentum Scripting v1
|
#include <Matrix4x4.h>
Public Member Functions | |
| Matrix4x4 () | |
| Matrix4x4 (const EulerAngles &rotation, const Vec3 &translation=Vec3()) | |
| Matrix4x4 (const Matrix4x4 &mat) | |
| Matrix4x4 (const Quat &rotation, const Vec3 &translation=Vec3()) | |
| Matrix4x4 (double a00, double a01, double a02, double a03, double a10, double a11, double a12, double a13, double a20, double a21, double a22, double a23, double a30, double a31, double a32, double a33) | |
| Matrix4x4 (double const *const ptr) | |
| ~Matrix4x4 () | |
| Matrix4x4 | addTranslate (const Vec3 &t) |
| Matrix4x4 | addTranslate (double tx, double ty, double tz) |
| EulerAngles | getAsEulerAngles () const |
| Quat | getAsQuat () const |
| Vec4 | getCol (size_t col) const |
| Quat | getRotate () const |
| Vec4 | getRow (size_t row) const |
| Vec3 | getTranslate () const |
| Matrix4x4 | inverse () const |
| bool | isFinite () const |
| bool | isIdentity () const |
| bool | isNaN () const |
| bool | isRigidTransformation () const |
| void | mult (const Matrix4x4 &, const Matrix4x4 &) |
| bool | operator!= (const Matrix4x4 &m) const |
| double & | operator() (size_t row, size_t col) |
| double | operator() (size_t row, size_t col) const |
| Matrix4x4 | operator* (const Matrix4x4 &m) const |
| Vec3 | operator* (const Vec3 &v) const |
| Vec4 | operator* (const Vec4 &v) const |
| void | operator*= (const Matrix4x4 &other) |
| Matrix4x4 | operator= (const Matrix4x4 &rhs) |
| bool | operator== (const Matrix4x4 &m) const |
| void | postMult (const Matrix4x4 &) |
| Vec3 | postMult (const Vec3 &v) const |
| Vec4 | postMult (const Vec4 &v) const |
| Matrix4x4 | postMultTranslate (const Vec3 &v) |
| void | preMult (const Matrix4x4 &) |
| Vec3 | preMult (const Vec3 &v) const |
| Vec4 | preMult (const Vec4 &v) const |
| Matrix4x4 | preMultTranslate (const Vec3 &v) |
| double * | ptr () |
| const double * | ptr () const |
| Matrix4x4 | set (const EulerAngles &e) |
| Matrix4x4 | set (const Quat &q) |
| Matrix4x4 | set (double a00, double a01, double a02, double a03, double a10, double a11, double a12, double a13, double a20, double a21, double a22, double a23, double a30, double a31, double a32, double a33) |
| Matrix4x4 | set (double const *const ptr) |
| void | setCol (size_t col, const Vec4 &vec) |
| Matrix4x4 | setIdentity () |
| Matrix4x4 | setRotate (const EulerAngles &euler) |
| Matrix4x4 | setRotate (const Quat &q) |
| Matrix4x4 | setRotate (const Vec3 &from, const Vec3 &to) |
| Matrix4x4 | setRotate (double angle, const Vec3 &axis) |
| Matrix4x4 | setRotate (double angle, double x, double y, double z) |
| Matrix4x4 | setRotate (double angle1, const Vec3 &axis1, double angle2, const Vec3 &axis2, double angle3, const Vec3 &axis3) |
| void | setRow (size_t row, const Vec4 &vec) |
| Matrix4x4 | setTranslate (const Vec3 &t) |
| Matrix4x4 | setTranslate (double tx, double ty, double tz) |
| Vec3 | transform3x3 (const Vec3 &vIn) const |
| Vec3 | transform3x3Inv (const Vec3 &vIn) const |
| Matrix4x4 | transpose () const |
| bool | valid () const |
Static Public Member Functions | |
| static Matrix4x4 | crossMatrix (const Vec3 &vec) |
| static Matrix4x4 | rotate (const Vec3 &from, const Vec3 &to) |
| static Matrix4x4 | rotate (double angle, const Vec3 &axis) |
| static Matrix4x4 | rotate (double angle, double x, double y, double z) |
| static Matrix4x4 | rotate (double angle1, const Vec3 &axis1, double angle2, const Vec3 &axis2, double angle3, const Vec3 &axis3) |
| static Matrix4x4 | translate (const Vec3 &dv) |
| static Matrix4x4 | translate (double x, double y, double z) |
Matrix class for affine transformations.
Translations are stored in the last row. The last column will be assumed to be [0 0 0 1]' in all operations, even if it is set to something else.
| MOMENTUM_NAMESPACE::Matrix4x4::Matrix4x4 | ( | ) |
Creates a new matrix, initialized to be an identity matrix.
| MOMENTUM_NAMESPACE::Matrix4x4::Matrix4x4 | ( | const Matrix4x4 & | mat | ) |
Copy constructor.
| MOMENTUM_NAMESPACE::Matrix4x4::Matrix4x4 | ( | double const *const | ptr | ) |
Create a matrix from a vector of 16 reals.
| MOMENTUM_NAMESPACE::Matrix4x4::Matrix4x4 | ( | const Quat & | rotation, |
| const Vec3 & | translation = Vec3() |
||
| ) |
Create a matrix from a quaternion.
| MOMENTUM_NAMESPACE::Matrix4x4::Matrix4x4 | ( | const EulerAngles & | rotation, |
| const Vec3 & | translation = Vec3() |
||
| ) |
Create a matrix from Euler angles.
| MOMENTUM_NAMESPACE::Matrix4x4::Matrix4x4 | ( | double | a00, |
| double | a01, | ||
| double | a02, | ||
| double | a03, | ||
| double | a10, | ||
| double | a11, | ||
| double | a12, | ||
| double | a13, | ||
| double | a20, | ||
| double | a21, | ||
| double | a22, | ||
| double | a23, | ||
| double | a30, | ||
| double | a31, | ||
| double | a32, | ||
| double | a33 | ||
| ) |
Create a matrix from 16 double scalars.
| MOMENTUM_NAMESPACE::Matrix4x4::~Matrix4x4 | ( | ) |
Destructor.
| Matrix4x4 MOMENTUM_NAMESPACE::Matrix4x4::addTranslate | ( | double | tx, |
| double | ty, | ||
| double | tz | ||
| ) |
Generates a new matrix of a specific type.
| EulerAngles MOMENTUM_NAMESPACE::Matrix4x4::getAsEulerAngles | ( | ) | const |
| Quat MOMENTUM_NAMESPACE::Matrix4x4::getAsQuat | ( | ) | const |
| Vec4 MOMENTUM_NAMESPACE::Matrix4x4::getCol | ( | size_t | col | ) | const |
| Quat MOMENTUM_NAMESPACE::Matrix4x4::getRotate | ( | ) | const |
| Vec4 MOMENTUM_NAMESPACE::Matrix4x4::getRow | ( | size_t | row | ) | const |
| Vec3 MOMENTUM_NAMESPACE::Matrix4x4::getTranslate | ( | ) | const |
| Matrix4x4 MOMENTUM_NAMESPACE::Matrix4x4::inverse | ( | ) | const |
Matrix inverse.
| bool MOMENTUM_NAMESPACE::Matrix4x4::isFinite | ( | ) | const |
| bool MOMENTUM_NAMESPACE::Matrix4x4::isIdentity | ( | ) | const |
| bool MOMENTUM_NAMESPACE::Matrix4x4::isNaN | ( | ) | const |
| bool MOMENTUM_NAMESPACE::Matrix4x4::isRigidTransformation | ( | ) | const |
| bool MOMENTUM_NAMESPACE::Matrix4x4::operator!= | ( | const Matrix4x4 & | m | ) | const |
| double & MOMENTUM_NAMESPACE::Matrix4x4::operator() | ( | size_t | row, |
| size_t | col | ||
| ) |
| double MOMENTUM_NAMESPACE::Matrix4x4::operator() | ( | size_t | row, |
| size_t | col | ||
| ) | const |
| void MOMENTUM_NAMESPACE::Matrix4x4::operator*= | ( | const Matrix4x4 & | other | ) |
| bool MOMENTUM_NAMESPACE::Matrix4x4::operator== | ( | const Matrix4x4 & | m | ) | const |
| void MOMENTUM_NAMESPACE::Matrix4x4::postMult | ( | const Matrix4x4 & | other | ) |
| void MOMENTUM_NAMESPACE::Matrix4x4::preMult | ( | const Matrix4x4 & | other | ) |
| double * MOMENTUM_NAMESPACE::Matrix4x4::ptr | ( | ) |
| const double * MOMENTUM_NAMESPACE::Matrix4x4::ptr | ( | ) | const |
|
static |
|
static |
| Matrix4x4 MOMENTUM_NAMESPACE::Matrix4x4::set | ( | const EulerAngles & | e | ) |
| Matrix4x4 MOMENTUM_NAMESPACE::Matrix4x4::set | ( | double | a00, |
| double | a01, | ||
| double | a02, | ||
| double | a03, | ||
| double | a10, | ||
| double | a11, | ||
| double | a12, | ||
| double | a13, | ||
| double | a20, | ||
| double | a21, | ||
| double | a22, | ||
| double | a23, | ||
| double | a30, | ||
| double | a31, | ||
| double | a32, | ||
| double | a33 | ||
| ) |
| Matrix4x4 MOMENTUM_NAMESPACE::Matrix4x4::set | ( | double const *const | ptr | ) |
They all return a reference to the updated matrix, enabling chained commands. E.g: matrix.setRotate(q).setTranslate(pos)
| void MOMENTUM_NAMESPACE::Matrix4x4::setCol | ( | size_t | col, |
| const Vec4 & | vec | ||
| ) |
| Matrix4x4 MOMENTUM_NAMESPACE::Matrix4x4::setIdentity | ( | ) |
| Matrix4x4 MOMENTUM_NAMESPACE::Matrix4x4::setRotate | ( | const EulerAngles & | euler | ) |
| Matrix4x4 MOMENTUM_NAMESPACE::Matrix4x4::setRotate | ( | double | angle, |
| double | x, | ||
| double | y, | ||
| double | z | ||
| ) |
| Matrix4x4 MOMENTUM_NAMESPACE::Matrix4x4::setRotate | ( | double | angle1, |
| const Vec3 & | axis1, | ||
| double | angle2, | ||
| const Vec3 & | axis2, | ||
| double | angle3, | ||
| const Vec3 & | axis3 | ||
| ) |
| void MOMENTUM_NAMESPACE::Matrix4x4::setRow | ( | size_t | row, |
| const Vec4 & | vec | ||
| ) |
Set the row of the matrix,.
| row | must be between [0..3] |
| vec | - value of the row |
| Matrix4x4 MOMENTUM_NAMESPACE::Matrix4x4::setTranslate | ( | double | tx, |
| double | ty, | ||
| double | tz | ||
| ) |
|
static |
| Matrix4x4 MOMENTUM_NAMESPACE::Matrix4x4::transpose | ( | ) | const |
| bool MOMENTUM_NAMESPACE::Matrix4x4::valid | ( | ) | const |