OpenVSPAPI  3.19.0
Public Member Functions | List of all members
Matrix4d Class Reference

A class for representing 4x4 matricies. More...

#include <openvsp_as.h>

Public Member Functions

void loadIdentity ()
 
void translatef (const double &in x, const double &in y, const double &in z)
 
void rotateX (const double &in ang)
 
void rotateY (const double &in ang)
 
void rotateZ (const double &in ang)
 
void rotate (const double &in ang, const vec3d &in axis)
 
void scale (const double &in scale)
 
vec3d xform (const vec3d &in v)
 
vec3d getAngles ()
 
void loadXZRef ()
 
void loadXYRef ()
 
void loadYZRef ()
 
void affineInverse ()
 
void buildXForm (const vec3d &in pos, const vec3d &in rot, const vec3d &in cent_rot)
 

Detailed Description

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.

Member Function Documentation

◆ 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]posPosition to translate to
[in]rotAngle of rotation (degrees)
[in]cent_rotCenter 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]angAngle of rotation (degrees)
[in]axisVector to rotate about

◆ rotateX()

void Matrix4d::rotateX ( const double &in  ang)

Rotate the Matrix4d about the X axis

Parameters
[in]angAngle of rotation (degrees)

◆ rotateY()

void Matrix4d::rotateY ( const double &in  ang)

Rotate the Matrix4d about the Y axis

Parameters
[in]angAngle of rotation (degrees)

◆ rotateZ()

void Matrix4d::rotateZ ( const double &in  ang)

Rotate the Matrix4d about the Z axis

Parameters
[in]angAngle of rotation (degrees)

◆ scale()

void Matrix4d::scale ( const double &in  scale)

Multiply the Matrix4d by a scalar value

Parameters
[in]scaleValue 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]xTranslation along the X axis
[in]yTranslation along the Y axis
[in]zTranslation along the Z axis
Returns
Translated Matrix4d

◆ xform()

vec3d Matrix4d::xform ( const vec3d &in  v)

Transform the Matrix4d by the given vector

Parameters
[in]vTranformation vector

The documentation for this class was generated from the following file: