C# Класс Axiom.Math.Matrix4

Показать файл Открыть проект Примеры использования класса

Открытые свойства

Свойство Тип Описание
m00 Real
m10 Real
m20 Real
m30 Real

Открытые методы

Метод Описание
Add ( Matrix4 left, Matrix4 right ) : Matrix4

Used to add two matrices together.

Compose ( Vector3 translation, Vector3 scale, Quaternion orientation ) : Matrix4

Creates a translation Matrix

ComposeInverse ( Vector3 translation, Vector3 scale, Quaternion orientation ) : Matrix4

Creates an inverse translation Matrix

Decompose ( Vector3 &translation, Vector3 &scale, Quaternion &orientation ) : void

Decompose the matrix.

Equals ( object obj ) : bool

Compares this Matrix to another object. This should be done because the equality operators (==, !=) have been overriden by this class.

ExtractRotation ( ) : Axiom.Math.Matrix3

Extract the 3x3 matrix representing the current rotation.

ExtractScale ( ) : Vector3

Extract scaling information.

FromMatrix3 ( Axiom.Math.Matrix3 right ) : Matrix4

Used to allow assignment from a Matrix3 to a Matrix4 object.

GetHashCode ( ) : int

Provides a unique hash code based on the member variables of this class. This should be done because the equality operators (==, !=) have been overriden by this class.

The standard implementation is a simple XOR operation between all local member variables.

GetMatrix3 ( ) : Axiom.Math.Matrix3

Returns a 3x3 portion of this 4x4 matrix.

Inverse ( ) : Matrix4

Returns an inverted matrix.

InverseAffine ( ) : Matrix4

Returns an inverted affine matrix.

MakeFloatArray ( float floats ) : void
MakeRealArray ( Real reals ) : void

Matrix4 ( Real m00, Real m01, Real m02, Real m03, Real m10, Real m11, Real m12, Real m13, Real m20, Real m21, Real m22, Real m23, Real m30, Real m31, Real m32, Real m33 ) : System

Creates a new Matrix4 with all the specified parameters.

Multiply ( Matrix4 left, Matrix4 right ) : Matrix4

Used to multiply (concatenate) two 4x4 Matrices.

Multiply ( Matrix4 matrix, Plane plane ) : Plane

Transforms a plane using the specified transform.

Multiply ( Matrix4 matrix, Vector3 vector ) : Vector3

Transforms the given 3-D vector by the matrix, projecting the result back into w = 1.

This means that the initial w is considered to be 1.0, and then all the tree elements of the resulting 3-D vector are divided by the resulting w.

Subtract ( Matrix4 left, Matrix4 right ) : Matrix4

Used to subtract two matrices.

ToString ( ) : string

Overrides the Object.ToString() method to provide a text representation of a Matrix4.

TransformAffine ( Vector3 v ) : Vector3

3-D Vector transformation specially for affine matrix.

Transforms the given 3-D vector by the matrix, projecting the result back into w = 1. The matrix must be an affine matrix. Matrix4.IsAffine.

TransformAffine ( Vector4 v ) : Vector4

4-D Vector transformation specially for affine matrix.

The matrix must be an affine matrix. Matrix4.IsAffine.

Transpose ( ) : Matrix4

Swap the rows of the matrix with the columns.

operator ( ) : Matrix4

Used to multiply (concatenate) two 4x4 Matrices.

operator ( ) : Plane

Used to multiply a transformation to a Plane.

operator ( ) : Vector3

Transforms the given 3-D vector by the matrix, projecting the result back into w = 1.

This means that the initial w is considered to be 1.0, and then all the tree elements of the resulting 3-D vector are divided by the resulting w.

operator ( ) : bool

Compares two Matrix4 instances for equality.

this ( int index ) : Real

Allows the Matrix to be accessed linearly (m[0] -> m[15]).

This indexer is only provided as a convenience, and is not recommended for use in intensive applications.

this ( int row, int col ) : Real

Allows the Matrix to be accessed like a 2d array (i.e. matrix[2,3])

This indexer is only provided as a convenience, and is not recommended for use in intensive applications.

Приватные методы

Метод Описание
Adjoint ( ) : Matrix4

Used to generate the adjoint of this matrix.

Описание методов

Add() публичный статический метод

Used to add two matrices together.
public static Add ( Matrix4 left, Matrix4 right ) : Matrix4
left Matrix4
right Matrix4
Результат Matrix4

Compose() публичный статический метод

Creates a translation Matrix
public static Compose ( Vector3 translation, Vector3 scale, Quaternion orientation ) : Matrix4
translation Vector3
scale Vector3
orientation Quaternion
Результат Matrix4

ComposeInverse() публичный статический метод

Creates an inverse translation Matrix
public static ComposeInverse ( Vector3 translation, Vector3 scale, Quaternion orientation ) : Matrix4
translation Vector3
scale Vector3
orientation Quaternion
Результат Matrix4

Decompose() публичный метод

Decompose the matrix.
public Decompose ( Vector3 &translation, Vector3 &scale, Quaternion &orientation ) : void
translation Vector3
scale Vector3
orientation Quaternion
Результат void

Equals() публичный метод

Compares this Matrix to another object. This should be done because the equality operators (==, !=) have been overriden by this class.
public Equals ( object obj ) : bool
obj object
Результат bool

ExtractRotation() публичный метод

