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

VRageMath.Matrix3x3

Morten Aune Lyrstad edited this page Apr 16, 2022 · 52 revisions

IndexNamespace Index

Matrix3x3 Struct

public struct Matrix3x3: IEquatable<Matrix3x3>

Defines a matrix.

Namespace: VRageMath
Assembly: VRage.Math.dll

Implements:

Fields

static Matrix3x3 Identity

static Matrix3x3 Zero

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

Properties

Vector3 Backward { get; set; }

Gets and sets the backward vector of the Matrix3x3.

Vector3 Col0 { get; }

Vector3 Col1 { get; }

Vector3 Col2 { get; }

Vector3 Down { get; set; }

Gets and sets the down vector of the Matrix3x3.

Vector3 Forward { get; set; }

Gets and sets the forward vector of the Matrix3x3.

float Item { get; set; }

Vector3 Left { get; set; }

Gets and sets the left vector of the Matrix3x3.

Vector3 Right { get; set; }

Gets and sets the right vector of the Matrix3x3.

Vector3 Scale { get; }

Vector3 Up { get; set; }

Gets and sets the up vector of the Matrix3x3.

Constructors

Matrix3x3(float m11, float m12, float m13, float m21, float m22, float m23, float m31, float m32, float m33)

Matrix3x3(Matrix3x3 other)

Matrix3x3(MatrixD other)

Methods

static void Add(ref Matrix3x3 matrix1, ref Matrix3x3 matrix2, out Matrix3x3 result)

Adds a matrix to another matrix.

static Matrix3x3 AlignRotationToAxes(ref Matrix3x3 toAlign, ref Matrix3x3 axisDefinitionMatrix)

static Matrix3x3 CreateFromAxisAngle(Vector3 axis, float angle)

Creates a new Matrix3x3 that rotates around an arbitrary vector.

static void CreateFromAxisAngle(ref Vector3 axis, float angle, out Matrix3x3 result)

Creates a new Matrix3x3 that rotates around an arbitrary vector.

static Matrix3x3 CreateFromDir(Vector3 dir)

static Matrix3x3 CreateFromDir(Vector3 dir, Vector3 suggestedUp)

static Matrix3x3 CreateFromQuaternion(Quaternion quaternion)

Creates a rotation Matrix3x3 from a Quaternion.

static void CreateFromQuaternion(ref Quaternion quaternion, out Matrix3x3 result)

Creates a rotation Matrix3x3 from a Quaternion.

static Matrix3x3 CreateFromYawPitchRoll(float yaw, float pitch, float roll)

Creates a new rotation matrix from a specified yaw, pitch, and roll.

static void CreateFromYawPitchRoll(float yaw, float pitch, float roll, out Matrix3x3 result)

Fills in a rotation matrix from a specified yaw, pitch, and roll.

static void CreateRotationFromTwoVectors(ref Vector3 fromVector, ref Vector3 toVector, out Matrix3x3 resultMatrix)

static Matrix3x3 CreateRotationX(float radians)

Returns a matrix that can be used to rotate a set of vertices around the x-axis.

static void CreateRotationX(float radians, out Matrix3x3 result)

Populates data into a user-specified matrix that can be used to rotate a set of vertices around the x-axis.

static Matrix3x3 CreateRotationY(float radians)

Returns a matrix that can be used to rotate a set of vertices around the y-axis.

static void CreateRotationY(float radians, out Matrix3x3 result)

Populates data into a user-specified matrix that can be used to rotate a set of vertices around the y-axis.

static Matrix3x3 CreateRotationZ(float radians)

Returns a matrix that can be used to rotate a set of vertices around the z-axis.

static void CreateRotationZ(float radians, out Matrix3x3 result)

Populates data into a user-specified matrix that can be used to rotate a set of vertices around the z-axis.

static Matrix3x3 CreateScale(float xScale, float yScale, float zScale)

Creates a scaling Matrix3x3.

static void CreateScale(float xScale, float yScale, float zScale, out Matrix3x3 result)

Creates a scaling Matrix3x3.

static Matrix3x3 CreateScale(Vector3 scales)

Creates a scaling Matrix3x3.

