TrueSync
Public Member Functions | Static Public Member Functions | Public Attributes | Static Public Attributes | Properties | List of all members
TrueSync.TSMatrix Struct Reference

3x3 Matrix. More...

Public Member Functions

 TSMatrix (FP m11, FP m12, FP m13, FP m21, FP m22, FP m23, FP m31, FP m32, FP m33)
 Initializes a new instance of the matrix structure. More...
 
FP Determinant ()
 
FP Trace ()
 
override string ToString ()
 

Static Public Member Functions

static TSMatrix CreateFromYawPitchRoll (FP yaw, FP pitch, FP roll)
 
static TSMatrix CreateRotationX (FP radians)
 
static void CreateRotationX (FP radians, out TSMatrix result)
 
static TSMatrix CreateRotationY (FP radians)
 
static void CreateRotationY (FP radians, out TSMatrix result)
 
static TSMatrix CreateRotationZ (FP radians)
 
static void CreateRotationZ (FP radians, out TSMatrix result)
 
static TSMatrix Multiply (TSMatrix matrix1, TSMatrix matrix2)
 Gets the determinant of the matrix. More...
 
static void Multiply (ref TSMatrix matrix1, ref TSMatrix matrix2, out TSMatrix result)
 Multiply two matrices. Notice: matrix multiplication is not commutative. More...
 
static TSMatrix Add (TSMatrix matrix1, TSMatrix matrix2)
 Matrices are added. More...
 
static void Add (ref TSMatrix matrix1, ref TSMatrix matrix2, out TSMatrix result)
 Matrices are added. More...
 
static TSMatrix Inverse (TSMatrix matrix)
 Calculates the inverse of a give matrix. More...
 
static void Invert (ref TSMatrix matrix, out TSMatrix result)
 
static void Inverse (ref TSMatrix matrix, out TSMatrix result)
 Calculates the inverse of a give matrix. More...
 
static TSMatrix Multiply (TSMatrix matrix1, FP scaleFactor)
 Multiply a matrix by a scalefactor. More...
 
static void Multiply (ref TSMatrix matrix1, FP scaleFactor, out TSMatrix result)
 Multiply a matrix by a scalefactor. More...
 
static TSMatrix CreateFromLookAt (TSVector position, TSVector target)
 Creates a JMatrix representing an orientation from a quaternion. More...
 
static void LookAt (out TSMatrix result, TSVector position, TSVector target)
 
static TSMatrix CreateFromQuaternion (TSQuaternion quaternion)
 
static void CreateFromQuaternion (ref TSQuaternion quaternion, out TSMatrix result)
 Creates a JMatrix representing an orientation from a quaternion. More...
 
static TSMatrix Transpose (TSMatrix matrix)
 Creates the transposed matrix. More...
 
static void Transpose (ref TSMatrix matrix, out TSMatrix result)
 Creates the transposed matrix. More...
 
static TSMatrix operator* (TSMatrix value1, TSMatrix value2)
 Multiplies two matrices. More...
 
static TSMatrix operator+ (TSMatrix value1, TSMatrix value2)
 Adds two matrices. More...
 
static TSMatrix operator- (TSMatrix value1, TSMatrix value2)
 Subtracts two matrices. More...
 
static void CreateFromAxisAngle (ref TSVector axis, FP angle, out TSMatrix result)
 Creates a matrix which rotates around the given axis by the given angle. More...
 
static TSMatrix AngleAxis (FP angle, TSVector axis)
 Creates a matrix which rotates around the given axis by the given angle. More...
 

Public Attributes

FP M11
 M11 More...
 
FP M12
 M12 More...
 
FP M13
 M13 More...
 
FP M21
 M21 More...
 
FP M22
 M22 More...
 
FP M23
 M23 More...
 
FP M31
 M31 More...
 
FP M32
 M32 More...
 
FP M33
 M33 More...
 

Static Public Attributes

static readonly TSMatrix Identity
 Identity matrix. More...
 
static readonly TSMatrix Zero
 

Properties

TSVector eulerAngles [get]
 

Detailed Description

3x3 Matrix.

Definition at line 26 of file TSMatrix.cs.

Constructor & Destructor Documentation

TrueSync.TSMatrix.TSMatrix ( FP  m11,
FP  m12,
FP  m13,
FP  m21,
FP  m22,
FP  m23,
FP  m31,
FP  m32,
FP  m33 
)

Initializes a new instance of the matrix structure.

Parameters
m11m11
m12m12
m13m13
m21m21
m22m22
m23m23
m31m31
m32m32
m33m33

Definition at line 216 of file TSMatrix.cs.

Member Function Documentation

static TSMatrix TrueSync.TSMatrix.Add ( TSMatrix  matrix1,
TSMatrix  matrix2 
)
static

Matrices are added.

Parameters
matrix1The first matrix.
matrix2The second matrix.
Returns
The sum of both matrices.

Definition at line 292 of file TSMatrix.cs.

static void TrueSync.TSMatrix.Add ( ref TSMatrix  matrix1,
ref TSMatrix  matrix2,
out TSMatrix  result 
)
static

Matrices are added.

Parameters
matrix1The first matrix.
matrix2The second matrix.
resultThe sum of both matrices.

Definition at line 305 of file TSMatrix.cs.

static TSMatrix TrueSync.TSMatrix.AngleAxis ( FP  angle,
TSVector  axis 
)
static

Creates a matrix which rotates around the given axis by the given angle.

Parameters
axisThe axis.
angleThe angle.
Returns
The resulting rotation matrix

Definition at line 635 of file TSMatrix.cs.

static void TrueSync.TSMatrix.CreateFromAxisAngle ( ref TSVector  axis,
FP  angle,
out TSMatrix  result 
)
static

