Matrix

struct Matrix : System.ValueType, System.IEquatable<Matrix>

Represents the right-handed 4x4 floating point matrix, which can store translation, scale and rotation information.

float M11

A first row and first column value.

float M12

A first row and second column value.

float M13

A first row and third column value.

float M14

A first row and fourth column value.

float M21

A second row and first column value.

float M22

A second row and second column value.

float M23

A second row and third column value.

float M24

A second row and fourth column value.

float M31

A third row and first column value.

float M32

A third row and second column value.

float M33

A third row and third column value.

float M34

A third row and fourth column value.

float M41

A fourth row and first column value.

float M42

A fourth row and second column value.

float M43

A fourth row and third column value.

float M44

A fourth row and fourth column value.

float Item
float Item
Vector3 Backward

The backward vector formed from the third row M31, M32, M33 elements.

Vector3 Down

The down vector formed from the second row -M21, -M22, -M23 elements.

Vector3 Forward

The forward vector formed from the third row -M31, -M32, -M33 elements.

readonly Matrix Identity

Returns the identity matrix.

Vector3 Left

The left vector formed from the first row -M11, -M12, -M13 elements.

Vector3 Right

The right vector formed from the first row M11, M12, M13 elements.

Vector3 Translation

Position stored in this matrix.

Vector3 Up

The upper vector formed from the second row M21, M22, M23 elements.

Matrix Add(Matrix matrix1, Matrix matrix2)

Creates a new T:Microsoft.Xna.Framework.Matrix which contains sum of two matrixes.

Parameters:
  • matrix1 (Microsoft.Xna.Framework.Matrix) – The first matrix to add.
  • matrix2 (Microsoft.Xna.Framework.Matrix) – The second matrix to add.
Returns:

The result of the matrix addition.

void Add(ref Matrix matrix1, ref Matrix matrix2, ref Matrix result)
Parameters:
  • (ref) matrix1 (Microsoft.Xna.Framework.Matrix) –
  • (ref) matrix2 (Microsoft.Xna.Framework.Matrix) –
  • (ref) result (Microsoft.Xna.Framework.Matrix) –
Matrix CreateBillboard(Vector3 objectPosition, Vector3 cameraPosition, Vector3 cameraUpVector, System.Nullable<Vector3> cameraForwardVector)

Creates a new T:Microsoft.Xna.Framework.Matrix for spherical billboarding that rotates around specified object position.

Parameters:
  • objectPosition (Microsoft.Xna.Framework.Vector3) – Position of billboard object. It will rotate around that vector.
  • cameraPosition (Microsoft.Xna.Framework.Vector3) – The camera position.
  • cameraUpVector (Microsoft.Xna.Framework.Vector3) – The camera up vector.
  • cameraForwardVector (System.Nullable<Vector3>) – Optional camera forward vector.
Returns:

The T:Microsoft.Xna.Framework.Matrix for spherical billboarding.

void CreateBillboard(ref Vector3 objectPosition, ref Vector3 cameraPosition, ref Vector3 cameraUpVector, System.Nullable<Vector3> cameraForwardVector, ref Matrix result)
Parameters:
  • (ref) objectPosition (Microsoft.Xna.Framework.Vector3) –
  • (ref) cameraPosition (Microsoft.Xna.Framework.Vector3) –
  • (ref) cameraUpVector (Microsoft.Xna.Framework.Vector3) –
  • cameraForwardVector (System.Nullable<Vector3>) –
  • (ref) result (Microsoft.Xna.Framework.Matrix) –
Matrix CreateConstrainedBillboard(Vector3 objectPosition, Vector3 cameraPosition, Vector3 rotateAxis, System.Nullable<Vector3> cameraForwardVector, System.Nullable<Vector3> objectForwardVector)

Creates a new T:Microsoft.Xna.Framework.Matrix for cylindrical billboarding that rotates around specified axis.

Parameters:
  • objectPosition (Microsoft.Xna.Framework.Vector3) – Object position the billboard will rotate around.
  • cameraPosition (Microsoft.Xna.Framework.Vector3) – Camera position.
  • rotateAxis (Microsoft.Xna.Framework.Vector3) – Axis of billboard for rotation.
  • cameraForwardVector (System.Nullable<Vector3>) – Optional camera forward vector.
  • objectForwardVector (System.Nullable<Vector3>) – Optional object forward vector.
