Unigine.dmat4 Struct
dmat4 Class
Properties
dvec3 AxisX#
The normalized vector representing the X axis.
dvec3 AxisY#
The normalized vector representing the Y axis.
dvec3 AxisZ#
The normalized vector representing the Z axis.
dvec3 Translate#
The three-component vector with the translation part of the matrix.
dvec3 Scale#
The three-component vector, representing the scaling part of the matrix.
Members
dmat4 ( ) #
Default constructor. Produces an identity matrix.dmat4 ( mat4 m ) #
Constructor. Initializes the matrix using a given source mat4 matrix (4x4). The matrix elements are filled using corresponding elements of the source matrix.Arguments
- mat4 m - Source matrix (4x4).
dmat4 ( quat q ) #
Constructor. Initializes the matrix using a given source quaternion.Arguments
- quat q - Source quaternion.
void SetColumn ( int column, dvec4 v ) #
Sets the specified column of the matrix using a given dvec4 vector as a source.Arguments
- int column - Column.
- dvec4 v - Source vector.
dvec4 GetColumn ( int column ) #
Returns the specified matrix column.Arguments
- int column - Column.
Return value
The dvec4 vector with column values.void SetColumn3 ( int column, dvec3 v ) #
Sets the specified column of the matrix using a given three-component dvec3 vector as a source.Arguments
- int column - Column.
- dvec3 v - Three-component source vector.
dvec3 GetColumn3 ( int column ) #
Returns the specified matrix column.Arguments
- int column - Column.
Return value
The dvec3 vector with column values.void SetIdentity ( ) #
Sets the matrix equal to the identity matrix.void SetRotate ( dvec3 axis, double angle ) #
Sets the rotation matrix for a given axis.Arguments
- dvec3 axis - Rotation axis.
- double angle - Rotation angle, in degrees.
quat getRotate ( ) #
Returns the quaternion, representing the rotation part of the matrix.Return value
Matrix rotation part.void SetRotateX ( double angle ) #
Sets X rotation matrix.Arguments
- double angle - Rotation angle, in degrees.
void SetRotateY ( double angle ) #
Sets Y rotation matrix.Arguments
- double angle - Rotation angle, in degrees.
void SetRotateZ ( double angle ) #
Sets Z rotation matrix.Arguments
- double angle - Rotation angle, in degrees.
void SetRow ( int row, dvec4 v ) #
Sets the specified row of the matrix using a given dvec4 vector as a source.Arguments
- int row - Row.
- dvec4 v - Source vector.
dvec4 GetRow ( int row ) #
Returns the specified matrix row.Arguments
- int row - Row.
Return value
The dvec4 vector with row values.void SetRow3 ( int row, dvec3 v ) #
Sets the specified row of the matrix using a given three-component dvec3 vector as a source, the last element of the row remains as is.Arguments
- int row - Row.
- dvec3 v - Three-component source vector.
dvec3 GetRow3 ( int row ) #
Returns the first three elements of the specified matrix row.Arguments
- int row - Row.
Return value
The dvec3 vector with the first three elements of the specified matrix row.dmat4 Operator*= ( dmat4 m ) #
Performs matrix multiplication.Arguments
- dmat4 m - Matrix.
Return value
Resulting matrix.double Operator[] ( int i ) #
Performs array access to the matrix item reference using given item index.Arguments
- int i - Matrix item index.
Return value
Matrix item reference.double Operator[] ( int i ) #
Performs array access to the matrix item using given item index.Arguments
- int i - Matrix item index.
Return value
Matrix item.dvec3 getAxisX ( ) #
Returns the normalized vector representing the X axis. Call this method to get the right or left vector of the matrix:matrix.getAxisX(); // the left vector
-matrix.getAxisX(); // the right vector
Return value
Vector representing the X axis.dvec3 getAxisY ( ) #
Returns the normalized vector representing the Y axis. Call this method to get the back or forward vector of the matrix:matrix.getAxisY(); // the back vector
-matrix.getAxisY(); // the forward vector
Return value
Vector representing the Y axis.dvec3 getAxisZ ( ) #
Returns the normalized vector representing the Z axis. Call this method to get the up or down vector of the matrix:matrix.getAxisZ(); // the up vector
-matrix.getAxisZ(); // the down vector
Return value
Vector representing the Z axis.Last update:
2021-04-29
Help improve this article
Was this article helpful?
(or select a word/phrase and press Ctrl+Enter)