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

VRageMath.MatrixD

Malware edited this page Dec 21, 2018 · 60 revisions

Index

MatrixD Struct

Namespace: VRageMath
Assembly: VRage.Math.dll

Summary

Defines a matrix.

Fields

_double M11_ Value at row 1 column 1 of the matrix.
_double M12_ Value at row 1 column 2 of the matrix.
_double M13_ Value at row 1 column 3 of the matrix.
_double M14_ Value at row 1 column 4 of the matrix.
_double M21_ Value at row 2 column 1 of the matrix.
_double M22_ Value at row 2 column 2 of the matrix.
_double M23_ Value at row 2 column 3 of the matrix.
_double M24_ Value at row 2 column 4 of the matrix.
_double M31_ Value at row 3 column 1 of the matrix.
_double M32_ Value at row 3 column 2 of the matrix.
_double M33_ Value at row 3 column 3 of the matrix.
_double M34_ Value at row 3 column 4 of the matrix.
_double M41_ Value at row 4 column 1 of the matrix.
_double M42_ Value at row 4 column 2 of the matrix.
_double M43_ Value at row 4 column 3 of the matrix.
_double M44_ Value at row 4 column 4 of the matrix.
static _MatrixD Identity_
static _MatrixD Zero_
### Properties
_Vector3D Col0_
_Vector3D Col1_
_Vector3D Col2_
_Vector3D Up_ Gets and sets the up vector of the Matrix.
_Vector3D Down_ Gets and sets the down vector of the Matrix.
_Vector3D Right_ Gets and sets the right vector of the Matrix.
_Vector3D Left_ Gets and sets the left vector of the Matrix.
_Vector3D Forward_ Gets and sets the forward vector of the Matrix.
_Vector3D Backward_ Gets and sets the backward vector of the Matrix.
_Vector3D Scale_
_Vector3D Translation_ Gets and sets the translation vector of the Matrix.
_Matrix3x3 Rotation_
_double Item_
### Methods
static _Matrix Subtract(Matrix matrix1, Matrix matrix2)_ Subtracts matrices.
static _void Subtract(ref MatrixD matrix1, ref MatrixD matrix2, ref MatrixD result)_ Subtracts matrices.
static _MatrixD Multiply(MatrixD matrix1, MatrixD matrix2)_ Multiplies a matrix by another matrix.
static _MatrixD Multiply(MatrixD matrix1, Matrix matrix2)_ Multiplies a matrix by another matrix.
static _void Multiply(ref MatrixD matrix1, ref Matrix matrix2, ref MatrixD result)_ Multiplies a matrix by another matrix.
static _void Multiply(ref Matrix matrix1, ref MatrixD matrix2, ref MatrixD result)_
static _void Multiply(ref MatrixD matrix1, ref MatrixD matrix2, ref MatrixD result)_ Multiplies a matrix by another matrix.
static _MatrixD Multiply(MatrixD matrix1, double scaleFactor)_ Multiplies a matrix by a scalar value.
static _void Multiply(ref MatrixD matrix1, double scaleFactor, ref MatrixD result)_ Multiplies a matrix by a scalar value.
static _MatrixD Divide(MatrixD matrix1, MatrixD matrix2)_ Divides the components of a matrix by the corresponding components of another matrix.
static _void Divide(ref MatrixD matrix1, ref MatrixD matrix2, ref MatrixD result)_ Divides the components of a matrix by the corresponding components of another matrix.
static _MatrixD Divide(MatrixD matrix1, double divider)_ Divides the components of a matrix by a scalar.
static _void Divide(ref MatrixD matrix1, double divider, ref MatrixD result)_ Divides the components of a matrix by a scalar.
_MatrixD 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 _MatrixD CreateFromDir(Vector3D dir)_
static _MatrixD CreateFromDir(Vector3D dir, Vector3D suggestedUp)_
static _MatrixD Normalize(MatrixD matrix)_
_void Orthogonalize()_
static _MatrixD Orthogonalize(MatrixD rotationMatrix)_
static _MatrixD AlignRotationToAxes(ref MatrixD toAlign, ref MatrixD axisDefinitionMatrix)_
static _bool GetEulerAnglesXYZ(ref MatrixD mat, ref Vector3D xyz)_
static _MatrixD SwapYZCoordinates(MatrixD m)_
_bool IsMirrored()_
_Vector3D GetDirectionVector(Direction direction)_
_void SetDirectionVector(Direction direction, Vector3D newValue)_
_Direction GetClosestDirection(Vector3D referenceVector)_
_Direction GetClosestDirection(ref Vector3D referenceVector)_
static _void Rescale(ref MatrixD matrix, double scale)_ Same result as Matrix.CreateScale(scale) * matrix, but much faster
static _void Rescale(ref MatrixD matrix, float scale)_ Same result as Matrix.CreateScale(scale) * matrix, but much faster
static _void Rescale(ref MatrixD matrix, ref Vector3D scale)_ Same result as Matrix.CreateScale(scale) * matrix, but much faster
static _MatrixD Rescale(MatrixD matrix, double scale)_
static _MatrixD Rescale(MatrixD matrix, Vector3D scale)_
static _MatrixD CreateBillboard(Vector3D objectPosition, Vector3D cameraPosition, Vector3D cameraUpVector, Nullable cameraForwardVector)_ Creates a spherical billboard that rotates around a specified object position.
static _void CreateBillboard(ref Vector3D objectPosition, ref Vector3D cameraPosition, ref Vector3D cameraUpVector, Nullable cameraForwardVector, ref MatrixD result)_ Creates a spherical billboard that rotates around a specified object position.
static _MatrixD CreateConstrainedBillboard(Vector3D objectPosition, Vector3D cameraPosition, Vector3D rotateAxis, Nullable cameraForwardVector, Nullable objectForwardVector)_ Creates a cylindrical billboard that rotates around a specified axis.
static _void CreateConstrainedBillboard(ref Vector3D objectPosition, ref Vector3D cameraPosition, ref Vector3D rotateAxis, Nullable cameraForwardVector, Nullable objectForwardVector, ref MatrixD result)_ Creates a cylindrical billboard that rotates around a specified axis.
static _MatrixD CreateTranslation(Vector3D position)_ Creates a translation Matrix.
static _MatrixD CreateTranslation(Vector3 position)_
static _void CreateTranslation(ref Vector3D position, ref MatrixD result)_ Creates a translation Matrix.
static _MatrixD CreateTranslation(double xPosition, double yPosition, double zPosition)_ Creates a translation Matrix.
static _void CreateTranslation(double xPosition, double yPosition, double zPosition, ref MatrixD result)_ Creates a translation Matrix.
static _MatrixD CreateScale(double xScale, double yScale, double zScale)_ Creates a scaling Matrix.
static _void CreateScale(double xScale, double yScale, double zScale, ref MatrixD result)_ Creates a scaling Matrix.
static _MatrixD CreateScale(Vector3D scales)_ Creates a scaling Matrix.
static _void CreateScale(ref Vector3D scales, ref MatrixD result)_ Creates a scaling Matrix.
static _MatrixD CreateScale(double scale)_ Creates a scaling Matrix.
static _void CreateScale(double scale, ref MatrixD result)_ Creates a scaling Matrix.
static _MatrixD CreateRotationX(double radians)_ Returns a matrix that can be used to rotate a set of vertices around the x-axis.
static _void CreateRotationX(double radians, ref MatrixD result)_ Populates data into a user-specified matrix that can be used to rotate a set of vertices around the x-axis.
static _MatrixD CreateRotationY(double radians)_ Returns a matrix that can be used to rotate a set of vertices around the y-axis.
static _void CreateRotationY(double radians, ref MatrixD result)_ Populates data into a user-specified matrix that can be used to rotate a set of vertices around the y-axis.
static _MatrixD CreateRotationZ(double radians)_ Returns a matrix that can be used to rotate a set of vertices around the z-axis.
static _void CreateRotationZ(double radians, ref MatrixD result)_ Populates data into a user-specified matrix that can be used to rotate a set of vertices around the z-axis.
static _MatrixD CreateFromAxisAngle(Vector3D axis, double angle)_ Creates a new Matrix that rotates around an arbitrary vector.
static _void CreateFromAxisAngle(ref Vector3D axis, double angle, ref MatrixD result)_ Creates a new Matrix that rotates around an arbitrary vector.
static _MatrixD CreatePerspectiveFieldOfView(double fieldOfView, double aspectRatio, double nearPlaneDistance, double farPlaneDistance)_ Builds a perspective projection matrix based on a field of view and returns by value.
static _void CreatePerspectiveFieldOfView(double fieldOfView, double aspectRatio, double nearPlaneDistance, double farPlaneDistance, ref MatrixD result)_ Builds a perspective projection matrix based on a field of view and returns by reference.
static _MatrixD CreatePerspective(double width, double height, double nearPlaneDistance, double farPlaneDistance)_ Builds a perspective projection matrix and returns the result by value.
static _void CreatePerspective(double width, double height, double nearPlaneDistance, double farPlaneDistance, ref MatrixD result)_ Builds a perspective projection matrix and returns the result by reference.
static _MatrixD CreatePerspectiveOffCenter(double left, double right, double bottom, double top, double nearPlaneDistance, double farPlaneDistance)_ Builds a customized, perspective projection matrix.
static _void CreatePerspectiveOffCenter(double left, double right, double bottom, double top, double nearPlaneDistance, double farPlaneDistance, ref MatrixD result)_ Builds a customized, perspective projection matrix.
static _MatrixD CreateOrthographic(double width, double height, double zNearPlane, double zFarPlane)_ Builds an orthogonal projection matrix.
static _void CreateOrthographic(double width, double height, double zNearPlane, double zFarPlane, ref MatrixD result)_ Builds an orthogonal projection matrix.
static _MatrixD CreateOrthographicOffCenter(double left, double right, double bottom, double top, double zNearPlane, double zFarPlane)_ Builds a customized, orthogonal projection matrix.
static _void CreateOrthographicOffCenter(double left, double right, double bottom, double top, double zNearPlane, double zFarPlane, ref MatrixD result)_ Builds a customized, orthogonal projection matrix.
static _MatrixD CreateLookAt(Vector3D cameraPosition, Vector3D cameraTarget, Vector3 cameraUpVector)_
static _MatrixD CreateLookAt(Vector3D cameraPosition, Vector3D cameraTarget, Vector3D cameraUpVector)_ Creates a view matrix.
static _Matrix CreateLookAtInverse(Vector3D cameraPosition, Vector3D cameraTarget, Vector3D cameraUpVector)_
static _void CreateLookAt(ref Vector3D cameraPosition, ref Vector3D cameraTarget, ref Vector3D cameraUpVector, ref MatrixD result)_ Creates a view matrix.
static _MatrixD CreateWorld(Vector3D position, Vector3 forward, Vector3 up)_
static _MatrixD CreateWorld(Vector3D position)_
static _MatrixD CreateWorld(Vector3D position, Vector3D forward, Vector3D up)_ Creates a world matrix with the specified parameters.
static _void CreateWorld(ref Vector3D position, ref Vector3D forward, ref Vector3D up, ref MatrixD result)_ Creates a world matrix with the specified parameters.
static _MatrixD CreateFromQuaternion(Quaternion quaternion)_ Creates a rotation Matrix from a Quaternion.
static _MatrixD CreateFromQuaternion(QuaternionD quaternion)_
static _void CreateFromQuaternion(ref Quaternion quaternion, ref MatrixD result)_ Creates a rotation Matrix from a Quaternion.
static _MatrixD CreateFromYawPitchRoll(double yaw, double pitch, double roll)_ Creates a new rotation matrix from a specified yaw, pitch, and roll.
static _void CreateFromYawPitchRoll(double yaw, double pitch, double roll, ref MatrixD result)_ Fills in a rotation matrix from a specified yaw, pitch, and roll.
static _MatrixD CreateFromTransformScale(Quaternion orientation, Vector3D position, Vector3D scale)_
static _MatrixD CreateShadow(Vector3D lightDirection, Plane 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 Vector3D lightDirection, ref Plane plane, ref MatrixD result)_ Fills in a Matrix to flatten geometry into a specified Plane as if casting a shadow from a specified light source.
static _MatrixD CreateReflection(Plane value)_ Creates a Matrix that reflects the coordinate system about a specified Plane.
static _void CreateReflection(ref Plane value, ref MatrixD result)_ Fills in an existing Matrix so that it reflects the coordinate system about a specified Plane.
static _MatrixD Transform(MatrixD value, Quaternion rotation)_ Transforms a Matrix by applying a Quaternion rotation.
static _void Transform(ref MatrixD value, ref Quaternion rotation, ref MatrixD result)_ Transforms a Matrix by applying a Quaternion rotation.
_Vector4 GetRow(int row)_
_void SetRow(int row, Vector4 value)_
_string ToString()_ Retrieves a string representation of the current object.
_bool Equals(MatrixD other)_ Determines whether the specified Object is equal to the Matrix.
_bool EqualsFast(ref MatrixD other, double epsilon)_ Compares just position, forward and up
_bool Equals(Object obj)_ 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 _MatrixD Transpose(MatrixD matrix)_ Transposes the rows and columns of a matrix.
static _void Transpose(ref MatrixD matrix, ref MatrixD result)_ Transposes the rows and columns of a matrix.
_double Determinant()_ Calculates the determinant of the matrix.
static _MatrixD Invert(MatrixD matrix)_ Calculates the inverse of a matrix.
static _MatrixD Invert(ref MatrixD matrix)_
static _void Invert(ref MatrixD matrix, ref MatrixD result)_ Calculates the inverse of a matrix.
static _MatrixD Lerp(MatrixD matrix1, MatrixD matrix2, double amount)_ Linearly interpolates between the corresponding values of two matrices.
static _void Lerp(ref MatrixD matrix1, ref MatrixD matrix2, double amount, ref MatrixD result)_ Linearly interpolates between the corresponding values of two matrices.
static _void Slerp(ref MatrixD matrix1, ref MatrixD matrix2, float amount, ref MatrixD result)_ Performs spherical linear interpolation of position and rotation.
_bool IsOrthogonal()_
_bool IsOrthogonal(double epsilon)_
static _void SlerpScale(ref MatrixD matrix1, ref MatrixD matrix2, float amount, ref MatrixD result)_ Performs spherical linear interpolation of position and rotation and scale.
static _void Slerp(MatrixD matrix1, MatrixD matrix2, float amount, ref MatrixD result)_ Performs spherical linear interpolation of position and rotation.
static _MatrixD Slerp(MatrixD matrix1, MatrixD matrix2, float amount)_ Performs spherical linear interpolation of position and rotation.
static _void SlerpScale(MatrixD matrix1, MatrixD matrix2, float amount, ref MatrixD result)_ Performs spherical linear interpolation of position and rotation and scale.
static _MatrixD SlerpScale(MatrixD matrix1, MatrixD matrix2, float amount)_ Performs spherical linear interpolation of position and rotation and scale.
static _MatrixD Negate(MatrixD matrix)_ Negates individual elements of a matrix.
static _void Negate(ref MatrixD matrix, ref MatrixD result)_ Negates individual elements of a matrix.
static _MatrixD Add(MatrixD matrix1, MatrixD matrix2)_ Adds a matrix to another matrix.
static _void Add(ref MatrixD matrix1, ref MatrixD matrix2, ref MatrixD result)_ Adds a matrix to another matrix.

Clone this wiki locally