Returns:

The T:Microsoft.Xna.Framework.Matrix for cylindrical billboarding.

void CreateConstrainedBillboard(ref Vector3 objectPosition, ref Vector3 cameraPosition, ref Vector3 rotateAxis, System.Nullable<Vector3> cameraForwardVector, System.Nullable<Vector3> objectForwardVector, ref Matrix result)
Parameters:
  • (ref) objectPosition (Microsoft.Xna.Framework.Vector3) –
  • (ref) cameraPosition (Microsoft.Xna.Framework.Vector3) –
  • (ref) rotateAxis (Microsoft.Xna.Framework.Vector3) –
  • cameraForwardVector (System.Nullable<Vector3>) –
  • objectForwardVector (System.Nullable<Vector3>) –
  • (ref) result (Microsoft.Xna.Framework.Matrix) –
Matrix CreateFromAxisAngle(Vector3 axis, float angle)

Creates a new T:Microsoft.Xna.Framework.Matrix which contains the rotation moment around specified axis.

Parameters:
  • axis (Microsoft.Xna.Framework.Vector3) – The axis of rotation.
  • angle (float) – The angle of rotation in radians.
Returns:

The rotation T:Microsoft.Xna.Framework.Matrix.

void CreateFromAxisAngle(ref Vector3 axis, float angle, ref Matrix result)
Parameters:
  • (ref) axis (Microsoft.Xna.Framework.Vector3) –
  • angle (float) –
  • (ref) result (Microsoft.Xna.Framework.Matrix) –
Matrix CreateFromQuaternion(Quaternion quaternion)

Creates a new rotation T:Microsoft.Xna.Framework.Matrix from a T:Microsoft.Xna.Framework.Quaternion.

Parameters:
  • quaternion (Microsoft.Xna.Framework.Quaternion) – T:Microsoft.Xna.Framework.Quaternion of rotation moment.
Returns:

The rotation T:Microsoft.Xna.Framework.Matrix.

void CreateFromQuaternion(ref Quaternion quaternion, ref Matrix result)
Parameters:
  • (ref) quaternion (Microsoft.Xna.Framework.Quaternion) –
  • (ref) result (Microsoft.Xna.Framework.Matrix) –
Matrix CreateFromYawPitchRoll(float yaw, float pitch, float roll)

Creates a new rotation T:Microsoft.Xna.Framework.Matrix from the specified yaw, pitch and roll values.

Parameters:
  • yaw (float) – The yaw rotation value in radians.
  • pitch (float) – The pitch rotation value in radians.
  • roll (float) – The roll rotation value in radians.
Returns:

The rotation T:Microsoft.Xna.Framework.Matrix.

void CreateFromYawPitchRoll(float yaw, float pitch, float roll, ref Matrix result)
Parameters:
  • yaw (float) –
  • pitch (float) –
  • roll (float) –
  • (ref) result (Microsoft.Xna.Framework.Matrix) –
Matrix CreateLookAt(Vector3 cameraPosition, Vector3 cameraTarget, Vector3 cameraUpVector)

Creates a new viewing T:Microsoft.Xna.Framework.Matrix.

Parameters:
  • cameraPosition (Microsoft.Xna.Framework.Vector3) – Position of the camera.
  • cameraTarget (Microsoft.Xna.Framework.Vector3) – Lookup vector of the camera.
  • cameraUpVector (Microsoft.Xna.Framework.Vector3) – The direction of the upper edge of the camera.
Returns:

The viewing T:Microsoft.Xna.Framework.Matrix.

void CreateLookAt(ref Vector3 cameraPosition, ref Vector3 cameraTarget, ref Vector3 cameraUpVector, ref Matrix result)
Parameters:
  • (ref) cameraPosition (Microsoft.Xna.Framework.Vector3) –
  • (ref) cameraTarget (Microsoft.Xna.Framework.Vector3) –
  • (ref) cameraUpVector (Microsoft.Xna.Framework.Vector3) –
  • (ref) result (Microsoft.Xna.Framework.Matrix) –
Matrix CreateOrthographic(float width, float height, float zNearPlane, float zFarPlane)

Creates a new projection T:Microsoft.Xna.Framework.Matrix for orthographic view.

Parameters:
  • width (float) – Width of the viewing volume.
  • height (float) – Height of the viewing volume.
  • zNearPlane (float) – Depth of the near plane.
  • zFarPlane (float) – Depth of the far plane.
