# Unigine.mat3 Struct

Notice
The functions listed below are the members of the Unigine.MathLib namespace.

## floatm00#

The Matrix element in the corresponding row and column mxy = M[x, y]. Provides convenient access to matrix elements.

## floatm10#

The Matrix element in the corresponding row and column mxy = M[x, y]. Provides convenient access to matrix elements.

## floatm20#

The Matrix element in the corresponding row and column mxy = M[x, y]. Provides convenient access to matrix elements.

## floatm01#

The Matrix element in the corresponding row and column mxy = M[x, y]. Provides convenient access to matrix elements.

## floatm11#

The Matrix element in the corresponding row and column mxy = M[x, y]. Provides convenient access to matrix elements.

## floatm21#

The Matrix element in the corresponding row and column mxy = M[x, y]. Provides convenient access to matrix elements.

## floatm02#

The Matrix element in the corresponding row and column mxy = M[x, y]. Provides convenient access to matrix elements.

## floatm12#

The Matrix element in the corresponding row and column mxy = M[x, y]. Provides convenient access to matrix elements.

## floatm22#

The Matrix element in the corresponding row and column mxy = M[x, y]. Provides convenient access to matrix elements.

## mat3ZERO#

The Matrix, filled with zeros (0).

## mat3ONE#

The Matrix, filled with ones (1).

## mat3IDENTITY#

The Identity matrix.

## quatQuat#

The Quaternion that this matrix represents.

The First row.

The Second row.

The Third row.

## vec3Column0#

The First column.

## vec3Column1#

The Second column.

## vec3Column2#

The Third column.

The X axis.

The Y axis.

The Z axis.

## vec3Diagonal#

The Vector containing diagonal elements of the matrix.

## floatTrace#

The Trace of the matrix: (sum of its diagonal elements).

## floatDeterminant#

The Determinant of the matrix.

## booloperator== ( mat3 v0, mat3 v1 ) #

Performs equal comparison.

### Arguments

• mat3 v0 - First value.
• mat3 v1 - Second value.

## booloperator!= ( mat3 v0, mat3 v1 ) #

Not equal comparison.

### Arguments

• mat3 v0 - First value.
• mat3 v1 - Second value.

## boolEquals ( mat3 other ) #

Checks if the vector and the specified argument are equal (epsilon).

### Arguments

• mat3 other - Value to be checked for equality.

Return value.

## boolEquals ( object obj ) #

Checks if the vector and the specified argument are equal (epsilon).

Return value.

## intGetHashCode ( ) #

Returns a hash code for the current object. Serves as the default hash function.

### Return value

Resulting int value.

Subtraction.

## mat3operator* ( mat3 m, float v ) #

Multiplication.

### Arguments

• mat3 m - Matrix.
• float v - Value.

Multiplication.

Multiplication.

Multiplication.

Multiplication.

Multiplication.

Multiplication.

Multiplication.

Multiplication.

## mat3operator* ( mat3 m0, mat3 m1 ) #

Multiplication.

### Arguments

• mat3 m0 - First value.
• mat3 m1 - Second value.

## mat3operator+ ( mat3 m0, mat3 m1 ) #

### Arguments

• mat3 m0 - First value.
• mat3 m1 - Second value.

## mat3operator- ( mat3 m0, mat3 m1 ) #

Subtraction.

### Arguments

• mat3 m0 - First value.
• mat3 m1 - Second value.

## voidSet ( float m00_, float m10_, float m20_, float m01_, float m11_, float m21_, float m02_, float m12_, float m22_ ) #

Sets the value using the specified argument(s).
Output
``````Resulting matrix:
| m00_	 m01_	m02_ |
M=  | m10_   m11_   m12_ |
| m20_   m21_   m22_ |``````

### Arguments

