Mat4
Description
Represents a matrix for performing space/vector transformations.
Methods
inverse | Returns a matrix that is the inverse of this matrix. |
rotate | Rotates the transformation matrix around a defined vector. |
scale | Scales the matrix by a defined x/y/z vector. |
translate | Translates the matrix by a defined x/y/z vector. |
Constructor
Mat4 | Constructs a matrix. |
Operators
!= | Compares two matrices. |
* | Multiplies a matrix by another vector or a scale factor. |
== | Compares two matrices. |
Details
Do no remove, this fixes the anchor on doc.flexsim.com
Do no remove, this fixes the anchor on doc.flexsim.com
Mat4.rotate()
Mat4 rotate( double degrees , Vec3 vec ) |
Parameters
degrees | The number of degrees to rotate. |
vec | The vector around which to rotate. |
Returns
Mat4 | The owning rotated matrix. |
Description
Rotates the transformation matrix around a defined vector.
This method rotates the owning matrix and returns a reference to itself, instead of creating a copy of the matrix.
Do no remove, this fixes the anchor on doc.flexsim.com
Do no remove, this fixes the anchor on doc.flexsim.com
Mat4.translate()
Mat4 translate( Vec3 vec ) |
Parameters
vec | The vector to translate by. |
Returns
Mat4 | The owning translated matrix. |
Description
Translates the matrix by a defined x/y/z vector.
This method translates the owning matrix and returns a reference to itself, instead of creating a copy of the matrix.
Do no remove, this fixes the anchor on doc.flexsim.com
Do no remove, this fixes the anchor on doc.flexsim.com
Do no remove, this fixes the anchor on doc.flexsim.com
Mat4.operator *
Mat4 operator *( Mat4 mat ) |
Vec3 operator *( Vec3 vec ) |
Mat4 operator *( double scalar ) |
Parameters
mat | The matrix to multiply this matrix by. |
vec | The vector to transform by the matrix. |
scalar | The scalar value to multiply each element of the matrix by. |
Returns
Mat4 | The resulting transformed vector/matrix. |
Description
Multiplies a matrix by another vector or a scale factor.
When a Vec4 is passed, the operation will perform per-component multiplication.