Skip to content
This repository was archived by the owner on Dec 13, 2025. It is now read-only.

VRageMath.Matrix

Malware edited this page Dec 21, 2018 · 54 revisions

Index

Matrix Struct

Namespace: VRageMath
Assembly: VRage.Math.dll

Summary

Defines a matrix.

Fields

Member Description
M11 Value at row 1 column 1 of the matrix.
M12 Value at row 1 column 2 of the matrix.
M13 Value at row 1 column 3 of the matrix.
M14 Value at row 1 column 4 of the matrix.
M21 Value at row 2 column 1 of the matrix.
M22 Value at row 2 column 2 of the matrix.
M23 Value at row 2 column 3 of the matrix.
M24 Value at row 2 column 4 of the matrix.
M31 Value at row 3 column 1 of the matrix.
M32 Value at row 3 column 2 of the matrix.
M33 Value at row 3 column 3 of the matrix.
M34 Value at row 3 column 4 of the matrix.
M41 Value at row 4 column 1 of the matrix.
M42 Value at row 4 column 2 of the matrix.
M43 Value at row 4 column 3 of the matrix.
M44 Value at row 4 column 4 of the matrix.
static Identity
static Zero

Properties

Member Description
Up Gets and sets the up vector of the Matrix.
Down Gets and sets the down vector of the Matrix.
Right Gets and sets the right vector of the Matrix.
Col0
Col1
Col2
Left Gets and sets the left vector of the Matrix.
Forward Gets and sets the forward vector of the Matrix.
Backward Gets and sets the backward vector of the Matrix.
Scale
Translation Gets and sets the translation vector of the Matrix.
Item

Methods

