Skip to content
This repository has been archived by the owner on Oct 22, 2024. It is now read-only.

VRageMath.MatrixD

Morten Aune Lyrstad edited this page Feb 3, 2022 · 59 revisions

IndexNamespace Index

MatrixD Struct

public struct MatrixD: IEquatable<VRageMath.MatrixD>

Defines a matrix.

Namespace: VRageMath
Assembly: VRage.Math.dll

Implements:

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.
Identity
Zero

Properties

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

Constructors

Member Description
MatrixD(double, double, double, double, double, double, double, double, double, double, double, double, double, double, double, double)
MatrixD(double, double, double, double, double, double, double, double, double)
MatrixD(Matrix)

Methods

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