A class for representing 4x4 matricies.
More...
#include <openvsp_as.h>
Matrix4d is typically used to perform rotations, translations, scaling, projections, and other transformations in 3D space.
Definition at line 536 of file openvsp_as.h.
◆ affineInverse()
void Matrix4d::affineInverse |
( |
| ) |
|
Perform an affine transform on the Matrix4d
◆ buildXForm()
void Matrix4d::buildXForm |
( |
const vec3d &in |
pos, |
|
|
const vec3d &in |
rot, |
|
|
const vec3d &in |
cent_rot |
|
) |
| |
Translate the Matrix4d to a given position and rotate it a about a given center of rotation
- Parameters
-
[in] | pos | Position to translate to |
[in] | rot | Angle of rotation (degrees) |
[in] | cent_rot | Center of rotation |
◆ getAngles()
vec3d Matrix4d::getAngles |
( |
| ) |
|
Calculate the Matrix4d's angles between the X, Y and Z axes
- Returns
- Angle measurement between each axis (degrees)
◆ loadIdentity()
void Matrix4d::loadIdentity |
( |
| ) |
|
Create a 4x4 indentity matrix
- Returns
- Identity Matrix4d
◆ loadXYRef()
void Matrix4d::loadXYRef |
( |
| ) |
|
Load an identy Matrix4d and set the Z coordinate of the diagonal (index 10) to -1
◆ loadXZRef()
void Matrix4d::loadXZRef |
( |
| ) |
|
Load an identy Matrix4d and set the Y coordinate of the diagonal (index 5) to -1
◆ loadYZRef()
void Matrix4d::loadYZRef |
( |
| ) |
|
Load an identy Matrix4d and set the X coordinate of the diagonal (index 0) to -1
◆ rotate()
void Matrix4d::rotate |
( |
const double &in |
ang, |
|
|
const vec3d &in |
axis |
|
) |
| |
Rotate the Matrix4d about an arbitrary axis
- Parameters
-
[in] | ang | Angle of rotation (degrees) |
[in] | axis | Vector to rotate about |
◆ rotateX()
void Matrix4d::rotateX |
( |
const double &in |
ang | ) |
|
Rotate the Matrix4d about the X axis
- Parameters
-
[in] | ang | Angle of rotation (degrees) |
◆ rotateY()
void Matrix4d::rotateY |
( |
const double &in |
ang | ) |
|
Rotate the Matrix4d about the Y axis
- Parameters
-
[in] | ang | Angle of rotation (degrees) |
◆ rotateZ()
void Matrix4d::rotateZ |
( |
const double &in |
ang | ) |
|
Rotate the Matrix4d about the Z axis
- Parameters
-
[in] | ang | Angle of rotation (degrees) |
◆ scale()
void Matrix4d::scale |
( |
const double &in |
scale | ) |
|
Multiply the Matrix4d by a scalar value
- Parameters
-
[in] | scale | Value to scale by |
◆ translatef()
void Matrix4d::translatef |
( |
const double &in |
x, |
|
|
const double &in |
y, |
|
|
const double &in |
z |
|
) |
| |
Translate the Matrix4d along the given axes values
- Parameters
-
[in] | x | Translation along the X axis |
[in] | y | Translation along the Y axis |
[in] | z | Translation along the Z axis |
- Returns
- Translated Matrix4d
◆ xform()
Transform the Matrix4d by the given vector
- Parameters
-
[in] | v | Tranformation vector |
The documentation for this class was generated from the following file: