|
Momentum Scripting v1
|
#include <AffineMatrix4x4.h>
Public Member Functions | |
| AffineMatrix4x4 () | |
| AffineMatrix4x4 (const AffineMatrix4x4 &mat) | |
| AffineMatrix4x4 (const agx::AffineMatrix4x4 &mat) | |
| AffineMatrix4x4 (const EulerAngles &rotation, const Vec3 &translation=Vec3()) | |
| AffineMatrix4x4 (const Quat &rotation, const Vec3 &translation=Vec3()) | |
| AffineMatrix4x4 (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) | |
| AffineMatrix4x4 (double const *const ptr) | |
| ~AffineMatrix4x4 () | |
| Matrix4x4 | addTranslate (const Vec3 &t) |
| Matrix4x4 | addTranslate (double tx, double ty, double tz) |
| double | at (int i, int j) const |
| EulerAngles | getAsEulerAngles () const |
| Quat | getAsQuat () const |
| Vec4 | getCol (size_t col) const |
| Vec3 | getInvTranslate () const |
| Quat | getRotate () const |
| Vec4 | getRow (size_t row) const |
| Vec3 | getTranslate () const |
| AffineMatrix4x4 | inverse () const |
| bool | isFinite () const |
| bool | isIdentity () const |
| bool | isNaN () const |
| bool | isRigidTransformation () const |
| void | mult (const AffineMatrix4x4 &, const AffineMatrix4x4 &) |
| void | mult (const Matrix4x4 &, const Matrix4x4 &) |
| bool | operator!= (const AffineMatrix4x4 &m) const |
| bool | operator!= (const Matrix4x4 &m) const |
| double & | operator() (size_t row, size_t col) |
| double | operator() (size_t row, size_t col) const |
| AffineMatrix4x4 | operator* (const AffineMatrix4x4 &m) const |
| Matrix4x4 | operator* (const Matrix4x4 &m) const |
| Vec3 | operator* (const Vec3 &v) const |
| Vec4 | operator* (const Vec4 &v) const |
| void | operator*= (const AffineMatrix4x4 &other) |
| void | operator*= (const Matrix4x4 &other) |
| AffineMatrix4x4 & | operator= (const AffineMatrix4x4 &rhs) |
| AffineMatrix4x4 & | operator= (const Matrix4x4 &rhs) |
| bool | operator== (const AffineMatrix4x4 &m) const |
| bool | operator== (const Matrix4x4 &m) const |
| void | postMult (const AffineMatrix4x4 &) |
| void | postMult (const Matrix4x4 &) |
| Vec3 | postMult (const Vec3 &v) const |
| Vec4 | postMult (const Vec4 &v) const |
| AffineMatrix4x4 & | postMultTranslate (const Vec3 &v) |
| void | preMult (const AffineMatrix4x4 &) |
| void | preMult (const Matrix4x4 &) |
| Vec3 | preMult (const Vec3 &v) const |
| Vec4 | preMult (const Vec4 &v) const |
| AffineMatrix4x4 & | preMultTranslate (const Vec3 &v) |
| double * | ptr () |
| const double * | ptr () const |
| void | set (const EulerAngles &e) |
| void | set (const Quat &q) |
| void | 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) |
| void | set (double const *const ptr) |
| void | set (double val, int i, int j) |
| void | setCol (size_t col, const Vec4 &vec) |
| void | setIdentity () |
| void | setRotate (const EulerAngles &euler) |
| void | setRotate (const Quat &q) |
| void | setRotate (const Vec3 &from, const Vec3 &to) |
| void | setRotate (double angle, const Vec3 &axis) |
| void | setRotate (double angle, double x, double y, double z) |
| void | setRotate (double angle1, const Vec3 &axis1, double angle2, const Vec3 &axis2, double angle3, const Vec3 &axis3) |
| void | setRow (size_t row, const Vec4 &vec) |
| void | setTranslate (const Vec3 &t) |
| void | setTranslate (double tx, double ty, double tz) |
| Vec3 | transform3x3 (const Vec3 &vIn) const |
| Vec3 | transform3x3Inv (const Vec3 &vIn) const |
| Vec3 | transformPoint (const Vec3 &point) const |
| Vec3 | transformVector (const Vec3 &vector) const |
| Matrix4x4 | transpose () const |
| bool | valid () const |
Static Public Member Functions | |
| static AffineMatrix4x4 | crossMatrix (const Vec3 &vec) |
| static AffineMatrix4x4 | rotate (const EulerAngles &euler) |
| static AffineMatrix4x4 | rotate (const Vec3 &from, const Vec3 &to) |
| static AffineMatrix4x4 | rotate (double angle, const Vec3 &axis) |
| static AffineMatrix4x4 | rotate (double angle, double x, double y, double z) |
| static AffineMatrix4x4 | rotate (double angle1, const Vec3 &axis1, double angle2, const Vec3 &axis2, double angle3, const Vec3 &axis3) |
| static AffineMatrix4x4 | translate (const Vec3 &dv) |
| static AffineMatrix4x4 | translate (double x, double y, double z) |
Matrix class for rigid transformations (translation, rotation).
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. The sub matrix containing the first three rows and columns contains the rotational part and is assumed to be orthonormal.
| MOMENTUM_NAMESPACE::AffineMatrix4x4::AffineMatrix4x4 | ( | ) |
Creates a new matrix, initialized to be an identity matrix.
| MOMENTUM_NAMESPACE::AffineMatrix4x4::AffineMatrix4x4 | ( | const agx::AffineMatrix4x4 & | mat | ) |
| MOMENTUM_NAMESPACE::AffineMatrix4x4::AffineMatrix4x4 | ( | const AffineMatrix4x4 & | mat | ) |
Copy constructor.
| MOMENTUM_NAMESPACE::AffineMatrix4x4::AffineMatrix4x4 | ( | double const *const | ptr | ) |
Create a matrix from a vector of 16 reals.
| MOMENTUM_NAMESPACE::AffineMatrix4x4::AffineMatrix4x4 | ( | const Quat & | rotation, |
| const Vec3 & | translation = Vec3() |
||
| ) |
Create a matrix from a quaternion.
| MOMENTUM_NAMESPACE::AffineMatrix4x4::AffineMatrix4x4 | ( | const EulerAngles & | rotation, |
| const Vec3 & | translation = Vec3() |
||
| ) |
Create a matrix from Euler angles.
| MOMENTUM_NAMESPACE::AffineMatrix4x4::AffineMatrix4x4 | ( | 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::AffineMatrix4x4::~AffineMatrix4x4 | ( | ) |
Destructor.
|
inherited |
| double MOMENTUM_NAMESPACE::AffineMatrix4x4::at | ( | int | i, |
| int | j | ||
| ) | const |
|
static |
|
inherited |
|
inherited |
|
inherited |
| Vec3 MOMENTUM_NAMESPACE::AffineMatrix4x4::getInvTranslate | ( | ) | const |
|
inherited |
|
inherited |
|
inherited |
| AffineMatrix4x4 MOMENTUM_NAMESPACE::AffineMatrix4x4::inverse | ( | ) | const |
Quick inverse, transpose rotation part, and change sign of translation part.
|
inherited |
|
inherited |
|
inherited |
|
inherited |
| void MOMENTUM_NAMESPACE::AffineMatrix4x4::mult | ( | const AffineMatrix4x4 & | , |
| const AffineMatrix4x4 & | |||
| ) |
| bool MOMENTUM_NAMESPACE::AffineMatrix4x4::operator!= | ( | const AffineMatrix4x4 & | m | ) | const |
|
inherited |
|
inherited |
|
inherited |
| AffineMatrix4x4 MOMENTUM_NAMESPACE::AffineMatrix4x4::operator* | ( | const AffineMatrix4x4 & | m | ) | const |
| void MOMENTUM_NAMESPACE::AffineMatrix4x4::operator*= | ( | const AffineMatrix4x4 & | other | ) |
|
inherited |
| AffineMatrix4x4 & MOMENTUM_NAMESPACE::AffineMatrix4x4::operator= | ( | const AffineMatrix4x4 & | rhs | ) |
| AffineMatrix4x4 & MOMENTUM_NAMESPACE::AffineMatrix4x4::operator= | ( | const Matrix4x4 & | rhs | ) |
| bool MOMENTUM_NAMESPACE::AffineMatrix4x4::operator== | ( | const AffineMatrix4x4 & | m | ) | const |
|
inherited |
| void MOMENTUM_NAMESPACE::AffineMatrix4x4::postMult | ( | const AffineMatrix4x4 & | ) |
| void MOMENTUM_NAMESPACE::Matrix4x4::postMult | ( | const Matrix4x4 & | other | ) |
| AffineMatrix4x4 & MOMENTUM_NAMESPACE::AffineMatrix4x4::postMultTranslate | ( | const Vec3 & | v | ) |
| void MOMENTUM_NAMESPACE::AffineMatrix4x4::preMult | ( | const AffineMatrix4x4 & | ) |
| void MOMENTUM_NAMESPACE::Matrix4x4::preMult | ( | const Matrix4x4 & | other | ) |
| AffineMatrix4x4 & MOMENTUM_NAMESPACE::AffineMatrix4x4::preMultTranslate | ( | const Vec3 & | v | ) |
|
inherited |
|
inherited |
|
static |
Return a matrix with the rotational part specified by the euler angles argument.
|
static |
Return a matrix which rotate a vector from from to to.
| from | - start of rotation |
| to | - end of rotation |
|
static |
Return a matrix which rotate angle radians around vector axis.
| angle | - angle in radians |
| axis | - vector |
|
static |
Return a matrix which rotate angle radians around vector [x,y,z].
| angle | - angle in radians |
| x | - x element of vector |
| y | - y element of vector |
| z | - z element of vector |
|
static |
Return a matrix which rotate angle1 radians around vector axis1 and angle2 radians around vector axis2 angle3 radians around vector axis3.
| angle1 | - angle in radians |
| axis1 | - vector |
| angle2 | - angle in radians |
| axis2 | - vector |
| angle3 | - angle in radians |
| axis3 | - vector |
| void MOMENTUM_NAMESPACE::AffineMatrix4x4::set | ( | const EulerAngles & | e | ) |
Set the rotational part of the matrix using the specified euler angles and the translational part to 0,0,0.
| e | - Specified euler angles rotation |
| void MOMENTUM_NAMESPACE::AffineMatrix4x4::set | ( | const Quat & | q | ) |
Set the rotational part of the matrix using the specified quaternion and the translational part to 0,0,0.
| q | - Specified quaternion |
| void MOMENTUM_NAMESPACE::AffineMatrix4x4::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 | ||
| ) |
Set the entire matrix using values from the 16 elements using the following order:
m_data[0][0] = a00; m_data[0][1] = a01; m_data[0][2] = a02; m_data[0][3] = a03;
m_data[1][0] = a04;
etc.
| pointer | to a vector with 16 elements |
| void MOMENTUM_NAMESPACE::AffineMatrix4x4::set | ( | double const *const | ptr | ) |
Set the entire matrix using values from the array with 16 elements using the following order:
m_data[0][0] = ptr[0]; m_data[0][1] = ptr[1]; m_data[0][2] = ptr[2]; m_data[0][3] = ptr[3];
m_data[1][0] = ptr[4];
etc.
| pointer | to a vector with 16 elements |
| void MOMENTUM_NAMESPACE::AffineMatrix4x4::set | ( | double | val, |
| int | i, | ||
| int | j | ||
| ) |
Set the value of element i,j.
|
inherited |
| void MOMENTUM_NAMESPACE::AffineMatrix4x4::setIdentity | ( | ) |
Set the value of the matrix to the identity matrix.
| void MOMENTUM_NAMESPACE::AffineMatrix4x4::setRotate | ( | const EulerAngles & | euler | ) |
Set the rotational part of the matrix using the specified euler angles leaving the translational part untouched.
| w | - Specified euler angles rotation |
| void MOMENTUM_NAMESPACE::AffineMatrix4x4::setRotate | ( | const Quat & | q | ) |
Set the rotational part of the matrix using the specified quaternion leaving the translational part untouched.
| q | - Specified quaternion |
Set the rotational part of the matrix using the specified two vectors.
The resulting rotation will be a rotation matrix which rotates a vector from from to to leaving the translational part untouched.
| from | - start of rotation |
| to | - end of rotation |
| void MOMENTUM_NAMESPACE::AffineMatrix4x4::setRotate | ( | double | angle, |
| const Vec3 & | axis | ||
| ) |
Set the rotational part of a matrix which rotate angle radians around vector axis.
| angle | - angle in radians |
| axis | - vector |
| void MOMENTUM_NAMESPACE::AffineMatrix4x4::setRotate | ( | double | angle, |
| double | x, | ||
| double | y, | ||
| double | z | ||
| ) |
Set the rotational part of a matrix which rotate angle radians around vector x y z.
| angle | - angle in radians |
| x,y,z | - vector |
| void MOMENTUM_NAMESPACE::AffineMatrix4x4::setRotate | ( | double | angle1, |
| const Vec3 & | axis1, | ||
| double | angle2, | ||
| const Vec3 & | axis2, | ||
| double | angle3, | ||
| const Vec3 & | axis3 | ||
| ) |
Set the rotational part of a matrix which rotate angle1 radians around vector axis1 and angle2 radians around vector axis2 angle3 radians around vector axis3.
| angle1 | - angle in radians |
| axis1 | - vector |
| angle2 | - angle in radians |
| axis2 | - vector |
| angle3 | - angle in radians |
| axis3 | - vector |
|
inherited |
Set the row of the matrix,.
| row | must be between [0..3] |
| vec | - value of the row |
| void MOMENTUM_NAMESPACE::AffineMatrix4x4::setTranslate | ( | const Vec3 & | t | ) |
Set the translational part of the matrix using the vector t.
| t | - translation vector |
| void MOMENTUM_NAMESPACE::AffineMatrix4x4::setTranslate | ( | double | tx, |
| double | ty, | ||
| double | tz | ||
| ) |
Set the translational part of the matrix using the vector x, y, z.
| x,y,z | - translation vector |
Transforms a (mathematical) point, using both rotation and translation.
Transforms a (mathematical) vector, using only rotation.
|
static |
Return a matrix which translates according to dv.
| dv | - translation vector |
|
static |
Return a matrix which translates according to vector [x,y,z].
| x | - x element of vector |
| y | - y element of vector |
| z | - z element of vector |
|
inherited |
|
inherited |