Matrix4D

Transformation matrix *single linear* *standard zero-based row-column index* | 0 4 8 12 | | Rot00*Sx Rot01 Rot02 TransX | | 1 5 9 13 | | Rot10 Rot11*Sy Rot12 TransY | | 2 6 10 14 | = | Rot20 Rot21 Rot22*Sz TransZ | | 3 7 11 15 | | 0 (30) 0 (31) 0 (32) 1 (33) |

Declaration Syntax

public class Matrix4D

Table 1745: Members

Constructor

Matrix4D()

Default constructor - creates identity 4x4 matrix

Constructor

Matrix4D(double[])

Construct 4x4 matrix initialized to given entries. If entries not valid, an identity 4x4 matrix is constructed.

Constructor

Matrix4D(Matrix4D)

Copy constructor

Field

Identity

Identity 4x4 matrix

Property

Determinant

Matrix determinant accessor.

Property

Item

A standard (row, column) indexer to the matrix entries | 0,0 0,1 0,2 0,3 | | 1,0 1,1 1,2 1,3 | | 2,0 2,1 2,2 2,3 | | 3,0 3,1 3,2 3,3 |

Property

Item

An OpenGL compatible linear indexer to the matrix entries | 0 4 8 12 | | 1 5 9 13 | | 2 6 10 14 | | 3 7 11 15 |

Method

Add(Matrix4D)

Add matrix to itself.

Method

CreateMirror(Vector3D, double)

Create transformation matrix mirroring about a plane

Method

CreateRotate(Vector3D, double)

Create transformation matrix that rotates about a given vector by a given angle

Method

CreateScale(double, double, double)

Create scaling transformation matrix

Method

CreateSystem(Vector3D, Vector3D, Vector3D)

Create transformation matrix converting to new coordinate system.

Method

CreateTranslate(double, double, double)

Create translating transformation matrix

Method

Invert()

Invert itself if determinant is non-zero. Return 0 if inverted; 1 - otherwise.

Method

Multiply(Matrix4D)

Multiply this matrix by the given matrix

Method

Scale(double, double, double)

Convenient method to combine x, y, z scale into itself.

Method

Subtract(Matrix4D)

Subtract matrix from itself.

Method

ToString()

String representation.

Method

Transform(Vector3D)

Apply this transformation matrix to a given point/vector. Note: assumes (0,0,0,1) in last row.

Method

Translate(double, double, double)

Convenient method to combine (x, y, z) translatation into itself.

Method

Transpose()

Transpose itself.

operator

op_Addition(Matrix4D, Matrix4D)

Matrix addition operator.

operator

op_Explicit(Matrix4D)

Cast operator into OpenGL's format matrix array.

operator

op_Multiply(Matrix4D, Matrix4D)

Matrix multiplication operator - assumes (0,0,0,1) in last row.

operator

op_Subtraction(Matrix4D, Matrix4D)

Matrix subtraction operator.