C# Класс BEPUutilities.Matrix3x3

3 row, 3 column matrix.
Показать файл Открыть проект Примеры использования класса

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

Свойство Тип Описание
M11 float
M12 float
M13 float
M21 float
M22 float
M23 float
M31 float
M32 float
M33 float

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

Метод Описание
AdaptiveInvert ( Matrix3x3 &matrix, Matrix3x3 &result ) : void

Inverts the largest nonsingular submatrix in the matrix, excluding 2x2's that involve M13 or M31, and excluding 1x1's that include nondiagonal elements.

Add ( Matrix &a, Matrix &b, Matrix3x3 &result ) : void

Adds the two matrices together on a per-element basis.

Add ( Matrix &a, Matrix3x3 &b, Matrix3x3 &result ) : void

Adds the two matrices together on a per-element basis.

Add ( Matrix3x3 &a, Matrix &b, Matrix3x3 &result ) : void

Adds the two matrices together on a per-element basis.

Add ( Matrix3x3 &a, Matrix3x3 &b, Matrix3x3 &result ) : void

Adds the two matrices together on a per-element basis.

CreateCrossProduct ( System.Vector3 &v, Matrix3x3 &result ) : void

Creates a skew symmetric matrix M from vector A such that M * B for some other vector B is equivalent to the cross product of A and B.

CreateFromAxisAngle ( System.Vector3 axis, float angle ) : Matrix3x3

Creates a matrix representing a rotation of a given angle around a given axis.

CreateFromAxisAngle ( System.Vector3 &axis, float angle, Matrix3x3 &result ) : void

Creates a matrix representing a rotation of a given angle around a given axis.

CreateFromMatrix ( Matrix matrix4X4 ) : Matrix3x3

Creates a 3x3 matrix from an XNA 4x4 matrix.

CreateFromMatrix ( Matrix &matrix4X4, Matrix3x3 &matrix3X3 ) : void

Creates a 3x3 matrix from an XNA 4x4 matrix.

CreateFromQuaternion ( Quaternion quaternion ) : Matrix3x3

Creates a 3x3 matrix representing the orientation stored in the quaternion.

CreateFromQuaternion ( Quaternion &quaternion, Matrix3x3 &result ) : void

Creates a 3x3 matrix representing the orientation stored in the quaternion.

CreateOuterProduct ( System.Vector3 &a, System.Vector3 &b, Matrix3x3 &result ) : void

Computes the outer product of the given vectors.

CreateQuaternion ( Matrix3x3 r ) : Quaternion

Constructs a quaternion from a 3x3 rotation matrix.

CreateQuaternion ( Matrix3x3 &r, Quaternion &q ) : void

Constructs a quaternion from a 3x3 rotation matrix.

CreateScale ( System.Vector3 &scale ) : Matrix3x3

Constructs a non-uniform scaling matrix.

CreateScale ( float scale ) : Matrix3x3

Constructs a uniform scaling matrix.

CreateScale ( float x, float y, float z ) : Matrix3x3

Constructs a non-uniform scaling matrix.

CreateScale ( System.Vector3 &scale, Matrix3x3 &matrix ) : void

Constructs a non-uniform scaling matrix.

CreateScale ( float scale, Matrix3x3 &matrix ) : void

Constructs a uniform scaling matrix.

CreateScale ( float x, float y, float z, Matrix3x3 &matrix ) : void

Constructs a non-uniform scaling matrix.

Determinant ( ) : float

Calculates the determinant of the matrix.

Invert ( Matrix3x3 &matrix, Matrix3x3 &result ) : void

Inverts the given matix.

Matrix3x3 ( float m11, float m12, float m13, float m21, float m22, float m23, float m31, float m32, float m33 ) : System

Constructs a new 3 row, 3 column matrix.

Multiply ( Matrix &a, Matrix3x3 &b, Matrix3x3 &result ) : void

Multiplies the two matrices.

Multiply ( Matrix3x3 &a, Matrix &b, Matrix3x3 &result ) : void