Member Description
static Subtract(ref Matrix, ref Matrix, ref Matrix) Subtracts matrices.
static Multiply(Matrix, Matrix) Multiplies a matrix by another matrix.
static Multiply(ref Matrix, ref Matrix, ref Matrix) Multiplies a matrix by another matrix.
static MultiplyRotation(ref Matrix, ref Matrix, ref Matrix) Multiplies a matrix by another matrix, only rotation parts.
static Multiply(Matrix, float) Multiplies a matrix by a scalar value.
static Multiply(ref Matrix, float, ref Matrix) Multiplies a matrix by a scalar value.
static Divide(Matrix, Matrix) Divides the components of a matrix by the corresponding components of another matrix.
static Divide(ref Matrix, ref Matrix, ref Matrix) Divides the components of a matrix by the corresponding components of another matrix.
static Divide(Matrix, float) Divides the components of a matrix by a scalar.
static Divide(ref Matrix, float, ref Matrix) Divides the components of a matrix by a scalar.
GetOrientation() Gets the orientation.
AssertIsValid()
IsValid()
IsNan()
IsRotation()
HasNoTranslationOrPerspective() Returns true if this matrix represents invertible (you can call Invert on it) linear (it does not contain translation or perspective transformation) transformation. Such matrix consist solely of rotations, shearing, mirroring and scaling. It can be orthogonalized to create an orthogonal rotation matrix.
static CreateFromDir(Vector3)
static CreateFromDir(Vector3, Vector3)
static Normalize(Matrix)
static Orthogonalize(Matrix)
static Round(ref Matrix)
static AlignRotationToAxes(ref Matrix, ref Matrix)
static GetEulerAnglesXYZ(ref Matrix, ref Vector3)
static SwapYZCoordinates(Matrix)
IsMirrored()
IsOrthogonal()
GetDirectionVector(Direction)
SetDirectionVector(Direction, Vector3)
GetClosestDirection(Vector3)
GetClosestDirection(ref Vector3)
static Rescale(ref Matrix, float) Same result as Matrix.CreateScale(scale) * matrix, but much faster
static Rescale(ref Matrix, ref Vector3) Same result as Matrix.CreateScale(scale) * matrix, but much faster
static Rescale(Matrix, float)
static Rescale(Matrix, Vector3)
static CreateBillboard(Vector3, Vector3, Vector3, Nullable<Vector3>) Creates a spherical billboard that rotates around a specified object position.
static CreateBillboard(ref Vector3, ref Vector3, ref Vector3, Nullable<Vector3>, ref Matrix) Creates a spherical billboard that rotates around a specified object position.
static CreateConstrainedBillboard(Vector3, Vector3, Vector3, Nullable<Vector3>, Nullable<Vector3>) Creates a cylindrical billboard that rotates around a specified axis.
static CreateConstrainedBillboard(ref Vector3, ref Vector3, ref Vector3, Nullable<Vector3>, Nullable<Vector3>, ref Matrix) Creates a cylindrical billboard that rotates around a specified axis.
static CreateTranslation(Vector3) Creates a translation Matrix.
static CreateTranslation(ref Vector3, ref Matrix) Creates a translation Matrix.
static CreateTranslation(float, float, float) Creates a translation Matrix.
static CreateTranslation(float, float, float, ref Matrix) Creates a translation Matrix.
static CreateScale(float, float, float) Creates a scaling Matrix.
static CreateScale(float, float, float, ref Matrix) Creates a scaling Matrix.
static CreateScale(Vector3) Creates a scaling Matrix.
static CreateScale(ref Vector3, ref Matrix) Creates a scaling Matrix.
static CreateScale(float) Creates a scaling Matrix.
static CreateScale(float, ref Matrix) Creates a scaling Matrix.
static CreateRotationX(float) Returns a matrix that can be used to rotate a set of vertices around the x-axis.
static CreateRotationX(float, ref Matrix) Populates data into a user-specified matrix that can be used to rotate a set of vertices around the x-axis.
static CreateRotationY(float) Returns a matrix that can be used to rotate a set of vertices around the y-axis.
static CreateRotationY(float, ref Matrix) Populates data into a user-specified matrix that can be used to rotate a set of vertices around the y-axis.
static CreateRotationZ(float) Returns a matrix that can be used to rotate a set of vertices around the z-axis.
static CreateRotationZ(float, ref Matrix) Populates data into a user-specified matrix that can be used to rotate a set of vertices around the z-axis.
static CreateFromAxisAngle(Vector3, float) Creates a new Matrix that rotates around an arbitrary vector.
static CreateFromAxisAngle(ref Vector3, float, ref Matrix) Creates a new Matrix that rotates around an arbitrary vector.
static CreateRotationFromTwoVectors(ref Vector3, ref Vector3, ref Matrix)
static CreatePerspectiveFieldOfView(float, float, float, float) Builds a perspective projection matrix based on a field of view and returns by value.
static CreatePerspectiveFovRhComplementary(float, float, float, float)
static CreatePerspectiveFovRhInfinite(float, float, float)
static CreatePerspectiveFovRhInfiniteComplementary(float, float, float)
static CreatePerspectiveFovRhInverse(float, float, float, float)
static CreatePerspectiveFovRhInfiniteInverse(float, float, float)
static CreatePerspectiveFovRhInfiniteComplementaryInverse(float, float, float)
static CreateFromPerspectiveFieldOfView(ref Matrix, float, float)
static CreatePerspectiveFieldOfView(float, float, float, float, ref Matrix) Builds a perspective projection matrix based on a field of view and returns by reference.
static CreatePerspective(float, float, float, float) Builds a perspective projection matrix and returns the result by value.
static CreatePerspective(float, float, float, float, ref Matrix) Builds a perspective projection matrix and returns the result by reference.
static CreatePerspectiveOffCenter(float, float, float, float, float, float) Builds a customized, perspective projection matrix.
static CreatePerspectiveOffCenter(float, float, float, float, float, float, ref Matrix) Builds a customized, perspective projection matrix.
static CreateOrthographic(float, float, float, float) Builds an orthogonal projection matrix.
static CreateOrthographic(float, float, float, float, ref Matrix) Builds an orthogonal projection matrix.
static CreateOrthographicOffCenter(float, float, float, float, float, float) Builds a customized, orthogonal projection matrix.
static CreateOrthographicOffCenter(float, float, float, float, float, float, ref Matrix) Builds a customized, orthogonal projection matrix.
static CreateLookAt(Vector3, Vector3, Vector3) Creates a view matrix.
static CreateLookAtInverse(Vector3, Vector3, Vector3)
static CreateLookAt(ref Vector3, ref Vector3, ref Vector3, ref Matrix) Creates a view matrix.
static CreateWorld(Vector3)
static CreateWorld(Vector3, Vector3, Vector3) Creates a world matrix with the specified parameters.
static CreateWorld(ref Vector3, ref Vector3, ref Vector3, ref Matrix) Creates a world matrix with the specified parameters.
static CreateFromQuaternion(Quaternion) Creates a rotation Matrix from a Quaternion.
static CreateFromQuaternion(ref Quaternion, ref Matrix) Creates a rotation Matrix from a Quaternion.
static CreateFromYawPitchRoll(float, float, float) Creates a new rotation matrix from a specified yaw, pitch, and roll.
static CreateFromYawPitchRoll(float, float, float, ref Matrix) Fills in a rotation matrix from a specified yaw, pitch, and roll.
static CreateFromTransformScale(Quaternion, Vector3, Vector3)
static CreateShadow(Vector3, Plane) Creates a Matrix that flattens geometry into a specified Plane as if casting a shadow from a specified light source.
static CreateShadow(ref Vector3, ref Plane, ref Matrix) Fills in a Matrix to flatten geometry into a specified Plane as if casting a shadow from a specified light source.
static CreateReflection(Plane) Creates a Matrix that reflects the coordinate system about a specified Plane.
static CreateReflection(ref Plane, ref Matrix) Fills in an existing Matrix so that it reflects the coordinate system about a specified Plane.
static Transform(Matrix, Quaternion) Transforms a Matrix by applying a Quaternion rotation.
static Transform(ref Matrix, ref Quaternion, ref Matrix) Transforms a Matrix by applying a Quaternion rotation.
GetRow(int)
SetRow(int, Vector4)
ToString() Retrieves a string representation of the current object.
Equals(Matrix) Determines whether the specified Object is equal to the Matrix.
EqualsFast(ref Matrix, float) Compares just position, forward and up
Equals(Object) Returns a value that indicates whether the current instance is equal to a specified object.
GetHashCode() Gets the hash code of this object.
static Transpose(Matrix) Transposes the rows and columns of a matrix.
static Transpose(ref Matrix, ref Matrix) Transposes the rows and columns of a matrix.
TransposeRotationInPlace() Transposes the rows and columns of a matrix that is assumed to be rotation only in place.
Determinant() Calculates the determinant of the matrix.
static Invert(Matrix) Calculates the inverse of a matrix.
static Invert(ref Matrix)
static Invert(ref Matrix, ref Matrix) Calculates the inverse of a matrix.
static Lerp(Matrix, Matrix, float) Linearly interpolates between the corresponding values of two matrices.
static Lerp(ref Matrix, ref Matrix, float, ref Matrix) Linearly interpolates between the corresponding values of two matrices.
static Slerp(ref Matrix, ref Matrix, float, ref Matrix) Performs spherical linear interpolation of position and rotation.
static SlerpScale(ref Matrix, ref Matrix, float, ref Matrix) Performs spherical linear interpolation of position and rotation and scale.
static Slerp(Matrix, Matrix, float, ref Matrix) Performs spherical linear interpolation of position and rotation.
static Slerp(Matrix, Matrix, float) Performs spherical linear interpolation of position and rotation.
static SlerpScale(Matrix, Matrix, float, ref Matrix) Performs spherical linear interpolation of position and rotation and scale.
static SlerpScale(Matrix, Matrix, float) Performs spherical linear interpolation of position and rotation and scale.
static Negate(Matrix) Negates individual elements of a matrix.
static Negate(ref Matrix, ref Matrix) Negates individual elements of a matrix.
static Add(Matrix, Matrix) Adds a matrix to another matrix.
static Add(ref Matrix, ref Matrix, ref Matrix) Adds a matrix to another matrix.
static Subtract(Matrix, Matrix) Subtracts matrices.

Clone this wiki locally