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
float M11 Value at row 1 column 1 of the matrix.
float M12 Value at row 1 column 2 of the matrix.
float M13 Value at row 1 column 3 of the matrix.
float M14 Value at row 1 column 4 of the matrix.
float M21 Value at row 2 column 1 of the matrix.
float M22 Value at row 2 column 2 of the matrix.
float M23 Value at row 2 column 3 of the matrix.
float M24 Value at row 2 column 4 of the matrix.
float M31 Value at row 3 column 1 of the matrix.
float M32 Value at row 3 column 2 of the matrix.
float M33 Value at row 3 column 3 of the matrix.
float M34 Value at row 3 column 4 of the matrix.
float M41 Value at row 4 column 1 of the matrix.
float M42 Value at row 4 column 2 of the matrix.
float M43 Value at row 4 column 3 of the matrix.
float M44 Value at row 4 column 4 of the matrix.
static VRageMath.Matrix Identity
static VRageMath.Matrix Zero

Properties

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

Methods

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

Clone this wiki locally