Returns:

The new projection T:Microsoft.Xna.Framework.Matrix for orthographic view.

void CreateOrthographic(float width, float height, float zNearPlane, float zFarPlane, ref Matrix result)
Parameters:
  • width (float) –
  • height (float) –
  • zNearPlane (float) –
  • zFarPlane (float) –
  • (ref) result (Microsoft.Xna.Framework.Matrix) –
Matrix CreateOrthographicOffCenter(float left, float right, float bottom, float top, float zNearPlane, float zFarPlane)

Creates a new projection T:Microsoft.Xna.Framework.Matrix for customized orthographic view.

Parameters:
  • left (float) – Lower x-value at the near plane.
  • right (float) – Upper x-value at the near plane.
  • bottom (float) – Lower y-coordinate at the near plane.
  • top (float) – Upper y-value at the near plane.
  • zNearPlane (float) – Depth of the near plane.
  • zFarPlane (float) – Depth of the far plane.
Returns:

The new projection T:Microsoft.Xna.Framework.Matrix for customized orthographic view.

Matrix CreateOrthographicOffCenter(Rectangle viewingVolume, float zNearPlane, float zFarPlane)

Creates a new projection T:Microsoft.Xna.Framework.Matrix for customized orthographic view.

Parameters:
  • viewingVolume (Microsoft.Xna.Framework.Rectangle) – The viewing volume.
  • zNearPlane (float) – Depth of the near plane.
  • zFarPlane (float) – Depth of the far plane.
Returns:

The new projection T:Microsoft.Xna.Framework.Matrix for customized orthographic view.

void CreateOrthographicOffCenter(float left, float right, float bottom, float top, float zNearPlane, float zFarPlane, ref Matrix result)
Parameters:
  • left (float) –
  • right (float) –
  • bottom (float) –
  • top (float) –
  • zNearPlane (float) –
  • zFarPlane (float) –
  • (ref) result (Microsoft.Xna.Framework.Matrix) –
Matrix CreatePerspective(float width, float height, float nearPlaneDistance, float farPlaneDistance)

Creates a new projection T:Microsoft.Xna.Framework.Matrix for perspective view.

Parameters:
  • width (float) – Width of the viewing volume.
  • height (float) – Height of the viewing volume.
  • nearPlaneDistance (float) – Distance to the near plane.
  • farPlaneDistance (float) – Distance to the far plane.
Returns:

The new projection T:Microsoft.Xna.Framework.Matrix for perspective view.

void CreatePerspective(float width, float height, float nearPlaneDistance, float farPlaneDistance, ref Matrix result)
Parameters:
  • width (float) –
  • height (float) –
  • nearPlaneDistance (float) –
  • farPlaneDistance (float) –
  • (ref) result (Microsoft.Xna.Framework.Matrix) –
Matrix CreatePerspectiveFieldOfView(float fieldOfView, float aspectRatio, float nearPlaneDistance, float farPlaneDistance)

Creates a new projection T:Microsoft.Xna.Framework.Matrix for perspective view with field of view.

Parameters:
  • fieldOfView (float) – Field of view in the y direction in radians.
  • aspectRatio (float) – Width divided by height of the viewing volume.
  • nearPlaneDistance (float) – Distance to the near plane.
  • farPlaneDistance (float) – Distance to the far plane.
Returns:

The new projection T:Microsoft.Xna.Framework.Matrix for perspective view with FOV.

void CreatePerspectiveFieldOfView(float fieldOfView, float aspectRatio, float nearPlaneDistance, float farPlaneDistance, ref Matrix result)
Parameters:
  • fieldOfView (float) –
  • aspectRatio (float) –
  • nearPlaneDistance (float) –
  • farPlaneDistance (float) –
  • (ref) result (Microsoft.Xna.Framework.Matrix) –
Matrix CreatePerspectiveOffCenter(float left, float right, float bottom, float top, float nearPlaneDistance, float farPlaneDistance)

Creates a new projection T:Microsoft.Xna.Framework.Matrix for customized perspective view.

Parameters:
  • left (float) – Lower x-value at the near plane.
  • right (float) – Upper x-value at the near plane.
  • bottom (float) – Lower y-coordinate at the near plane.
  • top (float) – Upper y-value at the near plane.
  • nearPlaneDistance (float) – Distance to the near plane.
  • farPlaneDistance (float) – Distance to the far plane.