Extract the 3x3 matrix representing the current rotation.
public ExtractRotation ( ) : Axiom.Math.Matrix3
Результат Axiom.Math.Matrix3

ExtractScale() публичный метод

Extract scaling information.
public ExtractScale ( ) : Vector3
Результат Vector3

FromMatrix3() публичный статический метод

Used to allow assignment from a Matrix3 to a Matrix4 object.
public static FromMatrix3 ( Axiom.Math.Matrix3 right ) : Matrix4
right Axiom.Math.Matrix3
Результат Matrix4

GetHashCode() публичный метод

Provides a unique hash code based on the member variables of this class. This should be done because the equality operators (==, !=) have been overriden by this class.

The standard implementation is a simple XOR operation between all local member variables.

public GetHashCode ( ) : int
Результат int

GetMatrix3() публичный метод

Returns a 3x3 portion of this 4x4 matrix.
public GetMatrix3 ( ) : Axiom.Math.Matrix3
Результат Axiom.Math.Matrix3

Inverse() публичный метод

Returns an inverted matrix.
public Inverse ( ) : Matrix4
Результат Matrix4

InverseAffine() публичный метод

Returns an inverted affine matrix.
public InverseAffine ( ) : Matrix4
Результат Matrix4

MakeFloatArray() публичный метод

public MakeFloatArray ( float floats ) : void
floats float
Результат void

MakeRealArray() публичный метод

public MakeRealArray ( Real reals ) : void
reals Real
Результат void

Matrix4() публичный метод

Creates a new Matrix4 with all the specified parameters.
public Matrix4 ( Real m00, Real m01, Real m02, Real m03, Real m10, Real m11, Real m12, Real m13, Real m20, Real m21, Real m22, Real m23, Real m30, Real m31, Real m32, Real m33 ) : System
m00 Real
m01 Real
m02 Real
m03 Real
m10 Real
m11 Real
m12 Real
m13 Real
m20 Real
m21 Real
m22 Real
m23 Real
m30 Real
m31 Real
m32 Real
m33 Real
Результат System

Multiply() публичный статический метод

Used to multiply (concatenate) two 4x4 Matrices.
public static Multiply ( Matrix4 left, Matrix4 right ) : Matrix4
left Matrix4
right Matrix4
Результат Matrix4

Multiply() публичный статический метод

Transforms a plane using the specified transform.
public static Multiply ( Matrix4 matrix, Plane plane ) : Plane
matrix Matrix4 Transformation matrix.
plane Plane Plane to transform.
Результат Plane

Multiply() публичный статический метод

Transforms the given 3-D vector by the matrix, projecting the result back into w = 1.

This means that the initial w is considered to be 1.0, and then all the tree elements of the resulting 3-D vector are divided by the resulting w.

public static Multiply ( Matrix4 matrix, Vector3 vector ) : Vector3
matrix Matrix4 A Matrix4.
vector Vector3 A Vector3.
Результат Vector3

Subtract() публичный статический метод

Used to subtract two matrices.
public static Subtract ( Matrix4 left, Matrix4 right ) : Matrix4
left Matrix4
right Matrix4
Результат Matrix4

ToString() публичный метод

Overrides the Object.ToString() method to provide a text representation of a Matrix4.
public ToString ( ) : string
Результат string

TransformAffine() публичный метод

3-D Vector transformation specially for affine matrix.
Transforms the given 3-D vector by the matrix, projecting the result back into w = 1. The matrix must be an affine matrix. Matrix4.IsAffine.
public TransformAffine ( Vector3 v ) : Vector3
v Vector3
Результат Vector3

TransformAffine() публичный метод

4-D Vector transformation specially for affine matrix.
The matrix must be an affine matrix. Matrix4.IsAffine.
public TransformAffine ( Vector4 v ) : Vector4
v Vector4
Результат Vector4

Transpose() публичный метод

Swap the rows of the matrix with the columns.
public Transpose ( ) : Matrix4
Результат Matrix4

operator() публичный статический метод

Used to multiply (concatenate) two 4x4 Matrices.
public static operator ( ) : Matrix4
Результат Matrix4

operator() публичный статический метод

Used to multiply a transformation to a Plane.
public static operator ( ) : Plane
Результат Plane

operator() публичный статический метод

Transforms the given 3-D vector by the matrix, projecting the result back into w = 1.

This means that the initial w is considered to be 1.0, and then all the tree elements of the resulting 3-D vector are divided by the resulting w.

public static operator ( ) : Vector3
Результат Vector3

operator() публичный статический метод

Compares two Matrix4 instances for equality.
public static operator ( ) : bool
Результат bool

this() публичный метод

Allows the Matrix to be accessed linearly (m[0] -> m[15]).
This indexer is only provided as a convenience, and is not recommended for use in intensive applications.
public this ( int index ) : Real
index int
Результат Real

this() публичный метод

Allows the Matrix to be accessed like a 2d array (i.e. matrix[2,3])
This indexer is only provided as a convenience, and is not recommended for use in intensive applications.
public this ( int row, int col ) : Real
row int
col int
Результат Real

Описание свойств

m00 публичное свойство

public Real m00
Результат Real

m10 публичное свойство

public Real m10
Результат Real

m20 публичное свойство

public Real m20
Результат Real

m30 публичное свойство

public Real m30
Результат Real