static void CreateScale(ref Vector3 scales, out Matrix3x3 result)

Creates a scaling Matrix3x3.

static Matrix3x3 CreateScale(float scale)

Creates a scaling Matrix3x3.

static void CreateScale(float scale, out Matrix3x3 result)

Creates a scaling Matrix3x3.

static Matrix3x3 CreateWorld(ref Vector3 forward, ref Vector3 up)

Creates a world matrix with the specified parameters.

static void Divide(ref Matrix3x3 matrix1, ref Matrix3x3 matrix2, out Matrix3x3 result)

Divides the components of a matrix by the corresponding components of another matrix.

static void Divide(ref Matrix3x3 matrix1, float divider, out Matrix3x3 result)

Divides the components of a matrix by a scalar.

static bool GetEulerAnglesXYZ(ref Matrix3x3 mat, out Vector3 xyz)

static void Invert(ref Matrix3x3 matrix, out Matrix3x3 result)

Calculates the inverse of a matrix.

static void Lerp(ref Matrix3x3 matrix1, ref Matrix3x3 matrix2, float amount, out Matrix3x3 result)

Linearly interpolates between the corresponding values of two matrices.

static void Multiply(ref Matrix3x3 matrix1, ref Matrix3x3 matrix2, out Matrix3x3 result)

Multiplies a matrix by another matrix.

static void Multiply(ref Matrix3x3 matrix1, float scaleFactor, out Matrix3x3 result)

Multiplies a matrix by a scalar value.

static void Negate(ref Matrix3x3 matrix, out Matrix3x3 result)

Negates individual elements of a matrix.

static Matrix3x3 Normalize(Matrix3x3 matrix)

static Matrix3x3 Orthogonalize(Matrix3x3 rotationMatrix)

static void Rescale(ref Matrix3x3 matrix, float scale)

Same result as Matrix3x3.CreateScale(scale) * matrix, but much faster

static void Rescale(ref Matrix3x3 matrix, ref Vector3 scale)

Same result as Matrix3x3.CreateScale(scale) * matrix, but much faster

static Matrix3x3 Rescale(Matrix3x3 matrix, float scale)

static Matrix3x3 Rescale(Matrix3x3 matrix, Vector3 scale)

static Matrix3x3 Round(ref Matrix3x3 matrix)

static void Slerp(ref Matrix3x3 matrix1, ref Matrix3x3 matrix2, float amount, out Matrix3x3 result)

Performs spherical linear interpolation of position and rotation.

static void SlerpScale(ref Matrix3x3 matrix1, ref Matrix3x3 matrix2, float amount, out Matrix3x3 result)

Performs spherical linear interpolation of position and rotation and scale.

static void Subtract(ref Matrix3x3 matrix1, ref Matrix3x3 matrix2, out Matrix3x3 result)

Subtracts matrices.

static void Transform(ref Matrix3x3 value, ref Quaternion rotation, out Matrix3x3 result)

Transforms a Matrix3x3 by applying a Quaternion rotation.

static void Transpose(ref Matrix3x3 matrix, out Matrix3x3 result)

Transposes the rows and columns of a matrix.

void AssertIsValid()

float Determinant()

bool Equals(Matrix3x3 other)

Determines whether the specified Object is equal to the Matrix3x3.

bool Equals(object obj)

Returns a value that indicates whether the current instance is equal to a specified object.

bool EqualsFast(ref Matrix3x3 other, float epsilon = 0.0001)

Compares just position, forward and up

Direction GetClosestDirection(Vector3 referenceVector)

Direction GetClosestDirection(ref Vector3 referenceVector)

Vector3 GetDirectionVector(Direction direction)

int GetHashCode()

Gets the hash code of this object.

Matrix3x3 GetOrientation()

Gets the orientation.

Vector3 GetRow(int row)

bool IsMirrored()

bool IsNan()

bool IsOrthogonal()

bool IsRotation()

bool IsValid()

void SetDirectionVector(Direction direction, Vector3 newValue)

void SetRow(int row, Vector3 value)

string ToString()

Retrieves a string representation of the current object.

void Transpose()

Clone this wiki locally