• float m00_ - m00_ element.
• float m10_ - m10_ element.
• float m20_ - m20_ element.
• float m01_ - m01_ element.
• float m11_ - m11_ element.
• float m21_ - m21_ element.
• float m02_ - m02_ element.
• float m12_ - m12_ element.
• float m22_ - m22_ element.

## voidSet ( float v ) #

Sets the value using the specified argument(s).

### Arguments

• float v - A float value to be used.

## voidSet ( float[] m ) #

Sets the value using the specified argument(s).

### Arguments

• float[] m - Source matrix.

## voidSet ( mat3 m ) #

Sets the value using the specified argument(s).

### Arguments

• mat3 m - Source matrix.

## voidSet ( mat2 m ) #

Sets the value using the specified argument(s).

### Arguments

• mat2 m - Source matrix.

## voidSet ( mat4 m ) #

Sets the value using the specified argument(s).

### Arguments

• mat4 m - Source matrix.

## voidSet ( dmat4 m ) #

Sets the value using the specified argument(s).

## voidSet ( vec3 col0, vec3 col1, vec3 col2 ) #

Sets the value using the specified argument(s).

### Arguments

• vec3 col0 - First column.
• vec3 col1 - Second column.
• vec3 col2 - Third column.

## voidSet ( quat q ) #

Sets the value using the specified argument(s).

### Arguments

• quat q - Source quaternion.

## voidSetRow ( int row, vec3 v ) #

Sets the specified row of the matrix using a given vec3 vector as a source.

### Arguments

• int row - Row index.
• vec3 v - Source vector.

## vec3GetRow ( int row ) #

Returns the specified matrix row.

### Arguments

• int row - Row index.

Return value.

## voidSetColumn ( int column, vec3 v ) #

Sets the specified column of the matrix using a given vec3 vector as a source.

### Arguments

• int column - Column index.
• vec3 v - Source vector.

## vec3GetColumn ( int column ) #

Returns the specified matrix column.

### Arguments

• int column - Column index.

Return value.

## floatGet ( int row, int column ) #

Returns the matrix element specified by a given row and column.

### Arguments

• int row - Row index.
• int column - Column index.

### Return value

Resulting float value.

## floatSet ( int row, int column, float v ) #

Sets the value using the specified argument(s).

### Arguments

• int row - Row index.
• int column - Column index.
• float v - A float value to be used.

### Return value

Resulting float value.

## voidClear ( ) #

Clears the value by setting all components/elements to 0.

## voidSetZero ( ) #

Sets all matrix elements equal to 0.

## voidSetIdentity ( ) #

Sets the matrix equal to the identity matrix.

## voidSetSkewSymmetric ( vec3 v ) #

Fills the skew-symmetric matrix using a given vec3 source vector.
Output
``````Skew-symmetric matrix:
| 0.0f   	-v.z	   v.y |
S=  | v.z       0.0f      -v.x |
| -v.y      v.x       0.0f |``````

### Arguments

• vec3 v - Source vector.

## voidSetRotate ( vec3 axis, float angle ) #

Sets the rotation matrix for a given axis.

### Arguments

• vec3 axis - Axis of rotation.
• float angle - Angle, in degrees.

## voidSetRotateX ( float angle ) #

Sets X rotation matrix.

### Arguments

• float angle - Angle, in degrees.

## voidSetRotateY ( float angle ) #

Sets Y rotation matrix.

### Arguments

• float angle - Angle, in degrees.

## voidSetRotateZ ( float angle ) #

Sets Z rotation matrix.

### Arguments

• float angle - Angle, in degrees.

## voidSetScale ( vec3 v ) #

Fills the scaling matrix using a given vec3 source vector.
Output
``````Scaling matrix:
| v.x   	0.0f	  0.0f |
S=  | 0.0f      v.y    	  0.0f |
| 0.0f      0.0f      v.z  |``````

### Arguments

• vec3 v - Source vector.

## stringToString ( ) #

Converts the current value to a string value.

### Return value

Resulting string value.
Last update: 24.08.2021