Returns:

The new T:Microsoft.Xna.Framework.Matrix for customized perspective view.

Matrix CreatePerspectiveOffCenter(Rectangle viewingVolume, float nearPlaneDistance, float farPlaneDistance)

Creates a new projection T:Microsoft.Xna.Framework.Matrix for customized perspective view.

Parameters:
  • viewingVolume (Microsoft.Xna.Framework.Rectangle) – The viewing volume.
  • nearPlaneDistance (float) – Distance to the near plane.
  • farPlaneDistance (float) – Distance to the far plane.
Returns:

The new T:Microsoft.Xna.Framework.Matrix for customized perspective view.

void CreatePerspectiveOffCenter(float left, float right, float bottom, float top, float nearPlaneDistance, float farPlaneDistance, ref Matrix result)
Parameters:
  • left (float) –
  • right (float) –
  • bottom (float) –
  • top (float) –
  • nearPlaneDistance (float) –
  • farPlaneDistance (float) –
  • (ref) result (Microsoft.Xna.Framework.Matrix) –
Matrix CreateRotationX(float radians)

Creates a new rotation T:Microsoft.Xna.Framework.Matrix around X axis.

Parameters:
  • radians (float) – Angle in radians.
Returns:

The rotation T:Microsoft.Xna.Framework.Matrix around X axis.

void CreateRotationX(float radians, ref Matrix result)
Parameters:
  • radians (float) –
  • (ref) result (Microsoft.Xna.Framework.Matrix) –
Matrix CreateRotationY(float radians)

Creates a new rotation T:Microsoft.Xna.Framework.Matrix around Y axis.

Parameters:
  • radians (float) – Angle in radians.
Returns:

The rotation T:Microsoft.Xna.Framework.Matrix around Y axis.

void CreateRotationY(float radians, ref Matrix result)
Parameters:
  • radians (float) –
  • (ref) result (Microsoft.Xna.Framework.Matrix) –
Matrix CreateRotationZ(float radians)

Creates a new rotation T:Microsoft.Xna.Framework.Matrix around Z axis.

Parameters:
  • radians (float) – Angle in radians.
Returns:

The rotation T:Microsoft.Xna.Framework.Matrix around Z axis.

void CreateRotationZ(float radians, ref Matrix result)
Parameters:
  • radians (float) –
  • (ref) result (Microsoft.Xna.Framework.Matrix) –
Matrix CreateScale(float scale)

Creates a new scaling T:Microsoft.Xna.Framework.Matrix.

Parameters:
  • scale (float) – Scale value for all three axises.
Returns:

The scaling T:Microsoft.Xna.Framework.Matrix.

void CreateScale(float scale, ref Matrix result)
Parameters:
  • scale (float) –
  • (ref) result (Microsoft.Xna.Framework.Matrix) –
Matrix CreateScale(float xScale, float yScale, float zScale)

Creates a new scaling T:Microsoft.Xna.Framework.Matrix.

Parameters:
  • xScale (float) – Scale value for X axis.
  • yScale (float) – Scale value for Y axis.
  • zScale (float) – Scale value for Z axis.
Returns:

The scaling T:Microsoft.Xna.Framework.Matrix.

void CreateScale(float xScale, float yScale, float zScale, ref Matrix result)
Parameters:
  • xScale (float) –
  • yScale (float) –
  • zScale (float) –
  • (ref) result (Microsoft.Xna.Framework.Matrix) –
Matrix CreateScale(Vector3 scales)

Creates a new scaling T:Microsoft.Xna.Framework.Matrix.

Parameters:
  • scales (Microsoft.Xna.Framework.Vector3) – T:Microsoft.Xna.Framework.Vector3 representing x,y and z scale values.
Returns:

The scaling T:Microsoft.Xna.Framework.Matrix.

void CreateScale(ref Vector3 scales, ref Matrix result)
Parameters:
  • (ref) scales (Microsoft.Xna.Framework.Vector3) –
  • (ref) result (Microsoft.Xna.Framework.Matrix) –
Matrix CreateShadow(Vector3 lightDirection, Plane plane)

Creates a new T:Microsoft.Xna.Framework.Matrix that flattens geometry into a specified T:Microsoft.Xna.Framework.Plane as if casting a shadow from a specified light source.