Multiplies the two matrices.

Multiply ( Matrix3x3 &a, Matrix3x3 &b, Matrix3x3 &result ) : void

Multiplies the two matrices.

Multiply ( Matrix3x3 &matrix, float scale, Matrix3x3 &result ) : void

Scales all components of the matrix.

MultiplyByTransposed ( Matrix3x3 &matrix, Matrix3x3 &transpose, Matrix3x3 &result ) : void

Multiplies a matrix with a transposed matrix.

MultiplyTransposed ( Matrix3x3 &transpose, Matrix3x3 &matrix, Matrix3x3 &result ) : void

Multiplies a transposed matrix with another matrix.

Negate ( Matrix3x3 &matrix, Matrix3x3 &result ) : void

Negates every element in the matrix.

Subtract ( Matrix3x3 &a, Matrix3x3 &b, Matrix3x3 &result ) : void

Subtracts the two matrices from each other on a per-element basis.

ToMatrix4X4 ( Matrix3x3 a ) : Matrix

Creates a 4x4 matrix from a 3x3 matrix.

ToMatrix4X4 ( Matrix3x3 &a, Matrix &b ) : void

Creates a 4x4 matrix from a 3x3 matrix.

ToString ( ) : string

Creates a string representation of the matrix.

Transform ( System.Vector3 v, Matrix3x3 matrix ) : System.Vector3

Transforms the vector by the matrix.

Transform ( System.Vector3 &v, Matrix &matrix, System.Vector3 &result ) : void

Transforms the vector by the matrix.

Transform ( System.Vector3 &v, Matrix3x3 &matrix, System.Vector3 &result ) : void

Transforms the vector by the matrix.

TransformTranspose ( System.Vector3 v, Matrix3x3 matrix ) : System.Vector3

Transforms the vector by the matrix's transpose.

TransformTranspose ( System.Vector3 &v, Matrix &matrix, System.Vector3 &result ) : void

Transforms the vector by the matrix's transpose.

TransformTranspose ( System.Vector3 &v, Matrix3x3 &matrix, System.Vector3 &result ) : void

Transforms the vector by the matrix's transpose.

Transpose ( Matrix &matrix, Matrix3x3 &result ) : void

Computes the transposed matrix of a matrix.

Transpose ( Matrix3x3 &matrix, Matrix3x3 &result ) : void

Computes the transposed matrix of a matrix.

operator ( ) : Matrix3x3

Multiplies the two matrices.

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

Метод Описание
AdaptiveDeterminant ( int &subMatrixCode ) : float

Calculates the determinant of largest nonsingular submatrix, excluding 2x2's that involve M13 or M31, and excluding all 1x1's that involve nondiagonal elements.

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

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

Inverts the largest nonsingular submatrix in the matrix, excluding 2x2's that involve M13 or M31, and excluding 1x1's that include nondiagonal elements.
public static AdaptiveInvert ( Matrix3x3 &matrix, Matrix3x3 &result ) : void
matrix Matrix3x3 Matrix to be inverted.
result Matrix3x3 Inverted matrix.
Результат void

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

Adds the two matrices together on a per-element basis.
public static Add ( Matrix &a, Matrix &b, Matrix3x3 &result ) : void
a Matrix First matrix to add.
b Matrix Second matrix to add.
result Matrix3x3 Sum of the two matrices.
Результат void

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

Adds the two matrices together on a per-element basis.
public static Add ( Matrix &a, Matrix3x3 &b, Matrix3x3 &result ) : void
a Matrix First matrix to add.
b Matrix3x3 Second matrix to add.
result Matrix3x3 Sum of the two matrices.
Результат void

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

Adds the two matrices together on a per-element basis.
public static Add ( Matrix3x3 &a, Matrix &b, Matrix3x3 &result ) : void
a Matrix3x3 First matrix to add.
b Matrix Second matrix to add.
result Matrix3x3 Sum of the two matrices.
Результат void

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