Creates a matrix which rotates around the given axis by the given angle.

Parameters
axisThe axis.
angleThe angle.
resultThe resulting rotation matrix

Definition at line 605 of file TSMatrix.cs.

static TSMatrix TrueSync.TSMatrix.CreateFromLookAt ( TSVector  position,
TSVector  target 
)
static

Creates a JMatrix representing an orientation from a quaternion.

Parameters
quaternionThe quaternion the matrix should be created from.
Returns
JMatrix representing an orientation.

Definition at line 459 of file TSMatrix.cs.

static void TrueSync.TSMatrix.CreateFromQuaternion ( ref TSQuaternion  quaternion,
out TSMatrix  result 
)
static

Creates a JMatrix representing an orientation from a quaternion.

Parameters
quaternionThe quaternion the matrix should be created from.
resultJMatrix representing an orientation.

Definition at line 493 of file TSMatrix.cs.

static TSMatrix TrueSync.TSMatrix.Inverse ( TSMatrix  matrix)
static

Calculates the inverse of a give matrix.

Parameters
matrixThe matrix to invert.
Returns
The inverted JMatrix.

Definition at line 325 of file TSMatrix.cs.

static void TrueSync.TSMatrix.Inverse ( ref TSMatrix  matrix,
out TSMatrix  result 
)
static

Calculates the inverse of a give matrix.

Parameters
matrixThe matrix to invert.
resultThe inverted JMatrix.

Definition at line 371 of file TSMatrix.cs.

static TSMatrix TrueSync.TSMatrix.Multiply ( TSMatrix  matrix1,
TSMatrix  matrix2 
)
static

Gets the determinant of the matrix.

Returns
The determinant of the matrix.

Multiply two matrices. Notice: matrix multiplication is not commutative.

Parameters
matrix1The first matrix.
matrix2The second matrix.
Returns
The product of both matrices.

Definition at line 248 of file TSMatrix.cs.

static void TrueSync.TSMatrix.Multiply ( ref TSMatrix  matrix1,
ref TSMatrix  matrix2,
out TSMatrix  result 
)
static

Multiply two matrices. Notice: matrix multiplication is not commutative.

Parameters
matrix1The first matrix.
matrix2The second matrix.
resultThe product of both matrices.

Definition at line 261 of file TSMatrix.cs.

static TSMatrix TrueSync.TSMatrix.Multiply ( TSMatrix  matrix1,
FP  scaleFactor 
)
static

Multiply a matrix by a scalefactor.

Parameters
matrix1The matrix.
scaleFactorThe scale factor.
Returns
A JMatrix multiplied by the scale factor.

Definition at line 424 of file TSMatrix.cs.

static void TrueSync.TSMatrix.Multiply ( ref TSMatrix  matrix1,
FP  scaleFactor,
out TSMatrix  result 
)
static

Multiply a matrix by a scalefactor.

Parameters
matrix1The matrix.
scaleFactorThe scale factor.
resultA JMatrix multiplied by the scale factor.

Definition at line 437 of file TSMatrix.cs.

static TSMatrix TrueSync.TSMatrix.operator* ( TSMatrix  value1,
TSMatrix  value2 
)
static

Multiplies two matrices.

Parameters
value1The first matrix.
value2The second matrix.
Returns
The product of both values.

Definition at line 555 of file TSMatrix.cs.

static TSMatrix TrueSync.TSMatrix.operator+ ( TSMatrix  value1,
TSMatrix  value2 
)
static

Adds two matrices.

Parameters
value1The first matrix.
value2The second matrix.
Returns
The sum of both values.

Definition at line 575 of file TSMatrix.cs.

static TSMatrix TrueSync.TSMatrix.operator- ( TSMatrix  value1,
TSMatrix  value2 
)
static

Subtracts two matrices.

Parameters
value1The first matrix.
value2The second matrix.
Returns
The difference of both values.

Definition at line 589 of file TSMatrix.cs.

static TSMatrix TrueSync.TSMatrix.Transpose ( TSMatrix  matrix)
static

Creates the transposed matrix.

Parameters
matrixThe matrix which should be transposed.
Returns
The transposed JMatrix.

Definition at line 522 of file TSMatrix.cs.

static void TrueSync.TSMatrix.Transpose ( ref TSMatrix  matrix,
out TSMatrix  result 
)
static

Creates the transposed matrix.

Parameters
matrixThe matrix which should be transposed.
resultThe transposed JMatrix.

Definition at line 534 of file TSMatrix.cs.

Member Data Documentation

readonly TSMatrix TrueSync.TSMatrix.Identity
static

Identity matrix.

Definition at line 70 of file TSMatrix.cs.

FP TrueSync.TSMatrix.M11

M11

Definition at line 31 of file TSMatrix.cs.

FP TrueSync.TSMatrix.M12

M12

Definition at line 35 of file TSMatrix.cs.

FP TrueSync.TSMatrix.M13

M13

Definition at line 39 of file TSMatrix.cs.

FP TrueSync.TSMatrix.M21

M21

Definition at line 43 of file TSMatrix.cs.

FP TrueSync.TSMatrix.M22

M22

Definition at line 47 of file TSMatrix.cs.

FP TrueSync.TSMatrix.M23

M23

Definition at line 51 of file TSMatrix.cs.

FP TrueSync.TSMatrix.M31

M31

Definition at line 55 of file TSMatrix.cs.

FP TrueSync.TSMatrix.M32

M32

Definition at line 59 of file TSMatrix.cs.

FP TrueSync.TSMatrix.M33

M33

Definition at line 63 of file TSMatrix.cs.


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