Parameters:
  • lightDirection (Microsoft.Xna.Framework.Vector3) – A vector specifying the direction from which the light that will cast the shadow is coming.
  • plane (Microsoft.Xna.Framework.Plane) – The plane onto which the new matrix should flatten geometry so as to cast a shadow.
Returns:

A T:Microsoft.Xna.Framework.Matrix that can be used to flatten geometry onto the specified plane from the specified direction.

void CreateShadow(ref Vector3 lightDirection, ref Plane plane, ref Matrix result)
Parameters:
  • (ref) lightDirection (Microsoft.Xna.Framework.Vector3) –
  • (ref) plane (Microsoft.Xna.Framework.Plane) –
  • (ref) result (Microsoft.Xna.Framework.Matrix) –
Matrix CreateTranslation(float xPosition, float yPosition, float zPosition)

Creates a new translation T:Microsoft.Xna.Framework.Matrix.

Parameters:
  • xPosition (float) – X coordinate of translation.
  • yPosition (float) – Y coordinate of translation.
  • zPosition (float) – Z coordinate of translation.
Returns:

The translation T:Microsoft.Xna.Framework.Matrix.

void CreateTranslation(ref Vector3 position, ref Matrix result)
Parameters:
  • (ref) position (Microsoft.Xna.Framework.Vector3) –
  • (ref) result (Microsoft.Xna.Framework.Matrix) –
Matrix CreateTranslation(Vector3 position)

Creates a new translation T:Microsoft.Xna.Framework.Matrix.

Parameters:
  • position (Microsoft.Xna.Framework.Vector3) – X,Y and Z coordinates of translation.
Returns:

The translation T:Microsoft.Xna.Framework.Matrix.

void CreateTranslation(float xPosition, float yPosition, float zPosition, ref Matrix result)
Parameters:
  • xPosition (float) –
  • yPosition (float) –
  • zPosition (float) –
  • (ref) result (Microsoft.Xna.Framework.Matrix) –
Matrix CreateReflection(Plane value)

Creates a new reflection T:Microsoft.Xna.Framework.Matrix.

Parameters:
  • value (Microsoft.Xna.Framework.Plane) – The plane that used for reflection calculation.
Returns:

The reflection T:Microsoft.Xna.Framework.Matrix.

void CreateReflection(ref Plane value, ref Matrix result)
Parameters:
  • (ref) value (Microsoft.Xna.Framework.Plane) –
  • (ref) result (Microsoft.Xna.Framework.Matrix) –
Matrix CreateWorld(Vector3 position, Vector3 forward, Vector3 up)

Creates a new world T:Microsoft.Xna.Framework.Matrix.

Parameters:
  • position (Microsoft.Xna.Framework.Vector3) – The position vector.
  • forward (Microsoft.Xna.Framework.Vector3) – The forward direction vector.
  • up (Microsoft.Xna.Framework.Vector3) – The upward direction vector. Usually P:Microsoft.Xna.Framework.Vector3.Up.
Returns:

The world T:Microsoft.Xna.Framework.Matrix.

void CreateWorld(ref Vector3 position, ref Vector3 forward, ref Vector3 up, ref Matrix result)
Parameters:
  • (ref) position (Microsoft.Xna.Framework.Vector3) –
  • (ref) forward (Microsoft.Xna.Framework.Vector3) –
  • (ref) up (Microsoft.Xna.Framework.Vector3) –
  • (ref) result (Microsoft.Xna.Framework.Matrix) –
bool Decompose(ref Vector3 scale, ref Quaternion rotation, ref Vector3 translation)
Parameters:
  • (ref) scale (Microsoft.Xna.Framework.Vector3) –
  • (ref) rotation (Microsoft.Xna.Framework.Quaternion) –
  • (ref) translation (Microsoft.Xna.Framework.Vector3) –
float Determinant()

Returns a determinant of this T:Microsoft.Xna.Framework.Matrix.

Returns:Determinant of this T:Microsoft.Xna.Framework.Matrix
Matrix Divide(Matrix matrix1, Matrix matrix2)

Divides the elements of a T:Microsoft.Xna.Framework.Matrix by the elements of another matrix.

Parameters:
  • matrix1 (Microsoft.Xna.Framework.Matrix) – Source T:Microsoft.Xna.Framework.Matrix.
  • matrix2 (Microsoft.Xna.Framework.Matrix) – Divisor T:Microsoft.Xna.Framework.Matrix.
Returns:

The result of dividing the matrix.

void Divide(ref Matrix matrix1, ref Matrix matrix2, ref Matrix result)
Parameters:
  • (ref) matrix1 (Microsoft.Xna.Framework.Matrix) –
  • (ref) matrix2 (Microsoft.Xna.Framework.Matrix) –
  • (ref) result (Microsoft.Xna.Framework.Matrix) –
Matrix Divide(Matrix matrix1, float divider)

Divides the elements of a T:Microsoft.Xna.Framework.Matrix by a scalar.

Parameters:
  • matrix1 (Microsoft.Xna.Framework.Matrix) – Source T:Microsoft.Xna.Framework.Matrix.
  • divider (float) – Divisor scalar.
Returns:

The result of dividing a matrix by a scalar.

void Divide(ref Matrix matrix1, float divider, ref Matrix result)
Parameters:
  • (ref) matrix1 (Microsoft.Xna.Framework.Matrix) –
  • divider (float) –
  • (ref) result (Microsoft.Xna.Framework.Matrix) –
bool Equals(Matrix other)

Compares whether current instance is equal to specified T:Microsoft.Xna.Framework.Matrix without any tolerance.

Parameters:
  • other (Microsoft.Xna.Framework.Matrix) – The T:Microsoft.Xna.Framework.Matrix to compare.
Returns:

true if the instances are equal; false otherwise.

bool Equals(System.Object obj)

Compares whether current instance is equal to specified T:System.Object without any tolerance.

Parameters:
  • obj (System.Object) – The T:System.Object to compare.
Returns:

true if the instances are equal; false otherwise.

int GetHashCode()

Gets the hash code of this T:Microsoft.Xna.Framework.Matrix.

Returns:Hash code of this T:Microsoft.Xna.Framework.Matrix.
Matrix Invert(Matrix matrix)

Creates a new T:Microsoft.Xna.Framework.Matrix which contains inversion of the specified matrix.

Parameters:
  • matrix (Microsoft.Xna.Framework.Matrix) – Source T:Microsoft.Xna.Framework.Matrix.
Returns:

The inverted matrix.

void Invert(ref Matrix matrix, ref Matrix result)
Parameters:
  • (ref) matrix (Microsoft.Xna.Framework.Matrix) –
  • (ref) result (Microsoft.Xna.Framework.Matrix) –
Matrix Lerp(Matrix matrix1, Matrix matrix2, float amount)

Creates a new T:Microsoft.Xna.Framework.Matrix that contains linear interpolation of the values in specified matrixes.

Parameters:
  • matrix1 (Microsoft.Xna.Framework.Matrix) – The first T:Microsoft.Xna.Framework.Matrix.
  • matrix2 (Microsoft.Xna.Framework.Matrix) – The second T:Microsoft.Xna.Framework.Vector2.
  • amount (float) – Weighting value(between 0.0 and 1.0).
Returns:

>The result of linear interpolation of the specified matrixes.

void Lerp(ref Matrix matrix1, ref Matrix matrix2, float amount, ref Matrix result)
Parameters:
  • (ref) matrix1 (Microsoft.Xna.Framework.Matrix) –
  • (ref) matrix2 (Microsoft.Xna.Framework.Matrix) –
  • amount (float) –
  • (ref) result (Microsoft.Xna.Framework.Matrix) –
Matrix Multiply(Matrix matrix1, Matrix matrix2)

Creates a new T:Microsoft.Xna.Framework.Matrix that contains a multiplication of two matrix.

Parameters:
  • matrix1 (Microsoft.Xna.Framework.Matrix) – Source T:Microsoft.Xna.Framework.Matrix.
  • matrix2 (Microsoft.Xna.Framework.Matrix) – Source T:Microsoft.Xna.Framework.Matrix.
Returns:

Result of the matrix multiplication.

void Multiply(ref Matrix matrix1, ref Matrix matrix2, ref Matrix result)
Parameters:
  • (ref) matrix1 (Microsoft.Xna.Framework.Matrix) –
  • (ref) matrix2 (Microsoft.Xna.Framework.Matrix) –
  • (ref) result (Microsoft.Xna.Framework.Matrix) –