Adds the two matrices together on a per-element basis.
public static Add ( Matrix3x3 &a, Matrix3x3 &b, Matrix3x3 &result ) : void
a Matrix3x3 First matrix to add.
b Matrix3x3 Second matrix to add.
result Matrix3x3 Sum of the two matrices.
Результат void

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

Creates a skew symmetric matrix M from vector A such that M * B for some other vector B is equivalent to the cross product of A and B.
public static CreateCrossProduct ( System.Vector3 &v, Matrix3x3 &result ) : void
v System.Vector3 Vector to base the matrix on.
result Matrix3x3 Skew-symmetric matrix result.
Результат void

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

Creates a matrix representing a rotation of a given angle around a given axis.
public static CreateFromAxisAngle ( System.Vector3 axis, float angle ) : Matrix3x3
axis System.Vector3 Axis around which to rotate.
angle float Amount to rotate.
Результат Matrix3x3

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

Creates a matrix representing a rotation of a given angle around a given axis.
public static CreateFromAxisAngle ( System.Vector3 &axis, float angle, Matrix3x3 &result ) : void
axis System.Vector3 Axis around which to rotate.
angle float Amount to rotate.
result Matrix3x3 Matrix representing the rotation.
Результат void

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

Creates a 3x3 matrix from an XNA 4x4 matrix.
public static CreateFromMatrix ( Matrix matrix4X4 ) : Matrix3x3
matrix4X4 Matrix Matrix to extract a 3x3 matrix from.
Результат Matrix3x3

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

Creates a 3x3 matrix from an XNA 4x4 matrix.
public static CreateFromMatrix ( Matrix &matrix4X4, Matrix3x3 &matrix3X3 ) : void
matrix4X4 Matrix Matrix to extract a 3x3 matrix from.
matrix3X3 Matrix3x3 Upper 3x3 matrix extracted from the XNA matrix.
Результат void

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

Creates a 3x3 matrix representing the orientation stored in the quaternion.
public static CreateFromQuaternion ( Quaternion quaternion ) : Matrix3x3
quaternion Quaternion Quaternion to use to create a matrix.
Результат Matrix3x3

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

Creates a 3x3 matrix representing the orientation stored in the quaternion.
public static CreateFromQuaternion ( Quaternion &quaternion, Matrix3x3 &result ) : void
quaternion Quaternion Quaternion to use to create a matrix.
result Matrix3x3 Matrix representing the quaternion's orientation.
Результат void

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

Computes the outer product of the given vectors.
public static CreateOuterProduct ( System.Vector3 &a, System.Vector3 &b, Matrix3x3 &result ) : void
a System.Vector3 First vector.
b System.Vector3 Second vector.
result Matrix3x3 Outer product result.
Результат void

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

Constructs a quaternion from a 3x3 rotation matrix.
public static CreateQuaternion ( Matrix3x3 r ) : Quaternion
r Matrix3x3 Rotation matrix to create the quaternion from.
Результат Quaternion

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

Constructs a quaternion from a 3x3 rotation matrix.
public static CreateQuaternion ( Matrix3x3 &r, Quaternion &q ) : void
r Matrix3x3 Rotation matrix to create the quaternion from.
q Quaternion Quaternion based on the rotation matrix.
Результат void

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

Constructs a non-uniform scaling matrix.
public static CreateScale ( System.Vector3 &scale ) : Matrix3x3
scale System.Vector3 Values defining the axis scales.
Результат Matrix3x3

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

Constructs a uniform scaling matrix.
public static CreateScale ( float scale ) : Matrix3x3
scale float Value to use in the diagonal.
Результат Matrix3x3

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

Constructs a non-uniform scaling matrix.
public static CreateScale ( float x, float y, float z ) : Matrix3x3
x float Scaling along the x axis.
y float Scaling along the y axis.
z float Scaling along the z axis.
Результат Matrix3x3

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

Constructs a non-uniform scaling matrix.
public static CreateScale ( System.Vector3 &scale, Matrix3x3 &matrix ) : void
scale System.Vector3 Values defining the axis scales.
matrix Matrix3x3 Scaling matrix.
Результат void

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

Constructs a uniform scaling matrix.
public static CreateScale ( float scale, Matrix3x3 &matrix ) : void
scale float Value to use in the diagonal.
matrix Matrix3x3 Scaling matrix.
Результат void

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

Constructs a non-uniform scaling matrix.
public static CreateScale ( float x, float y, float z, Matrix3x3 &matrix ) : void
x float Scaling along the x axis.
y float Scaling along the y axis.
z float Scaling along the z axis.
matrix Matrix3x3 Scaling matrix.
Результат void

Determinant() публичный Метод

Calculates the determinant of the matrix.
public Determinant ( ) : float
Результат float

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

Inverts the given matix.
public static Invert ( Matrix3x3 &matrix, Matrix3x3 &result ) : void
matrix Matrix3x3 Matrix to be inverted.
result Matrix3x3 Inverted matrix.
Результат void

Matrix3x3() публичный Метод

Constructs a new 3 row, 3 column matrix.
public Matrix3x3 ( float m11, float m12, float m13, float m21, float m22, float m23, float m31, float m32, float m33 ) : System
m11 float Value at row 1, column 1 of the matrix.
m12 float Value at row 1, column 2 of the matrix.
m13 float Value at row 1, column 3 of the matrix.
m21 float Value at row 2, column 1 of the matrix.
m22 float Value at row 2, column 2 of the matrix.
m23 float Value at row 2, column 3 of the matrix.
m31 float Value at row 3, column 1 of the matrix.
m32 float Value at row 3, column 2 of the matrix.
m33 float Value at row 3, column 3 of the matrix.
Результат System

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

Multiplies the two matrices.
public static Multiply ( Matrix &a, Matrix3x3 &b, Matrix3x3 &result ) : void
a Matrix First matrix to multiply.
b Matrix3x3 Second matrix to multiply.
result Matrix3x3 Product of the multiplication.
Результат void

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

Multiplies the two matrices.
public static Multiply ( Matrix3x3 &a, Matrix &b, Matrix3x3 &result ) : void
a Matrix3x3 First matrix to multiply.
b Matrix Second matrix to multiply.
result Matrix3x3 Product of the multiplication.
Результат void

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

Multiplies the two matrices.
public static Multiply ( Matrix3x3 &a, Matrix3x3 &b, Matrix3x3 &result ) : void
a Matrix3x3 First matrix to multiply.
b Matrix3x3 Second matrix to multiply.
result Matrix3x3 Product of the multiplication.
Результат void

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

Scales all components of the matrix.
public static Multiply ( Matrix3x3 &matrix, float scale, Matrix3x3 &result ) : void
matrix Matrix3x3 Matrix to scale.
scale float Amount to scale.
result Matrix3x3 Scaled matrix.
Результат void

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

Multiplies a matrix with a transposed matrix.
public static MultiplyByTransposed ( Matrix3x3 &matrix, Matrix3x3 &transpose, Matrix3x3 &result ) : void
matrix Matrix3x3 Matrix to be multiplied.
transpose Matrix3x3 Matrix to be transposed and multiplied.
result Matrix3x3 Product of the multiplication.
Результат void

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

Multiplies a transposed matrix with another matrix.
public static MultiplyTransposed ( Matrix3x3 &transpose, Matrix3x3 &matrix, Matrix3x3 &result ) : void
transpose Matrix3x3 Matrix to be transposed and multiplied.
matrix Matrix3x3 Matrix to be multiplied.
result Matrix3x3 Product of the multiplication.
Результат void

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

Negates every element in the matrix.
public static Negate ( Matrix3x3 &matrix, Matrix3x3 &result ) : void
matrix Matrix3x3 Matrix to negate.
result Matrix3x3 Negated matrix.
Результат void

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

