C# Class BEPUutilities.Matrix3x3

3 row, 3 column matrix.
Afficher le fichier Open project: Indiefreaks/igf Class Usage Examples

Méthodes publiques

Свойство Type Description
M11 float
M12 float
M13 float
M21 float
M22 float
M23 float
M31 float
M32 float
M33 float

Méthodes publiques

Méthode Description
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.

Private Methods

Méthode Description
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.

Method Details

AdaptiveInvert() public static méthode

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.
Résultat void

Add() public static méthode

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.
Résultat void

Add() public static méthode

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.
Résultat void

Add() public static méthode

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.
Résultat void

Add() public static méthode

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.
Résultat void

CreateCrossProduct() public static méthode

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.
Résultat void

CreateFromAxisAngle() public static méthode

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.
Résultat Matrix3x3

CreateFromAxisAngle() public static méthode

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.
Résultat void

CreateFromMatrix() public static méthode

Creates a 3x3 matrix from an XNA 4x4 matrix.
public static CreateFromMatrix ( Matrix matrix4X4 ) : Matrix3x3
matrix4X4 Matrix Matrix to extract a 3x3 matrix from.
Résultat Matrix3x3

CreateFromMatrix() public static méthode

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.
Résultat void

CreateFromQuaternion() public static méthode

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.
Résultat Matrix3x3

CreateFromQuaternion() public static méthode

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.
Résultat void

CreateOuterProduct() public static méthode

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.
Résultat void

CreateQuaternion() public static méthode

Constructs a quaternion from a 3x3 rotation matrix.
public static CreateQuaternion ( Matrix3x3 r ) : Quaternion
r Matrix3x3 Rotation matrix to create the quaternion from.
Résultat Quaternion

CreateQuaternion() public static méthode

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.
Résultat void

CreateScale() public static méthode

Constructs a non-uniform scaling matrix.
public static CreateScale ( System.Vector3 &scale ) : Matrix3x3
scale System.Vector3 Values defining the axis scales.
Résultat Matrix3x3

CreateScale() public static méthode

Constructs a uniform scaling matrix.
public static CreateScale ( float scale ) : Matrix3x3
scale float Value to use in the diagonal.
Résultat Matrix3x3

CreateScale() public static méthode

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.
Résultat Matrix3x3

CreateScale() public static méthode

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.
Résultat void

CreateScale() public static méthode

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.
Résultat void

CreateScale() public static méthode

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.
Résultat void

Determinant() public méthode

Calculates the determinant of the matrix.
public Determinant ( ) : float
Résultat float

Invert() public static méthode

Inverts the given matix.
public static Invert ( Matrix3x3 &matrix, Matrix3x3 &result ) : void
matrix Matrix3x3 Matrix to be inverted.
result Matrix3x3 Inverted matrix.
Résultat void

Matrix3x3() public méthode

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.
Résultat System

Multiply() public static méthode

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.
Résultat void

Multiply() public static méthode

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.
Résultat void

Multiply() public static méthode

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.
Résultat void

Multiply() public static méthode

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.
Résultat void

MultiplyByTransposed() public static méthode

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.
Résultat void

MultiplyTransposed() public static méthode

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.
Résultat void

Negate() public static méthode

Negates every element in the matrix.
public static Negate ( Matrix3x3 &matrix, Matrix3x3 &result ) : void
matrix Matrix3x3 Matrix to negate.
result Matrix3x3 Negated matrix.
Résultat void

Subtract() public static méthode

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.
Résultat void

ToMatrix4X4() public static méthode

Creates a 4x4 matrix from a 3x3 matrix.
public static ToMatrix4X4 ( Matrix3x3 a ) : Matrix
a Matrix3x3 3x3 matrix.
Résultat Matrix

ToMatrix4X4() public static méthode

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.
Résultat void

ToString() public méthode

Creates a string representation of the matrix.
public ToString ( ) : string
Résultat string

Transform() public static méthode

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.
Résultat System.Vector3

Transform() public static méthode

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.
Résultat void

Transform() public static méthode

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.
Résultat void

TransformTranspose() public static méthode

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.
Résultat System.Vector3

TransformTranspose() public static méthode

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.
Résultat void

TransformTranspose() public static méthode

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.
Résultat void

Transpose() public static méthode

Computes the transposed matrix of a matrix.
public static Transpose ( Matrix &matrix, Matrix3x3 &result ) : void
matrix Matrix Matrix to transpose.
result Matrix3x3 Transposed matrix.
Résultat void

Transpose() public static méthode

Computes the transposed matrix of a matrix.
public static Transpose ( Matrix3x3 &matrix, Matrix3x3 &result ) : void
matrix Matrix3x3 Matrix to transpose.
result Matrix3x3 Transposed matrix.
Résultat void

operator() public static méthode

Multiplies the two matrices.
public static operator ( ) : Matrix3x3
Résultat Matrix3x3

Property Details

M11 public_oe property

Value at row 1, column 1 of the matrix.
public float M11
Résultat float

M12 public_oe property

Value at row 1, column 2 of the matrix.
public float M12
Résultat float

M13 public_oe property

Value at row 1, column 3 of the matrix.
public float M13
Résultat float

M21 public_oe property

Value at row 2, column 1 of the matrix.
public float M21
Résultat float

M22 public_oe property

Value at row 2, column 2 of the matrix.
public float M22
Résultat float

M23 public_oe property

Value at row 2, column 3 of the matrix.
public float M23
Résultat float

M31 public_oe property

Value at row 3, column 1 of the matrix.
public float M31
Résultat float

M32 public_oe property

Value at row 3, column 2 of the matrix.
public float M32
Résultat float

M33 public_oe property

Value at row 3, column 3 of the matrix.
public float M33
Résultat float