Tesla Graphics Engine Documentation (January 2012)
Matrix Structure
TeslaTesla.MathMatrix
Defines a 4x4 row-major Matrix (following DirectX's matrix layout). Right handedness conventions used by default.
Declaration Syntax
C#
[SerializableAttribute]
public struct Matrix : IEquatable<Matrix>
Members
All Members Constructors Methods Properties Fields



Icon Member Description
Matrix(Single, Single, Single, Single, Single, Single, Single, Single, Single, Single, Single, Single, Single, Single, Single, Single)
Creates a new instance of Matrix

Add(Matrix, Matrix)
Adds two matrices together.

Add(Matrix%, Matrix%, Matrix%)
Adds two matrices together.

Addition(Matrix, Matrix)
Adds two matrices together.

Backward
Gets or sets the backward vector (M31, M32, M33) of the matrix.

CreateOrthoMatrix(Single, Single, Single, Single)
Creates an orthographic projection matrix.

CreateOrthoMatrix(Single, Single, Single, Single, Matrix%)
Creates an orthographic projection matrix.

CreateOrthoMatrix(Single, Single, Single, Single, Single, Single)
Creates a custom orthographic projection matrix.

CreateOrthoMatrix(Single, Single, Single, Single, Single, Single, Matrix%)
Creates a custom orthographic projection matrix.

CreatePerspectiveFOVMatrix(Single, Single, Single, Single)
Creates a perspective projection matrix based on a field of view.

CreatePerspectiveFOVMatrix(Single, Single, Single, Single, Matrix%)
Creates a perspective projection matrix based on a field of view.

CreatePerspectiveMatrix(Single, Single, Single, Single)
Creates a perspective projection matrix.

CreatePerspectiveMatrix(Single, Single, Single, Single, Matrix%)
Creates a perspective projection matrix.

CreatePerspectiveMatrix(Single, Single, Single, Single, Single, Single)
Creates a custom perspective projection matrix.

CreatePerspectiveMatrix(Single, Single, Single, Single, Single, Single, Matrix%)
Creates a custom perspective projection matrix.

CreateViewMatrix(Vector3, Vector3, Vector3)
Creates a view matrix with specified eye position, a target, and the up vector in the world.

CreateViewMatrix(Vector3%, Vector3%, Vector3%, Matrix%)
Creates a view matrix with specified eye position, a target, and the up vector in the world.

Decompose(Vector3%, Quaternion%, Vector3%)
Decomposes a 3D scale/rotation/translation (SRT) matrix into its scaling, rotation, and translation components.

Determinant()()()()
Compute the determinant of this matrix.

Divide(Matrix, Matrix)
Divides the a matrice's components by the components of another.

Divide(Matrix%, Matrix%, Matrix%)
Divides the a matrice's components by the components of another.

Divide(Matrix, Single)
Divides the a matrice's components by a scalar value.

Divide(Matrix%, Single, Matrix%)
Divides the a matrice's components by a scalar value.

Division(Matrix, Matrix)
Divides the components of a matrix by the counterpart components of the other.

Division(Matrix, Single)
Divides a matrix by a scalar.

Down
Gets or sets the down vector of the matrix (negation of Up vector). Setting will negate component values.

Equality(Matrix, Matrix)
Tests equality between two matrices.

Equals(Matrix)
Tests equality with another matrix.

Equals(Object)
Tests equality between this matrix and the specified object.
(Overrides ValueType.Equals(Object).)
Forward
Gets or sets the forward vector of the matrix (negation of backward vector).

FromAngleAxis(Single, Vector3)
Creates a rotation matrix from a supplied angle in radians and axis to rotate about.

FromAngleAxis(Single, Vector3%, Matrix%)
Creates a rotation matrix from a supplied angle in radians and axis to rotate about.

FromAxes(Vector3, Vector3, Vector3)
Creates a rotation matrix from 3 orthogonal axes.

FromAxes(Vector3%, Vector3%, Vector3%, Matrix%)
Creates a rotation matrix from 3 orthogonal axes.

FromEulerAngles(Single, Single, Single)
Creates a rotation matrix from the corresponding yaw, pitch, and roll angles. The order of the angles are applied in that order.

FromEulerAngles(Single, Single, Single, Matrix%)
Creates a rotation matrix from the corresponding yaw, pitch, and roll angles. The order of the angles are applied in that order.

FromQuaternion(Quaternion)
Creates a rotation matrix from the supplied quaternion.

FromQuaternion(Quaternion%, Matrix%)
Creates a rotation matrix from the supplied quaternion.

FromRotationX(Single)
Creates a matrix that represents a rotation around the x-axis.

FromRotationX(Single, Matrix%)
Creates a matrix that represents a rotation around the x-axis.

FromRotationY(Single)
Creates a matrix that represents a rotation around the y-axis.

FromRotationY(Single, Matrix%)
Creates a matrix that represents a rotation around the y-axis.

FromRotationZ(Single)
Creates a matrix that represents a rotation around the z-axis.

FromRotationZ(Single, Matrix%)
Creates a matrix that represents a rotation around the z-axis.

FromScale(Vector3)
Creates a scaling matrix from the supplied scale vector.

FromScale(Vector3%, Matrix%)
Creates a scaling matrix from the supplied scale vector.

FromScale(Single)
Creates a scaling matrix from the supplied scaling value for uniform scale.

FromScale(Single, Matrix%)
Creates a scaling matrix from the supplied scaling value for uniform scale.

FromScale(Single, Single, Single)
Creates a scale matrix from the supplied scalars.

FromScale(Single, Single, Single, Matrix%)
Creates a scale matrix from the supplied scalars.

FromTranslation(Vector3)
Creates a translation matrix from the supplied vector.

FromTranslation(Vector3%, Matrix%)
Creates a translation matrix from the supplied vector.

FromTranslation(Single, Single, Single)
Creates a translation matrix from the supplied values.

FromTranslation(Single, Single, Single, Matrix%)
Creates a translation matrix from the supplied values.

GetHashCode()()()()
Get the hash code of this object.
(Overrides ValueType.GetHashCode()()()().)
GetType()()()()
Gets the Type of the current instance.
(Inherited from Object.)
Identity
Get the identity matrix.

Inequality(Matrix, Matrix)
Tests inequality between two matrices.

Invert(Matrix)
Compute the inverse of the specified matrix.

Invert(Matrix%, Matrix%)
Compute the inverse of the specified matrix.

Item[([( Int32, Int32])])
Gets or sets an individual component based on its index in the matrix. The indices follow the named components, so the first element is located at (1,1) and the last element at (4,4). Indices outside this range return a value of zero.

Left
Gets or sets the left vector of the matrix (negation of left vector).

Lerp(Matrix, Matrix, Single)
Linearly interpolate between the two specified matrices.

Lerp(Matrix%, Matrix%, Single, Matrix%)
Linearly interpolate between the two specified matrices.

LookAt(Vector3, Vector3, Vector3)
Creates a rotation matrix where the object is facing the target along its z axis. If your object's "forward" facing is down -Z, then the object will correctly face the target.

LookAt(Vector3%, Vector3%, Vector3%, Matrix%)
Creates a rotation matrix where the object is facing the target along its z axis. If your object's "forward" facing is down -Z, then the object will correctly face the target.

M11
Value at row 1, column 1 of the matrix

M12
Value at row 1, column 2 of the matrix

M13
Value at row 1, column 3 of the matrix

M14
Value at row 1, column 4 of the matrix

M21
Value at row 2, column 1 of the matrix

M22
Value at row 2, column 2 of the matrix

M23
Value at row 2, column 3 of the matrix

M24
Value at row 2, column 4 of the matrix

M31
Value at row 3, column 1 of the matrix

M32
Value at row 3, column 2 of the matrix

M33
Value at row 3, column 3 of the matrix

M34
Value at row 3, column 4 of the matrix

M41
Value at row 4, column 1 of the matrix

M42
Value at row 4, column 2 of the matrix

M43
Value at row 4, column 3 of the matrix

M44
Value at row 4, column 4 of the matrix

Multiply(Matrix, Matrix)
Multiplies two matrices together.

Multiply(Matrix%, Matrix%, Matrix%)
Multiplies two matrices together.

Multiply(Matrix, Single)
Multiplies a matrix by a scalar value.

Multiply(Matrix%, Single, Matrix%)
Multiplies a matrix by a scalar value.

Multiply(Matrix, Matrix)
Multiplies two matrices.

Multiply(Matrix, Single)
Multiplies a matrix by a scalar value.

Multiply(Single, Matrix)
Multiplies a matrix by a scalar value.

Negate()()()()
Flips the signs of each matrix element.

Negate(Matrix)
Flips the signs of each element of the supplied matrix.

Negate(Matrix%, Matrix%)
Flips the signs of each element of the supplied matrix.

Right
Gets or sets the right vector (M11, M12, M13) of the matrix.

SizeInBytes
Get the size of the Matrix structure in bytes.

Subtract(Matrix, Matrix)
Subtracts one matrix from another.

Subtract(Matrix%, Matrix%, Matrix%)
Subtracts one matrix from another.

Subtraction(Matrix, Matrix)
Subtracts a matrix from the other.

ToString()()()()
Get the string representation of this object.
(Overrides ValueType.ToString()()()().)
Transform(Matrix, Quaternion)
Transforms the supplied matrix by a quaternion rotation.

Transform(Matrix%, Quaternion%, Matrix%)
Transforms the supplied matrix by a quaternion rotation.

Translation
Gets or sets the translation vector (M41, M42, M43) of the matrix.

Transpose(Matrix)
Swaps the rows and columns of the supplied matrix.

Transpose(Matrix%, Matrix%)
Swaps the rows and columns of the supplied matrix.

UnaryNegation(Matrix)
Flips the signs of the components of the specified matrix.

Up
Gets or sets the up vector (M21, M22, M23) of the matrix.

Assembly: Tesla (Module: Tesla) Version: 0.5.0.0 (0.5.0.0)