Subtracts the two matrices from each other on a per-element basis.
public static Subtract ( Matrix3x3 &a, Matrix3x3 &b, Matrix3x3 &result ) : void
a Matrix3x3 First matrix to subtract.
b Matrix3x3 Second matrix to subtract.
result Matrix3x3 Difference of the two matrices.
Результат void

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

Creates a 4x4 matrix from a 3x3 matrix.
public static ToMatrix4X4 ( Matrix3x3 a ) : Matrix
a Matrix3x3 3x3 matrix.
Результат Matrix

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

Creates a 4x4 matrix from a 3x3 matrix.
public static ToMatrix4X4 ( Matrix3x3 &a, Matrix &b ) : void
a Matrix3x3 3x3 matrix.
b Matrix Created 4x4 matrix.
Результат void

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

Creates a string representation of the matrix.
public ToString ( ) : string
Результат string

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

Transforms the vector by the matrix.
public static Transform ( System.Vector3 v, Matrix3x3 matrix ) : System.Vector3
v System.Vector3 Vector3 to transform.
matrix Matrix3x3 Matrix to use as the transformation.
Результат System.Vector3

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

Transforms the vector by the matrix.
public static Transform ( System.Vector3 &v, Matrix &matrix, System.Vector3 &result ) : void
v System.Vector3 Vector3 to transform.
matrix Matrix Matrix to use as the transformation.
result System.Vector3 Product of the transformation.
Результат void

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

Transforms the vector by the matrix.
public static Transform ( System.Vector3 &v, Matrix3x3 &matrix, System.Vector3 &result ) : void
v System.Vector3 Vector3 to transform.
matrix Matrix3x3 Matrix to use as the transformation.
result System.Vector3 Product of the transformation.
Результат void

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

Transforms the vector by the matrix's transpose.
public static TransformTranspose ( System.Vector3 v, Matrix3x3 matrix ) : System.Vector3
v System.Vector3 Vector3 to transform.
matrix Matrix3x3 Matrix to use as the transformation transpose.
Результат System.Vector3

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

Transforms the vector by the matrix's transpose.
public static TransformTranspose ( System.Vector3 &v, Matrix &matrix, System.Vector3 &result ) : void
v System.Vector3 Vector3 to transform.
matrix Matrix Matrix to use as the transformation transpose.
result System.Vector3 Product of the transformation.
Результат void

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

Transforms the vector by the matrix's transpose.
public static TransformTranspose ( System.Vector3 &v, Matrix3x3 &matrix, System.Vector3 &result ) : void
v System.Vector3 Vector3 to transform.
matrix Matrix3x3 Matrix to use as the transformation transpose.
result System.Vector3 Product of the transformation.
Результат void

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

Computes the transposed matrix of a matrix.
public static Transpose ( Matrix &matrix, Matrix3x3 &result ) : void
matrix Matrix Matrix to transpose.
result Matrix3x3 Transposed matrix.
Результат void

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

Computes the transposed matrix of a matrix.
public static Transpose ( Matrix3x3 &matrix, Matrix3x3 &result ) : void
matrix Matrix3x3 Matrix to transpose.
result Matrix3x3 Transposed matrix.
Результат void

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

Multiplies the two matrices.
public static operator ( ) : Matrix3x3
Результат Matrix3x3

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

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

Value at row 1, column 1 of the matrix.
public float M11
Результат float

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

Value at row 1, column 2 of the matrix.
public float M12
Результат float

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

Value at row 1, column 3 of the matrix.
public float M13
Результат float

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

Value at row 2, column 1 of the matrix.
public float M21
Результат float

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

Value at row 2, column 2 of the matrix.
public float M22
Результат float

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

Value at row 2, column 3 of the matrix.
public float M23
Результат float

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

Value at row 3, column 1 of the matrix.
public float M31
Результат float

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

Value at row 3, column 2 of the matrix.
public float M32
Результат float

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

Value at row 3, column 3 of the matrix.
public float M33
Результат float