API functions that utilize the Matrix4d class are grouped here. For details of the class, including member functions, see Matrix4d. Click here to return to the main page. More...
Classes | |
| class | Matrix4d |
Functions | |
| void | Matrix4d::loadIdentity () |
| void | Matrix4d::translatef (const double &x, const double &y, const double &z) |
| void | Matrix4d::translatev (const vec3d &v) |
| void | Matrix4d::rotateX (const double &ang) |
| void | Matrix4d::rotateY (const double &ang) |
| void | Matrix4d::rotateZ (const double &ang) |
| void | Matrix4d::rotate (const double &angle, const vec3d &axis) |
| void | Matrix4d::rotatealongX (const vec3d &dir1) |
| void | Matrix4d::zeroTranslations () |
| void | Matrix4d::affineInverse () |
| void | Matrix4d::scale (const double &scale) |
| void | Matrix4d::scalex (const double &scalex) |
| void | Matrix4d::scaley (const double &scaley) |
| void | Matrix4d::scalez (const double &scalez) |
| void | Matrix4d::flipx () |
| void | Matrix4d::matMult (const Matrix4d &m) |
| void | Matrix4d::postMult (const Matrix4d &m) |
| void | Matrix4d::initMat (const Matrix4d &m) |
| void | Matrix4d::loadXZRef () |
| void | Matrix4d::loadXYRef () |
| void | Matrix4d::loadYZRef () |
| void | Matrix4d::mirrory () |
| vec3d | Matrix4d::xform (const vec3d &in) const |
| void | Matrix4d::xformvec (std::vector< vec3d > &in) const |
| void | Matrix4d::xformmat (std::vector< std::vector< vec3d > > &in) const |
| vec3d | Matrix4d::xformnorm (const vec3d &in) const |
| void | Matrix4d::xformnormvec (std::vector< vec3d > &in) const |
| void | Matrix4d::xformnormmat (std::vector< std::vector< vec3d > > &in) const |
| vec3d | Matrix4d::getAngles () const |
| vec3d | Matrix4d::getArcballAngles () const |
| vec3d | Matrix4d::getTranslation () const |
| void | Matrix4d::buildXForm (const vec3d &pos, const vec3d &rot, const vec3d ¢_rot) |
| void | Matrix4d::getBasis (vec3d &xdir, vec3d &ydir, vec3d &zdir) const |
| void | Matrix4d::setBasis (const vec3d &xdir, const vec3d &ydir, const vec3d &zdir) |
| void | Matrix4d::getRotationAxis (vec3d &axis_dir, vec3d &axis_pnt, double &angle_out) const |
| void | Matrix4d::toQuat (double &qw_out, double &qx_out, double &qy_out, double &qz_out, double &tx_out, double &ty_out, double &tz_out) const |
| class Matrix4d |
Matrix4d is typically used to perform rotations, translations, scaling, projections, and other transformations in 3D space.
Definition at line 22 of file Matrix4d.h.
Public Member Functions | |
|---|---|
| void | loadIdentity () |
| void | print (const std::string &header="") |
| void | translatef (const double &x, const double &y, const double &z) |
| void | translatev (const vec3d &v) |
| void | rotateX (const double &ang) |
| void | rotateY (const double &ang) |
| void | rotateZ (const double &ang) |
| void | rotate (const double &angle, const vec3d &axis) |
| void | rotatealongX (const vec3d &dir1) |
| void | zeroTranslations () |
| void | affineInverse () |
| void | scale (const double &scale) |
| void | scalex (const double &scalex) |
| void | scaley (const double &scaley) |
| void | scalez (const double &scalez) |
| void | flipx () |
| void | getMat (double *m) const |
| void | matMult (const double *m) |
| void | postMult (const double *m) |
| void | matMult (const Matrix4d &m) |
| void | postMult (const Matrix4d &m) |
| void | initMat (const double *m) |
| void | initMat (const Matrix4d &m) |
| void | mult (const double in[4], double out[4]) const |
| double * | data () |
| const double * | const_data () const |
| void | loadXZRef () |
| void | loadXYRef () |
| void | loadYZRef () |
| void | mirrory () |
| vec3d | xform (const vec3d &in) const |
| void | xformvec (std::vector< vec3d > &in) const |
| void | xformmat (std::vector< std::vector< vec3d > > &in) const |
| vec3d | xformnorm (const vec3d &in) const |
| void | xformnormvec (std::vector< vec3d > &in) const |
| void | xformnormmat (std::vector< std::vector< vec3d > > &in) const |
| vec3d | getAngles () const |
| vec3d | getArcballAngles () const |
| vec3d | getTranslation () const |
| void | buildXForm (const vec3d &pos, const vec3d &rot, const vec3d ¢_rot) |
| void | getBasis (vec3d &xdir, vec3d &ydir, vec3d &zdir) const |
| void | setBasis (const vec3d &xdir, const vec3d &ydir, const vec3d &zdir) |
| void | getRotationAxis (vec3d &axis_dir, vec3d &axis_pnt, double &angle_out) const |
| void | toQuat (double &qw_out, double &qx_out, double &qy_out, double &qz_out, double &tx_out, double &ty_out, double &tz_out) const |
Static Public Member Functions | |
| static void | setIdentity (double *m) |
Private Attributes | |
| double | mat [16] |
|
inline |
Definition at line 590 of file Matrix4d.h.
|
inline |
Definition at line 585 of file Matrix4d.h.
|
private |
Definition at line 1134 of file Matrix4d.h.
| void Matrix4d::affineInverse | ( | ) |
Perform an affine transform on the Matrix4d
Translate the Matrix4d to a given position and rotate it a about a given center of rotation
| [in] | pos | Position to translate to |
| [in] | rot | Angle of rotation (degrees) |
| [in] | cent_rot | Center of rotation |
| void Matrix4d::flipx | ( | ) |
Flip the matrix about the YZ plane, negating X.
| vec3d Matrix4d::getAngles | ( | ) | const |
| vec3d Matrix4d::getArcballAngles | ( | ) | const |
Reduce the matrix to a single rotation about an axis: the direction of the axis, a point on it, and the angle turned through in radians.
| vec3d Matrix4d::getTranslation | ( | ) | const |
Get the translation part of the matrix.
| void Matrix4d::initMat | ( | const Matrix4d & | m | ) |
Copy another matrix into this one, replacing whatever was here.
| [in] | m | Matrix4d Matrix to copy |
| void Matrix4d::loadIdentity | ( | ) |
Create a 4x4 identity matrix
| void Matrix4d::loadXYRef | ( | ) |
| void Matrix4d::loadXZRef | ( | ) |
| void Matrix4d::loadYZRef | ( | ) |
| void Matrix4d::matMult | ( | const Matrix4d & | m | ) |
Multiply this matrix by another, this * m, and keep the result.
| [in] | m | Matrix4d Matrix to multiply by |
| void Matrix4d::mirrory | ( | ) |
| void Matrix4d::postMult | ( | const Matrix4d & | m | ) |
Multiply another matrix by this one, m * this, and keep the result. The other order from matMult.
| [in] | m | Matrix4d Matrix to multiply by |
| void Matrix4d::rotate | ( | const double & | angle, |
| const vec3d & | axis ) |
Rotate the Matrix4d about an arbitrary axis
| [in] | angle | Angle of rotation (rad) |
| [in] | axis | Vector to rotate about |
| void Matrix4d::rotatealongX | ( | const vec3d & | dir1 | ) |
Rotate the matrix so that its X axis points along a given direction.
| [in] | dir1 | vec3d Direction the X axis should point along |
| void Matrix4d::rotateX | ( | const double & | ang | ) |
Rotate the Matrix4d about the X axis
| [in] | ang | Angle of rotation (degrees) |
| void Matrix4d::rotateY | ( | const double & | ang | ) |
Rotate the Matrix4d about the Y axis
| [in] | ang | Angle of rotation (degrees) |
| void Matrix4d::rotateZ | ( | const double & | ang | ) |
Rotate the Matrix4d about the Z axis
| [in] | ang | Angle of rotation (degrees) |
| void Matrix4d::scale | ( | const double & | scale | ) |
Multiply the Matrix4d by a scalar value
| [in] | scale | Value to scale by |
| void Matrix4d::scalex | ( | const double & | scalex | ) |
Scale the matrix along X alone. Unlike scale, which scales all three axes together.
| [in] | scalex | double Scale factor for X |
| void Matrix4d::scaley | ( | const double & | scaley | ) |
Scale the matrix along Y alone. Unlike scale, which scales all three axes together.
| [in] | scaley | double Scale factor for Y |
| void Matrix4d::scalez | ( | const double & | scalez | ) |
Scale the matrix along Z alone. Unlike scale, which scales all three axes together.
| [in] | scalez | double Scale factor for Z |
| void Matrix4d::toQuat | ( | double & | qw_out, |
| double & | qx_out, | ||
| double & | qy_out, | ||
| double & | qz_out, | ||
| double & | tx_out, | ||
| double & | ty_out, | ||
| double & | tz_out ) const |
Decompose the matrix into a rotation quaternion and a translation.
| [out] | qw_out | double Scalar part of the rotation quaternion |
| [out] | qx_out | double X part of the rotation quaternion |
| [out] | qy_out | double Y part of the rotation quaternion |
| [out] | qz_out | double Z part of the rotation quaternion |
| [out] | tx_out | double X translation |
| [out] | ty_out | double Y translation |
| [out] | tz_out | double Z translation |
| void Matrix4d::translatef | ( | const double & | x, |
| const double & | y, | ||
| const double & | z ) |
Translate the Matrix4d along the given axes values
| [in] | x | Translation along the X axis |
| [in] | y | Translation along the Y axis |
| [in] | z | Translation along the Z axis |
| void Matrix4d::translatev | ( | const vec3d & | v | ) |
Translate the matrix by a vec3d. The vec3d counterpart of translatef.
| [in] | v | vec3d Translation to apply |
Transform a point by the matrix, applying the rotation, the scaling and the translation.
| [in] | in | vec3d Point to transform |
| void Matrix4d::xformmat | ( | std::vector< std::vector< vec3d > > & | in | ) | const |
Transform a grid of points by the matrix, in place. The two dimensional counterpart of xformvec.
| [in,out] | in | vector<vector<vec3d>> Grid of points to transform, replaced by the result |
Transform a normal vector by the matrix. Unlike xform this leaves the translation out, since a direction has no position.
| [in] | in | vec3d Direction to transform |
| void Matrix4d::xformnormmat | ( | std::vector< std::vector< vec3d > > & | in | ) | const |
Transform a grid of normals by the matrix, in place. The two dimensional counterpart of xformnormvec.
| [in,out] | in | vector<vector<vec3d>> Grid of directions to transform, replaced by the result |
| void Matrix4d::xformnormvec | ( | std::vector< vec3d > & | in | ) | const |
Transform a whole vector of normals by the matrix, in place, leaving the translation out.
| [in,out] | in | vector<vec3d> Directions to transform, replaced by the result |
| void Matrix4d::xformvec | ( | std::vector< vec3d > & | in | ) | const |
| void Matrix4d::zeroTranslations | ( | ) |
Clear the translation part of the matrix, leaving the rotation and scaling alone.