Table of Contents

Struct Matrix4X4

Namespace
Alis.Core.Aspect.Math.Matrix
Assembly
Alis.dll

The matrix

public struct Matrix4X4 : IEquatable<Matrix4X4>

Implements

Inherited Members

Constructors

Matrix4X4(float, float, float, float, float, float, float, float, float, float, float, float, float, float, float, float)

Creates a 4x4 matrix from the specified components.

public Matrix4X4(float m11, float m12, float m13, float m14, float m21, float m22, float m23, float m24, float m31, float m32, float m33, float m34, float m41, float m42, float m43, float m44)

Parameters

m11 float

The value to assign to the first element in the first row.

m12 float

The value to assign to the second element in the first row.

m13 float

The value to assign to the third element in the first row.

m14 float

The value to assign to the fourth element in the first row.

m21 float

The value to assign to the first element in the second row.

m22 float

The value to assign to the second element in the second row.

m23 float

The value to assign to the third element in the second row.

m24 float

The value to assign to the third element in the second row.

m31 float

The value to assign to the first element in the third row.

m32 float

The value to assign to the second element in the third row.

m33 float

The value to assign to the third element in the third row.

m34 float

The value to assign to the fourth element in the third row.

m41 float

The value to assign to the first element in the fourth row.

m42 float

The value to assign to the second element in the fourth row.

m43 float

The value to assign to the third element in the fourth row.

m44 float

The value to assign to the fourth element in the fourth row.

Fields

hashCode

The hash code

private readonly int hashCode

Field Value

int

Properties

Identity

Gets the multiplicative identity matrix.

public static Matrix4X4 Identity { get; }

Property Value

Matrix4X4

M11

The first element of the first row.

public float M11 { readonly get; set; }

Property Value

float

M12

The second element of the first row.

public float M12 { readonly get; set; }

Property Value

float

M13

The third element of the first row.

public float M13 { readonly get; set; }

Property Value

float

M14

The fourth element of the first row.

public float M14 { readonly get; set; }

Property Value

float

M21

The first element of the second row.

public float M21 { readonly get; set; }

Property Value

float

M22

The second element of the second row.

public float M22 { readonly get; set; }

Property Value

float

M23

The third element of the second row.

public float M23 { readonly get; set; }

Property Value

float

M24

The fourth element of the second row.

public float M24 { readonly get; set; }

Property Value

float

M31

The first element of the third row.

public float M31 { readonly get; set; }

Property Value

float

M32

The second element of the third row.

public float M32 { readonly get; set; }

Property Value

float

M33

The third element of the third row.

public float M33 { readonly get; set; }

Property Value

float

M34

The fourth element of the third row.

public float M34 { readonly get; set; }

Property Value

float

M41

The first element of the fourth row.

public float M41 { readonly get; set; }

Property Value

float

M42

The second element of the fourth row.

public float M42 { readonly get; set; }

Property Value

float

M43

The third element of the fourth row.

public float M43 { readonly get; set; }

Property Value

float

M44

The fourth element of the fourth row.

public float M44 { readonly get; set; }

Property Value

float

Methods

CreateOrthographicOffCenter(float, float, float, float, float, float)

Creates a customized orthographic projection matrix.

public static Matrix4X4 CreateOrthographicOffCenter(float left, float right, float bottom, float top, float zNearPlane, float zFarPlane)

Parameters

left float

The minimum X-value of the view volume.

right float

The maximum X-value of the view volume.

bottom float

The minimum Y-value of the view volume.

top float

The maximum Y-value of the view volume.

zNearPlane float

The minimum Z-value of the view volume.

zFarPlane float

The maximum Z-value of the view volume.

Returns

Matrix4X4

The orthographic projection matrix.

CreateRotationX(float)

Creates the rotation x using the specified radians

public static Matrix4X4 CreateRotationX(float radians)

Parameters

radians float

The radians

Returns

Matrix4X4

The result

CreateRotationZ(float)

Creates a matrix for rotating points around the Z axis.

public static Matrix4X4 CreateRotationZ(float radians)

Parameters

radians float

The amount, in radians, by which to rotate around the Z-axis.

Returns

Matrix4X4

The rotation matrix.

Equals(object)

Returns a value that indicates whether this instance and a specified object are equal.

public override bool Equals(object obj)

Parameters

obj object

The object to compare with the current instance.

Returns

bool

true if the current instance and obj are equal; otherwise, false. If obj is null, the method returns false.

Remarks

The current instance and obj are equal if obj is a Alis.Core.Aspect.Math.Matrix.Matrix4X4 object and the corresponding elements of each matrix are equal.

Equals(Matrix4X4)

Returns a value that indicates whether this instance and another 4x4 matrix are equal.

public bool Equals(Matrix4X4 other)

Parameters

other Matrix4X4

The other matrix.

Returns

bool

true if the two matrices are equal; otherwise, false.

GetHashCode()

Returns the hash code for this instance.

public override int GetHashCode()

Returns

int

The hash code.

Multiply(Matrix4X4, Matrix4X4)

Multiplies the matrix 1

public static Matrix4X4 Multiply(Matrix4X4 matrix1, Matrix4X4 matrix2)

Parameters

matrix1 Matrix4X4

The matrix

matrix2 Matrix4X4

The matrix

Returns

Matrix4X4

The result

ToString()

Returns a string that represents this matrix.

public override string ToString()

Returns

string

The string representation of this matrix.

Remarks

The numeric values in the returned string are formatted by using the conventions of the current culture. For example, for the en-US culture, the returned string might appear as { {M11:1.1 M12:1.2 M13:1.3 M14:1.4} {M21:2.1 M22:2.2 M23:2.3 M24:2.4} {M31:3.1 M32:3.2 M33:3.3 M34:3.4} {M41:4.1 M42:4.2 M43:4.3 M44:4.4} } .

Operators

operator +(Matrix4X4, Matrix4X4)

Adds each element in one matrix with its corresponding element in a second matrix.

public static Matrix4X4 operator +(Matrix4X4 value1, Matrix4X4 value2)

Parameters

value1 Matrix4X4

The first matrix.

value2 Matrix4X4

The second matrix.

Returns

Matrix4X4

The matrix that contains the summed values.

Remarks

The Alis.Core.Aspect.Math.Matrix.Matrix4X4.op_Addition(Alis.Core.Aspect.Math.Matrix.Matrix4X4,Alis.Core.Aspect.Math.Matrix.Matrix4X4) method defines the operation of the addition operator for Alis.Core.Aspect.Math.Matrix.Matrix4X4 objects.

operator ==(Matrix4X4, Matrix4X4)

Returns a value that indicates whether the specified matrices are equal.

public static bool operator ==(Matrix4X4 value1, Matrix4X4 value2)

Parameters

value1 Matrix4X4

The first matrix to compare.

value2 Matrix4X4

The second matrix to care

Returns

bool

true if value1 and value2 are equal; otherwise, false.

Remarks

Two matrices are equal if all their corresponding elements are equal.

operator !=(Matrix4X4, Matrix4X4)

Returns a value that indicates whether the specified matrices are not equal.

public static bool operator !=(Matrix4X4 value1, Matrix4X4 value2)

Parameters

value1 Matrix4X4

The first matrix to compare.

value2 Matrix4X4

The second matrix to compare.

Returns

bool

true if value1 and value2 are not equal; otherwise, false.