DINO-Unity21
Sample Unity 2021 Project for HL2-DINO
Loading...
Searching...
No Matches
MatrixUtilities Class Reference

Public Types

enum  MatrixEntryOrder { RowMajor = 0 , ColumnMajor = 1 }
 
enum  MatrixUnits { mm = 0 , m = 1 }
 
enum  Handedness { Left , Right }
 

Static Public Member Functions

static Matrix4x4 FillMatrixWithDoubles (double[] vals, MatrixEntryOrder order, MatrixUnits units)
 Tries to parse a double array into a Matrix4x4.
 
static Matrix4x4 ReturnZInvertedMatrix (Matrix4x4 _m)
 Helper function to convert between left/right handed matrices, achieved by inverting the Z-related components in the matrix.
 
static List< Vector3 > InvertCoordinatesZ (List< Vector3 > coordinates)
 

Member Function Documentation

◆ FillMatrixWithDoubles()

static Matrix4x4 MatrixUtilities.FillMatrixWithDoubles ( double[]  vals,
MatrixEntryOrder  order,
MatrixUnits  units 
)
inlinestatic

Tries to parse a double array into a Matrix4x4.

Parameters
valsRaw double values for matrix, should be 16 elements
orderEnum describing if elements are in row/column major order
unitsEnum describing units of matrix elements
Returns
Formatted Matrix4x4 filled with values

◆ ReturnZInvertedMatrix()

static Matrix4x4 MatrixUtilities.ReturnZInvertedMatrix ( Matrix4x4  _m)
inlinestatic

Helper function to convert between left/right handed matrices, achieved by inverting the Z-related components in the matrix.

Parameters
_mConventional right-handed matrix
Returns
Output matrix with swapped handedness

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