Matrix Multiply(Matrix matrix1, float scaleFactor)

Creates a new T:Microsoft.Xna.Framework.Matrix that contains a multiplication of T:Microsoft.Xna.Framework.Matrix and a scalar.

Parameters:
  • matrix1 (Microsoft.Xna.Framework.Matrix) – Source T:Microsoft.Xna.Framework.Matrix.
  • scaleFactor (float) – Scalar value.
Returns:

Result of the matrix multiplication with a scalar.

void Multiply(ref Matrix matrix1, float scaleFactor, ref Matrix result)
Parameters:
  • (ref) matrix1 (Microsoft.Xna.Framework.Matrix) –
  • scaleFactor (float) –
  • (ref) result (Microsoft.Xna.Framework.Matrix) –
System.Single[] ToFloatArray(Matrix matrix)

Copy the values of specified T:Microsoft.Xna.Framework.Matrix to the float array.

Parameters:
  • matrix (Microsoft.Xna.Framework.Matrix) – The source T:Microsoft.Xna.Framework.Matrix.
Returns:

The array which matrix values will be stored.

Matrix Negate(Matrix matrix)

Returns a matrix with the all values negated.

Parameters:
  • matrix (Microsoft.Xna.Framework.Matrix) – Source T:Microsoft.Xna.Framework.Matrix.
Returns:

Result of the matrix negation.

void Negate(ref Matrix matrix, ref Matrix result)
Parameters:
  • (ref) matrix (Microsoft.Xna.Framework.Matrix) –
  • (ref) result (Microsoft.Xna.Framework.Matrix) –
Matrix op_Addition(Matrix matrix1, Matrix matrix2)

Adds two matrixes.

Parameters:
  • matrix1 (Microsoft.Xna.Framework.Matrix) – Source T:Microsoft.Xna.Framework.Matrix on the left of the add sign.
  • matrix2 (Microsoft.Xna.Framework.Matrix) – Source T:Microsoft.Xna.Framework.Matrix on the right of the add sign.
Returns:

Sum of the matrixes.

Matrix op_Division(Matrix matrix1, Matrix matrix2)

Divides the elements of a T:Microsoft.Xna.Framework.Matrix by the elements of another T:Microsoft.Xna.Framework.Matrix.

Parameters:
  • matrix1 (Microsoft.Xna.Framework.Matrix) – Source T:Microsoft.Xna.Framework.Matrix on the left of the div sign.
  • matrix2 (Microsoft.Xna.Framework.Matrix) – Divisor T:Microsoft.Xna.Framework.Matrix on the right of the div sign.
Returns:

The result of dividing the matrixes.

Matrix op_Division(Matrix matrix, float divider)

Divides the elements of a T:Microsoft.Xna.Framework.Matrix by a scalar.

Parameters:
  • matrix (Microsoft.Xna.Framework.Matrix) – Source T:Microsoft.Xna.Framework.Matrix on the left of the div sign.
  • divider (float) – Divisor scalar on the right of the div sign.
Returns:

The result of dividing a matrix by a scalar.

bool op_Equality(Matrix matrix1, Matrix matrix2)

Compares whether two T:Microsoft.Xna.Framework.Matrix instances are equal without any tolerance.

Parameters:
  • matrix1 (Microsoft.Xna.Framework.Matrix) – Source T:Microsoft.Xna.Framework.Matrix on the left of the equal sign.
  • matrix2 (Microsoft.Xna.Framework.Matrix) – Source T:Microsoft.Xna.Framework.Matrix on the right of the equal sign.
Returns:

true if the instances are equal; false otherwise.

bool op_Inequality(Matrix matrix1, Matrix matrix2)

Compares whether two T:Microsoft.Xna.Framework.Matrix instances are not equal without any tolerance.

Parameters:
  • matrix1 (Microsoft.Xna.Framework.Matrix) – Source T:Microsoft.Xna.Framework.Matrix on the left of the not equal sign.
  • matrix2 (Microsoft.Xna.Framework.Matrix) – Source T:Microsoft.Xna.Framework.Matrix on the right of the not equal sign.
Returns:

true if the instances are not equal; false otherwise.

Matrix op_Multiply(Matrix matrix1, Matrix matrix2)

Multiplies two matrixes.

Parameters:
  • matrix1 (Microsoft.Xna.Framework.Matrix) – Source T:Microsoft.Xna.Framework.Matrix on the left of the mul sign.
  • matrix2 (Microsoft.Xna.Framework.Matrix) – Source T:Microsoft.Xna.Framework.Matrix on the right of the mul sign.
Returns:

Result of the matrix multiplication.

Matrix op_Multiply(Matrix matrix, float scaleFactor)

Multiplies the elements of matrix by a scalar.

Parameters:
  • matrix (Microsoft.Xna.Framework.Matrix) – Source T:Microsoft.Xna.Framework.Matrix on the left of the mul sign.
  • scaleFactor (float) – Scalar value on the right of the mul sign.
Returns:

Result of the matrix multiplication with a scalar.

Matrix op_Subtraction(Matrix matrix1, Matrix matrix2)

Subtracts the values of one T:Microsoft.Xna.Framework.Matrix from another T:Microsoft.Xna.Framework.Matrix.

Parameters:
  • matrix1 (Microsoft.Xna.Framework.Matrix) – Source T:Microsoft.Xna.Framework.Matrix on the left of the sub sign.
  • matrix2 (Microsoft.Xna.Framework.Matrix) – Source T:Microsoft.Xna.Framework.Matrix on the right of the sub sign.
Returns:

Result of the matrix subtraction.

Matrix op_UnaryNegation(Matrix matrix)

Inverts values in the specified T:Microsoft.Xna.Framework.Matrix.

Parameters:
  • matrix (Microsoft.Xna.Framework.Matrix) – Source T:Microsoft.Xna.Framework.Matrix on the right of the sub sign.
Returns:

Result of the inversion.

Matrix Subtract(Matrix matrix1, Matrix matrix2)

Creates a new T:Microsoft.Xna.Framework.Matrix that contains subtraction of one matrix from another.

Parameters:
  • matrix1 (Microsoft.Xna.Framework.Matrix) – The first T:Microsoft.Xna.Framework.Matrix.
  • matrix2 (Microsoft.Xna.Framework.Matrix) – The second T:Microsoft.Xna.Framework.Matrix.
Returns:

The result of the matrix subtraction.

void Subtract(ref Matrix matrix1, ref Matrix matrix2, ref Matrix result)
Parameters:
  • (ref) matrix1 (Microsoft.Xna.Framework.Matrix) –
  • (ref) matrix2 (Microsoft.Xna.Framework.Matrix) –
  • (ref) result (Microsoft.Xna.Framework.Matrix) –
string get_DebugDisplayString()
string ToString()

Returns a T:System.String representation of this T:Microsoft.Xna.Framework.Matrix in the format: {M11:[F:Microsoft.Xna.Framework.Matrix.M11] M12:[F:Microsoft.Xna.Framework.Matrix.M12] M13:[F:Microsoft.Xna.Framework.Matrix.M13] M14:[F:Microsoft.Xna.Framework.Matrix.M14]} {M21:[F:Microsoft.Xna.Framework.Matrix.M21] M12:[F:Microsoft.Xna.Framework.Matrix.M22] M13:[F:Microsoft.Xna.Framework.Matrix.M23] M14:[F:Microsoft.Xna.Framework.Matrix.M24]} {M31:[F:Microsoft.Xna.Framework.Matrix.M31] M32:[F:Microsoft.Xna.Framework.Matrix.M32] M33:[F:Microsoft.Xna.Framework.Matrix.M33] M34:[F:Microsoft.Xna.Framework.Matrix.M34]} {M41:[F:Microsoft.Xna.Framework.Matrix.M41] M42:[F:Microsoft.Xna.Framework.Matrix.M42] M43:[F:Microsoft.Xna.Framework.Matrix.M43] M44:[F:Microsoft.Xna.Framework.Matrix.M44]}

Returns:A T:System.String representation of this T:Microsoft.Xna.Framework.Matrix.
Matrix Transpose(Matrix matrix)

Swap the matrix rows and columns.

Parameters:
  • matrix (Microsoft.Xna.Framework.Matrix) – The matrix for transposing operation.
Returns:

The new T:Microsoft.Xna.Framework.Matrix which contains the transposing result.

void Transpose(ref Matrix matrix, ref Matrix result)
Parameters:
  • (ref) matrix (Microsoft.Xna.Framework.Matrix) –
  • (ref) result (Microsoft.Xna.Framework.Matrix) –