Space Engineers
Classes | Public Member Functions | Static Public Member Functions | Public Attributes | Static Public Attributes | Properties | List of all members
VRageMath.Matrix Struct Reference

Defines a matrix. More...

Inheritance diagram for VRageMath.Matrix:

Public Member Functions

Vector3 GetDirectionVector (Base6Directions.Direction direction)
 Gets the base vector of the matrix, corresponding to the given direction More...
 
void SetDirectionVector (Base6Directions.Direction direction, Vector3 newValue)
 Sets the base vector of the matrix, corresponding to the given direction More...
 
Base6Directions.Direction GetClosestDirection (Vector3 referenceVector)
 
Base6Directions.Direction GetClosestDirection (ref Vector3 referenceVector)
 
 Matrix (float m11, float m12, float m13, float m14, float m21, float m22, float m23, float m24, float m31, float m32, float m33, float m34, float m41, float m42, float m43, float m44)
 Initializes a new instance of Matrix. More...
 
 Matrix (float m11, float m12, float m13, float m21, float m22, float m23, float m31, float m32, float m33)
 Initializes a new instance of Matrix with rotation data More...
 
 Matrix (MatrixD other)
 
Vector4 GetRow (int row)
 
void SetRow (int row, Vector4 value)
 
override string ToString ()
 Retrieves a string representation of the current object. More...
 
bool Equals (Matrix other)
 Determines whether the specified Object is equal to the Matrix. More...
 
bool EqualsFast (ref Matrix other, float epsilon=0.0001f)
 Compares just position, forward and up More...
 
override bool Equals (object obj)
 Returns a value that indicates whether the current instance is equal to a specified object. More...
 
override int GetHashCode ()
 Gets the hash code of this object. More...
 
void TransposeRotationInPlace ()
 Transposes the rows and columns of a matrix that is assumed to be rotation only in place. More...
 
float Determinant ()
 Calculates the determinant of the matrix. More...
 
Matrix GetOrientation ()
 Gets the orientation. More...
 
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. More...
 
bool IsMirrored ()
 

Static Public Member Functions

static void Rescale (ref Matrix matrix, float scale)
 Same result as Matrix.CreateScale(scale) * matrix, but much faster More...
 
static void Rescale (ref Matrix matrix, ref Vector3 scale)
 Same result as Matrix.CreateScale(scale) * matrix, but much faster More...
 
static Matrix Rescale (Matrix matrix, float scale)
 
static Matrix Rescale (Matrix matrix, Vector3 scale)
 
static Matrix ()
 
static Matrix operator- (Matrix matrix1)
 Negates individual elements of a matrix. More...
 
static bool operator== (Matrix matrix1, Matrix matrix2)
 Compares a matrix for equality with another matrix. More...
 
static bool operator!= (Matrix matrix1, Matrix matrix2)
 Tests a matrix for inequality with another matrix. More...
 
static Matrix operator+ (Matrix matrix1, Matrix matrix2)
 Adds a matrix to another matrix. More...
 
static Matrix operator- (Matrix matrix1, Matrix matrix2)
 Subtracts matrices. More...
 
static Matrix operator* (Matrix matrix1, Matrix matrix2)
 Multiplies a matrix by another matrix. More...
 
static Matrix operator* (Matrix matrix, float scaleFactor)
 Multiplies a matrix by a scalar value. More...
 
static Matrix operator* (float scaleFactor, Matrix matrix)
 Multiplies a matrix by a scalar value. More...
 
static Matrix operator/ (Matrix matrix1, Matrix matrix2)
 Divides the components of a matrix by the corresponding components of another matrix. More...
 
static Matrix operator/ (Matrix matrix1, float divider)
 Divides the components of a matrix by a scalar. More...
 
static Matrix CreateBillboard (Vector3 objectPosition, Vector3 cameraPosition, Vector3 cameraUpVector, Vector3?cameraForwardVector)
 Creates a spherical billboard that rotates around a specified object position. More...
 
static void CreateBillboard (ref Vector3 objectPosition, ref Vector3 cameraPosition, ref Vector3 cameraUpVector, Vector3?cameraForwardVector, out Matrix result)
 Creates a spherical billboard that rotates around a specified object position. More...
 
static Matrix CreateConstrainedBillboard (Vector3 objectPosition, Vector3 cameraPosition, Vector3 rotateAxis, Vector3?cameraForwardVector, Vector3?objectForwardVector)
 Creates a cylindrical billboard that rotates around a specified axis. More...
 
static void CreateConstrainedBillboard (ref Vector3 objectPosition, ref Vector3 cameraPosition, ref Vector3 rotateAxis, Vector3?cameraForwardVector, Vector3?objectForwardVector, out Matrix result)
 Creates a cylindrical billboard that rotates around a specified axis. More...
 
static Matrix CreateTranslation (Vector3 position)
 Creates a translation Matrix. More...
 
static void CreateTranslation (ref Vector3 position, out Matrix result)
 Creates a translation Matrix. More...
 
static Matrix CreateTranslation (float xPosition, float yPosition, float zPosition)
 Creates a translation Matrix. More...
 
static void CreateTranslation (float xPosition, float yPosition, float zPosition, out Matrix result)
 Creates a translation Matrix. More...
 
static Matrix CreateScale (float xScale, float yScale, float zScale)
 Creates a scaling Matrix. More...
 
static void CreateScale (float xScale, float yScale, float zScale, out Matrix result)
 Creates a scaling Matrix. More...
 
static Matrix CreateScale (Vector3 scales)
 Creates a scaling Matrix. More...
 
static void CreateScale (ref Vector3 scales, out Matrix result)
 Creates a scaling Matrix. More...
 
static Matrix CreateScale (float scale)
 Creates a scaling Matrix. More...
 
static void CreateScale (float scale, out Matrix result)
 Creates a scaling Matrix. More...
 
static Matrix CreateRotationX (float radians)
 Returns a matrix that can be used to rotate a set of vertices around the x-axis. More...
 
static void CreateRotationX (float radians, out Matrix result)
 Populates data into a user-specified matrix that can be used to rotate a set of vertices around the x-axis. More...
 
static Matrix CreateRotationY (float radians)
 Returns a matrix that can be used to rotate a set of vertices around the y-axis. More...
 
static void CreateRotationY (float radians, out Matrix result)
 Populates data into a user-specified matrix that can be used to rotate a set of vertices around the y-axis. More...
 
static Matrix CreateRotationZ (float radians)
 Returns a matrix that can be used to rotate a set of vertices around the z-axis. More...
 
static void CreateRotationZ (float radians, out Matrix result)
 Populates data into a user-specified matrix that can be used to rotate a set of vertices around the z-axis. More...
 
static Matrix CreateFromAxisAngle (Vector3 axis, float angle)
 Creates a new Matrix that rotates around an arbitrary vector. More...
 
static void CreateFromAxisAngle (ref Vector3 axis, float angle, out Matrix result)
 Creates a new Matrix that rotates around an arbitrary vector. More...
 
static void CreateRotationFromTwoVectors (ref Vector3 fromVector, ref Vector3 toVector, out Matrix resultMatrix)
 
static Matrix CreatePerspectiveFieldOfView (float fieldOfView, float aspectRatio, float nearPlaneDistance, float farPlaneDistance)
 Builds a perspective projection matrix based on a field of view and returns by value. More...
 
static Matrix CreatePerspectiveFovRhComplementary (float fieldOfView, float aspectRatio, float nearPlaneDistance, float farPlaneDistance)
 
static Matrix CreatePerspectiveFovRhInfinite (float fieldOfView, float aspectRatio, float nearPlaneDistance)
 
static Matrix CreatePerspectiveFovRhInfiniteComplementary (float fieldOfView, float aspectRatio, float nearPlaneDistance)
 
static Matrix CreatePerspectiveFovRhInverse (float fieldOfView, float aspectRatio, float nearPlaneDistance, float farPlaneDistance)
 
static Matrix CreatePerspectiveFovRhInfiniteInverse (float fieldOfView, float aspectRatio, float nearPlaneDistance)
 
static Matrix CreatePerspectiveFovRhInfiniteComplementaryInverse (float fieldOfView, float aspectRatio, float nearPlaneDistance)
 
static Matrix CreateFromPerspectiveFieldOfView (ref Matrix proj, float nearPlaneDistance, float farPlaneDistance)
 
static void CreatePerspectiveFieldOfView (float fieldOfView, float aspectRatio, float nearPlaneDistance, float farPlaneDistance, out Matrix result)
 Builds a perspective projection matrix based on a field of view and returns by reference. More...
 
static Matrix CreatePerspective (float width, float height, float nearPlaneDistance, float farPlaneDistance)
 Builds a perspective projection matrix and returns the result by value. More...
 
static void CreatePerspective (float width, float height, float nearPlaneDistance, float farPlaneDistance, out Matrix result)
 Builds a perspective projection matrix and returns the result by reference. More...
 
static Matrix CreatePerspectiveOffCenter (float left, float right, float bottom, float top, float nearPlaneDistance, float farPlaneDistance)
 Builds a customized, perspective projection matrix. More...
 
static void CreatePerspectiveOffCenter (float left, float right, float bottom, float top, float nearPlaneDistance, float farPlaneDistance, out Matrix result)
 Builds a customized, perspective projection matrix. More...
 
static Matrix CreateOrthographic (float width, float height, float zNearPlane, float zFarPlane)
 Builds an orthogonal projection matrix. More...
 
static void CreateOrthographic (float width, float height, float zNearPlane, float zFarPlane, out Matrix result)
 Builds an orthogonal projection matrix. More...
 
static Matrix CreateOrthographicOffCenter (float left, float right, float bottom, float top, float zNearPlane, float zFarPlane)
 Builds a customized, orthogonal projection matrix. More...
 
static void CreateOrthographicOffCenter (float left, float right, float bottom, float top, float zNearPlane, float zFarPlane, out Matrix result)
 Builds a customized, orthogonal projection matrix. More...
 
static Matrix CreateLookAt (Vector3 cameraPosition, Vector3 cameraTarget, Vector3 cameraUpVector)
 Creates a view matrix. More...
 
static Matrix CreateLookAtInverse (Vector3 cameraPosition, Vector3 cameraTarget, Vector3 cameraUpVector)
 
static void CreateLookAt (ref Vector3 cameraPosition, ref Vector3 cameraTarget, ref Vector3 cameraUpVector, out Matrix result)
 Creates a view matrix. More...
 
static Matrix CreateWorld (Vector3 position)
 
static Matrix CreateWorld (Vector3 position, Vector3 forward, Vector3 up)
 Creates a world matrix with the specified parameters. More...
 
static void CreateWorld (ref Vector3 position, ref Vector3 forward, ref Vector3 up, out Matrix result)
 Creates a world matrix with the specified parameters. More...
 
static Matrix CreateFromQuaternion (Quaternion quaternion)
 Creates a rotation Matrix from a Quaternion. More...
 
static void CreateFromQuaternion (ref Quaternion quaternion, out Matrix result)
 Creates a rotation Matrix from a Quaternion. More...
 
static Matrix CreateFromYawPitchRoll (float yaw, float pitch, float roll)
 Creates a new rotation matrix from a specified yaw, pitch, and roll. More...
 
static void CreateFromYawPitchRoll (float yaw, float pitch, float roll, out Matrix result)
 Fills in a rotation matrix from a specified yaw, pitch, and roll. More...
 
static Matrix CreateFromTransformScale (Quaternion orientation, Vector3 position, Vector3 scale)
 
static Matrix CreateShadow (Vector3 lightDirection, Plane plane)
 Creates a Matrix that flattens geometry into a specified Plane as if casting a shadow from a specified light source. More...
 
static void CreateShadow (ref Vector3 lightDirection, ref Plane plane, out Matrix result)
 Fills in a Matrix to flatten geometry into a specified Plane as if casting a shadow from a specified light source. More...
 
static Matrix CreateReflection (Plane value)
 Creates a Matrix that reflects the coordinate system about a specified Plane. More...
 
static void CreateReflection (ref Plane value, out Matrix result)
 Fills in an existing Matrix so that it reflects the coordinate system about a specified Plane. More...
 
static Matrix Transform (Matrix value, Quaternion rotation)
 Transforms a Matrix by applying a Quaternion rotation. More...
 
static void Transform (ref Matrix value, ref Quaternion rotation, out Matrix result)
 Transforms a Matrix by applying a Quaternion rotation. More...
 
static Matrix Transpose (Matrix matrix)
 Transposes the rows and columns of a matrix. More...
 
static void Transpose (ref Matrix matrix, out Matrix result)
 Transposes the rows and columns of a matrix. More...
 
static Matrix Invert (Matrix matrix)
 Calculates the inverse of a matrix. More...
 
static Matrix Invert (ref Matrix matrix)
 
static void Invert (ref Matrix matrix, out Matrix result)
 Calculates the inverse of a matrix. More...
 
static Matrix Lerp (Matrix matrix1, Matrix matrix2, float amount)
 Linearly interpolates between the corresponding values of two matrices. More...
 
static void Lerp (ref Matrix matrix1, ref Matrix matrix2, float amount, out Matrix result)
 Linearly interpolates between the corresponding values of two matrices. More...
 
static void Slerp (ref Matrix matrix1, ref Matrix matrix2, float amount, out Matrix result)
 Performs spherical linear interpolation of position and rotation. More...
 
static void SlerpScale (ref Matrix matrix1, ref Matrix matrix2, float amount, out Matrix result)
 Performs spherical linear interpolation of position and rotation and scale. More...
 
static void Slerp (Matrix matrix1, Matrix matrix2, float amount, out Matrix result)
 Performs spherical linear interpolation of position and rotation. More...
 
static Matrix Slerp (Matrix matrix1, Matrix matrix2, float amount)
 Performs spherical linear interpolation of position and rotation. More...
 
static void SlerpScale (Matrix matrix1, Matrix matrix2, float amount, out Matrix result)
 Performs spherical linear interpolation of position and rotation and scale. More...
 
static Matrix SlerpScale (Matrix matrix1, Matrix matrix2, float amount)
 Performs spherical linear interpolation of position and rotation and scale. More...
 
static Matrix Negate (Matrix matrix)
 Negates individual elements of a matrix. More...
 
static void Negate (ref Matrix matrix, out Matrix result)
 Negates individual elements of a matrix. More...
 
static Matrix Add (Matrix matrix1, Matrix matrix2)
 Adds a matrix to another matrix. More...
 
static void Add (ref Matrix matrix1, ref Matrix matrix2, out Matrix result)
 Adds a matrix to another matrix. More...
 
static Matrix Subtract (Matrix matrix1, Matrix matrix2)
 Subtracts matrices. More...
 
static void Subtract (ref Matrix matrix1, ref Matrix matrix2, out Matrix result)
 Subtracts matrices. More...
 
static Matrix Multiply (Matrix matrix1, Matrix matrix2)
 Multiplies a matrix by another matrix. More...
 
static void Multiply (ref Matrix matrix1, ref Matrix matrix2, out Matrix result)
 Native Interop Function More...
 
static Matrix Multiply (Matrix matrix1, float scaleFactor)
 Multiplies a matrix by a scalar value. More...
 
static void Multiply (ref Matrix matrix1, float scaleFactor, out Matrix result)
 Multiplies a matrix by a scalar value. More...
 
static Matrix Divide (Matrix matrix1, Matrix matrix2)
 Divides the components of a matrix by the corresponding components of another matrix. More...
 
static void Divide (ref Matrix matrix1, ref Matrix matrix2, out Matrix result)
 Divides the components of a matrix by the corresponding components of another matrix. More...
 
static Matrix Divide (Matrix matrix1, float divider)
 Divides the components of a matrix by a scalar. More...
 
static void Divide (ref Matrix matrix1, float divider, out Matrix result)
 Divides the components of a matrix by a scalar. More...
 
static Matrix CreateFromDir (Vector3 dir)
 
static Matrix CreateFromDir (Vector3 dir, Vector3 suggestedUp)
 
static Matrix Normalize (Matrix matrix)
 
static Matrix Orthogonalize (Matrix rotationMatrix)
 
static Matrix Round (ref Matrix matrix)
 
static Matrix AlignRotationToAxes (ref Matrix toAlign, ref Matrix axisDefinitionMatrix)
 
static bool GetEulerAnglesXYZ (ref Matrix mat, out Vector3 xyz)
 
static Matrix SwapYZCoordinates (Matrix m)
 

Public Attributes

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

Static Public Attributes

static Matrix Identity = new Matrix(1f, 0.0f, 0.0f, 0.0f, 0.0f, 1f, 0.0f, 0.0f, 0.0f, 0.0f, 1f, 0.0f, 0.0f, 0.0f, 0.0f, 1f)
 
static Matrix Zero = new Matrix(0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0)
 

Properties

Vector3 Up [get, set]
 Gets and sets the up vector of the Matrix. More...
 
Vector3 Down [get, set]
 Gets and sets the down vector of the Matrix. More...
 
Vector3 Right [get, set]
 Gets and sets the right vector of the Matrix. More...
 
Vector3 Col0 [get]
 
Vector3 Col1 [get]
 
Vector3 Col2 [get]
 
Vector3 Left [get, set]
 Gets and sets the left vector of the Matrix. More...
 
Vector3 Forward [get, set]
 Gets and sets the forward vector of the Matrix. More...
 
Vector3 Backward [get, set]
 Gets and sets the backward vector of the Matrix. More...
 
Vector3 Scale [get]
 
Vector3 Translation [get, set]
 Gets and sets the translation vector of the Matrix. More...
 
float this[int row, int column] [get, set]
 

Detailed Description

Defines a matrix.

Definition at line 23 of file Matrix.cs.

Constructor & Destructor Documentation

static VRageMath.Matrix.Matrix ( )
inlinestatic

Definition at line 495 of file Matrix.cs.

VRageMath.Matrix.Matrix ( float  m11,
float  m12,
float  m13,
float  m14,
float  m21,
float  m22,
float  m23,
float  m24,
float  m31,
float  m32,
float  m33,
float  m34,
float  m41,
float  m42,
float  m43,
float  m44 
)
inline

Initializes a new instance of Matrix.

Parameters
m11Value to initialize m11 to.
m12Value to initialize m12 to.
m13Value to initialize m13 to.
m14Value to initialize m14 to.
m21Value to initialize m21 to.
m22Value to initialize m22 to.
m23Value to initialize m23 to.
m24Value to initialize m24 to.
m31Value to initialize m31 to.
m32Value to initialize m32 to.
m33Value to initialize m33 to.
m34Value to initialize m34 to.
m41Value to initialize m41 to.
m42Value to initialize m42 to.
m43Value to initialize m43 to.
m44Value to initialize m44 to.

Definition at line 503 of file Matrix.cs.

VRageMath.Matrix.Matrix ( float  m11,
float  m12,
float  m13,
float  m21,
float  m22,
float  m23,
float  m31,
float  m32,
float  m33 
)
inline

Initializes a new instance of Matrix with rotation data

Parameters
m11Value to initialize m11 to.
m12Value to initialize m12 to.
m13Value to initialize m13 to.
m14Value to initialize m14 to.
m21Value to initialize m21 to.
m22Value to initialize m22 to.
m23Value to initialize m23 to.
m24Value to initialize m24 to.
m31Value to initialize m31 to.
m32Value to initialize m32 to.
m33Value to initialize m33 to.
m34Value to initialize m34 to.
m41Value to initialize m41 to.
m42Value to initialize m42 to.
m43Value to initialize m43 to.
m44Value to initialize m44 to.

Definition at line 528 of file Matrix.cs.

VRageMath.Matrix.Matrix ( MatrixD  other)
inline

Definition at line 548 of file Matrix.cs.

Member Function Documentation

static Matrix VRageMath.Matrix.Add ( Matrix  matrix1,
Matrix  matrix2 
)
inlinestatic

Adds a matrix to another matrix.

Parameters
matrix1Source matrix.
matrix2Source matrix.

Definition at line 3129 of file Matrix.cs.

static void VRageMath.Matrix.Add ( ref Matrix  matrix1,
ref Matrix  matrix2,
out Matrix  result 
)
inlinestatic

Adds a matrix to another matrix.

Parameters
matrix1Source matrix.
matrix2Source matrix.
result[OutAttribute] Resulting matrix.

Definition at line 3155 of file Matrix.cs.

static Matrix VRageMath.Matrix.AlignRotationToAxes ( ref Matrix  toAlign,
ref Matrix  axisDefinitionMatrix 
)
inlinestatic

Definition at line 3608 of file Matrix.cs.

void VRageMath.Matrix.AssertIsValid ( )
inline

Definition at line 3491 of file Matrix.cs.

static Matrix VRageMath.Matrix.CreateBillboard ( Vector3  objectPosition,
Vector3  cameraPosition,
Vector3  cameraUpVector,
Vector3 cameraForwardVector 
)
inlinestatic

Creates a spherical billboard that rotates around a specified object position.

Parameters
objectPositionPosition of the object the billboard will rotate around.
cameraPositionPosition of the camera.
cameraUpVectorThe up vector of the camera.
cameraForwardVectorOptional forward vector of the camera.

Definition at line 813 of file Matrix.cs.

static void VRageMath.Matrix.CreateBillboard ( ref Vector3  objectPosition,
ref Vector3  cameraPosition,
ref Vector3  cameraUpVector,
Vector3 cameraForwardVector,
out Matrix  result 
)
inlinestatic

Creates a spherical billboard that rotates around a specified object position.

Parameters
objectPositionPosition of the object the billboard will rotate around.
cameraPositionPosition of the camera.
cameraUpVectorThe up vector of the camera.
cameraForwardVectorOptional forward vector of the camera.
result[OutAttribute] The created billboard matrix.

Definition at line 853 of file Matrix.cs.

static Matrix VRageMath.Matrix.CreateConstrainedBillboard ( Vector3  objectPosition,
Vector3  cameraPosition,
Vector3  rotateAxis,
Vector3 cameraForwardVector,
Vector3 objectForwardVector 
)
inlinestatic

Creates a cylindrical billboard that rotates around a specified axis.

Parameters
objectPositionPosition of the object the billboard will rotate around.
cameraPositionPosition of the camera.
rotateAxisAxis to rotate the billboard around.
cameraForwardVectorOptional forward vector of the camera.
objectForwardVectorOptional forward vector of the object.

Definition at line 891 of file Matrix.cs.

static void VRageMath.Matrix.CreateConstrainedBillboard ( ref Vector3  objectPosition,
ref Vector3  cameraPosition,
ref Vector3  rotateAxis,
Vector3 cameraForwardVector,
Vector3 objectForwardVector,
out Matrix  result 
)
inlinestatic

Creates a cylindrical billboard that rotates around a specified axis.

Parameters
objectPositionPosition of the object the billboard will rotate around.
cameraPositionPosition of the camera.
rotateAxisAxis to rotate the billboard around.
cameraForwardVectorOptional forward vector of the camera.
objectForwardVectorOptional forward vector of the object.
result[OutAttribute] The created billboard matrix.

Definition at line 954 of file Matrix.cs.

static Matrix VRageMath.Matrix.CreateFromAxisAngle ( Vector3  axis,
float  angle 
)
inlinestatic

Creates a new Matrix that rotates around an arbitrary vector.

Parameters
axisThe axis to rotate around.
angleThe angle to rotate around the vector.

Definition at line 1441 of file Matrix.cs.

static void VRageMath.Matrix.CreateFromAxisAngle ( ref Vector3  axis,
float  angle,
out Matrix  result 
)
inlinestatic

Creates a new Matrix that rotates around an arbitrary vector.

Parameters
axisThe axis to rotate around.
angleThe angle to rotate around the vector.
result[OutAttribute] The created Matrix.

Definition at line 1478 of file Matrix.cs.

static Matrix VRageMath.Matrix.CreateFromDir ( Vector3  dir)
inlinestatic

Definition at line 3538 of file Matrix.cs.

static Matrix VRageMath.Matrix.CreateFromDir ( Vector3  dir,
Vector3  suggestedUp 
)
inlinestatic

Definition at line 3564 of file Matrix.cs.

static Matrix VRageMath.Matrix.CreateFromPerspectiveFieldOfView ( ref Matrix  proj,
float  nearPlaneDistance,
float  farPlaneDistance 
)
inlinestatic

Definition at line 1708 of file Matrix.cs.

static Matrix VRageMath.Matrix.CreateFromQuaternion ( Quaternion  quaternion)
inlinestatic

Creates a rotation Matrix from a Quaternion.

Parameters
quaternionQuaternion to create the Matrix from.

Definition at line 2119 of file Matrix.cs.

static void VRageMath.Matrix.CreateFromQuaternion ( ref Quaternion  quaternion,
out Matrix  result 
)
inlinestatic

Creates a rotation Matrix from a Quaternion.

Parameters
quaternionQuaternion to create the Matrix from.
result[OutAttribute] The created Matrix.

Definition at line 2154 of file Matrix.cs.

static Matrix VRageMath.Matrix.CreateFromTransformScale ( Quaternion  orientation,
Vector3  position,
Vector3  scale 
)
inlinestatic

Definition at line 2207 of file Matrix.cs.

static Matrix VRageMath.Matrix.CreateFromYawPitchRoll ( float  yaw,
float  pitch,
float  roll 
)
inlinestatic

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

Parameters
yawAngle of rotation, in radians, around the y-axis.
pitchAngle of rotation, in radians, around the x-axis.
rollAngle of rotation, in radians, around the z-axis.

Definition at line 2187 of file Matrix.cs.

static void VRageMath.Matrix.CreateFromYawPitchRoll ( float  yaw,
float  pitch,
float  roll,
out Matrix  result 
)
inlinestatic

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

Parameters
yawAngle of rotation, in radians, around the y-axis.
pitchAngle of rotation, in radians, around the x-axis.
rollAngle of rotation, in radians, around the z-axis.
result[OutAttribute] An existing matrix filled in to represent the specified yaw, pitch, and roll.

Definition at line 2200 of file Matrix.cs.

static Matrix VRageMath.Matrix.CreateLookAt ( Vector3  cameraPosition,
Vector3  cameraTarget,
Vector3  cameraUpVector 
)
inlinestatic

Creates a view matrix.

Parameters
cameraPositionThe position of the camera.
cameraTargetThe target towards which the camera is pointing.
cameraUpVectorThe direction that is "up" from the camera's point of view.

Definition at line 1977 of file Matrix.cs.

static void VRageMath.Matrix.CreateLookAt ( ref Vector3  cameraPosition,
ref Vector3  cameraTarget,
ref Vector3  cameraUpVector,
out Matrix  result 
)
inlinestatic

Creates a view matrix.

Parameters
cameraPositionThe position of the camera.
cameraTargetThe target towards which the camera is pointing.
cameraUpVectorThe direction that is "up" from the camera's point of view.
result[OutAttribute] The created view matrix.

Definition at line 2031 of file Matrix.cs.

static Matrix VRageMath.Matrix.CreateLookAtInverse ( Vector3  cameraPosition,
Vector3  cameraTarget,
Vector3  cameraUpVector 
)
inlinestatic

Definition at line 2002 of file Matrix.cs.

static Matrix VRageMath.Matrix.CreateOrthographic ( float  width,
float  height,
float  zNearPlane,
float  zFarPlane 
)
inlinestatic

Builds an orthogonal projection matrix.

Parameters
widthWidth of the view volume.
heightHeight of the view volume.
zNearPlaneMinimum z-value of the view volume.
zFarPlaneMaximum z-value of the view volume.

Definition at line 1903 of file Matrix.cs.

static void VRageMath.Matrix.CreateOrthographic ( float  width,
float  height,
float  zNearPlane,
float  zFarPlane,
out Matrix  result 
)
inlinestatic

Builds an orthogonal projection matrix.

Parameters
widthWidth of the view volume.
heightHeight of the view volume.
zNearPlaneMinimum z-value of the view volume.
zFarPlaneMaximum z-value of the view volume.
result[OutAttribute] The projection matrix.

Definition at line 1922 of file Matrix.cs.

static Matrix VRageMath.Matrix.CreateOrthographicOffCenter ( float  left,
float  right,
float  bottom,
float  top,
float  zNearPlane,
float  zFarPlane 
)
inlinestatic

Builds a customized, orthogonal projection matrix.

Parameters
leftMinimum x-value of the view volume.
rightMaximum x-value of the view volume.
bottomMinimum y-value of the view volume.
topMaximum y-value of the view volume.
zNearPlaneMinimum z-value of the view volume.
zFarPlaneMaximum z-value of the view volume.

Definition at line 1939 of file Matrix.cs.

static void VRageMath.Matrix.CreateOrthographicOffCenter ( float  left,
float  right,
float  bottom,
float  top,
float  zNearPlane,
float  zFarPlane,
out Matrix  result 
)
inlinestatic

Builds a customized, orthogonal projection matrix.

Parameters
leftMinimum x-value of the view volume.
rightMaximum x-value of the view volume.
bottomMinimum y-value of the view volume.
topMaximum y-value of the view volume.
zNearPlaneMinimum z-value of the view volume.
zFarPlaneMaximum z-value of the view volume.
result[OutAttribute] The projection matrix.

Definition at line 1959 of file Matrix.cs.

static Matrix VRageMath.Matrix.CreatePerspective ( float  width,
float  height,
float  nearPlaneDistance,
float  farPlaneDistance 
)
inlinestatic

Builds a perspective projection matrix and returns the result by value.

Parameters
widthWidth of the view volume at the near view plane.
heightHeight of the view volume at the near view plane.
nearPlaneDistanceDistance to the near view plane.
farPlaneDistanceDistance to the far view plane.

Definition at line 1761 of file Matrix.cs.

static void VRageMath.Matrix.CreatePerspective ( float  width,
float  height,
float  nearPlaneDistance,
float  farPlaneDistance,
out Matrix  result 
)
inlinestatic

Builds a perspective projection matrix and returns the result by reference.

Parameters
widthWidth of the view volume at the near view plane.
heightHeight of the view volume at the near view plane.
nearPlaneDistanceDistance to the near view plane.
farPlaneDistanceDistance to the far view plane.
result[OutAttribute] The projection matrix.

Definition at line 1797 of file Matrix.cs.

static Matrix VRageMath.Matrix.CreatePerspectiveFieldOfView ( float  fieldOfView,
float  aspectRatio,
float  nearPlaneDistance,
float  farPlaneDistance 
)
inlinestatic

Builds a perspective projection matrix based on a field of view and returns by value.

Parameters
fieldOfViewField of view in the y direction, in radians.
aspectRatioAspect ratio, defined as view space width divided by height. To match the aspect ratio of the viewport, the property AspectRatio.
nearPlaneDistanceDistance to the near view plane.
farPlaneDistanceDistance to the far view plane.

Definition at line 1539 of file Matrix.cs.

static void VRageMath.Matrix.CreatePerspectiveFieldOfView ( float  fieldOfView,
float  aspectRatio,
float  nearPlaneDistance,
float  farPlaneDistance,
out Matrix  result 
)
inlinestatic

Builds a perspective projection matrix based on a field of view and returns by reference.

Parameters
fieldOfViewField of view in the y direction, in radians.
aspectRatioAspect ratio, defined as view space width divided by height. To match the aspect ratio of the viewport, the property AspectRatio.
nearPlaneDistanceDistance to the near view plane.
farPlaneDistanceDistance to the far view plane.
result[OutAttribute] The perspective projection matrix.

Definition at line 1720 of file Matrix.cs.

static Matrix VRageMath.Matrix.CreatePerspectiveFovRhComplementary ( float  fieldOfView,
float  aspectRatio,
float  nearPlaneDistance,
float  farPlaneDistance 
)
inlinestatic

Definition at line 1577 of file Matrix.cs.

static Matrix VRageMath.Matrix.CreatePerspectiveFovRhInfinite ( float  fieldOfView,
float  aspectRatio,
float  nearPlaneDistance 
)
inlinestatic

Definition at line 1616 of file Matrix.cs.

static Matrix VRageMath.Matrix.CreatePerspectiveFovRhInfiniteComplementary ( float  fieldOfView,
float  aspectRatio,
float  nearPlaneDistance 
)
inlinestatic

Definition at line 1635 of file Matrix.cs.

static Matrix VRageMath.Matrix.CreatePerspectiveFovRhInfiniteComplementaryInverse ( float  fieldOfView,
float  aspectRatio,
float  nearPlaneDistance 
)
inlinestatic

Definition at line 1690 of file Matrix.cs.

static Matrix VRageMath.Matrix.CreatePerspectiveFovRhInfiniteInverse ( float  fieldOfView,
float  aspectRatio,
float  nearPlaneDistance 
)
inlinestatic

Definition at line 1672 of file Matrix.cs.

static Matrix VRageMath.Matrix.CreatePerspectiveFovRhInverse ( float  fieldOfView,
float  aspectRatio,
float  nearPlaneDistance,
float  farPlaneDistance 
)
inlinestatic

Definition at line 1655 of file Matrix.cs.

static Matrix VRageMath.Matrix.CreatePerspectiveOffCenter ( float  left,
float  right,
float  bottom,
float  top,
float  nearPlaneDistance,
float  farPlaneDistance 
)
inlinestatic

Builds a customized, perspective projection matrix.

Parameters
leftMinimum x-value of the view volume at the near view plane.
rightMaximum x-value of the view volume at the near view plane.
bottomMinimum y-value of the view volume at the near view plane.
topMaximum y-value of the view volume at the near view plane.
nearPlaneDistanceDistance to the near view plane.
farPlaneDistanceDistance to of the far view plane.

Definition at line 1831 of file Matrix.cs.

static void VRageMath.Matrix.CreatePerspectiveOffCenter ( float  left,
float  right,
float  bottom,
float  top,
float  nearPlaneDistance,
float  farPlaneDistance,
out Matrix  result 
)
inlinestatic

Builds a customized, perspective projection matrix.

Parameters
leftMinimum x-value of the view volume at the near view plane.
rightMaximum x-value of the view volume at the near view plane.
bottomMinimum y-value of the view volume at the near view plane.
topMaximum y-value of the view volume at the near view plane.
nearPlaneDistanceDistance to the near view plane.
farPlaneDistanceDistance to of the far view plane.
result[OutAttribute] The created projection matrix.

Definition at line 1868 of file Matrix.cs.

static Matrix VRageMath.Matrix.CreateReflection ( Plane  value)
inlinestatic

Creates a Matrix that reflects the coordinate system about a specified Plane.

Parameters
valueThe Plane about which to create a reflection.

Definition at line 2283 of file Matrix.cs.

static void VRageMath.Matrix.CreateReflection ( ref Plane  value,
out Matrix  result 
)
inlinestatic

Fills in an existing Matrix so that it reflects the coordinate system about a specified Plane.

Parameters
valueThe Plane about which to create a reflection.
result[OutAttribute] A Matrix that creates the reflection.

Definition at line 2316 of file Matrix.cs.

static void VRageMath.Matrix.CreateRotationFromTwoVectors ( ref Vector3  fromVector,
ref Vector3  toVector,
out Matrix  resultMatrix 
)
inlinestatic

Definition at line 1509 of file Matrix.cs.

static Matrix VRageMath.Matrix.CreateRotationX ( float  radians)
inlinestatic

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

Parameters
radiansThe amount, in radians, in which to rotate around the x-axis. Note that you can use ToRadians to convert degrees to radians.

Definition at line 1279 of file Matrix.cs.

static void VRageMath.Matrix.CreateRotationX ( float  radians,
out Matrix  result 
)
inlinestatic

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

Parameters
radiansThe amount, in radians, in which to rotate around the x-axis. Note that you can use ToRadians to convert degrees to radians.
result[OutAttribute] The matrix in which to place the calculated data.

Definition at line 1307 of file Matrix.cs.

static Matrix VRageMath.Matrix.CreateRotationY ( float  radians)
inlinestatic

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

Parameters
radiansThe amount, in radians, in which to rotate around the y-axis. Note that you can use ToRadians to convert degrees to radians.

Definition at line 1333 of file Matrix.cs.

static void VRageMath.Matrix.CreateRotationY ( float  radians,
out Matrix  result 
)
inlinestatic

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

Parameters
radiansThe amount, in radians, in which to rotate around the y-axis. Note that you can use ToRadians to convert degrees to radians.
result[OutAttribute] The matrix in which to place the calculated data.

Definition at line 1361 of file Matrix.cs.

static Matrix VRageMath.Matrix.CreateRotationZ ( float  radians)
inlinestatic

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

Parameters
radiansThe amount, in radians, in which to rotate around the z-axis. Note that you can use ToRadians to convert degrees to radians.

Definition at line 1387 of file Matrix.cs.

static void VRageMath.Matrix.CreateRotationZ ( float  radians,
out Matrix  result 
)
inlinestatic

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

Parameters
radiansThe amount, in radians, in which to rotate around the z-axis. Note that you can use ToRadians to convert degrees to radians.
result[OutAttribute] The rotation matrix.

Definition at line 1415 of file Matrix.cs.

static Matrix VRageMath.Matrix.CreateScale ( float  xScale,
float  yScale,
float  zScale 
)
inlinestatic

Creates a scaling Matrix.

Parameters
xScaleValue to scale by on the x-axis.
yScaleValue to scale by on the y-axis.
zScaleValue to scale by on the z-axis.

Definition at line 1115 of file Matrix.cs.

static void VRageMath.Matrix.CreateScale ( float  xScale,
float  yScale,
float  zScale,
out Matrix  result 
)
inlinestatic

Creates a scaling Matrix.

Parameters
xScaleValue to scale by on the x-axis.
yScaleValue to scale by on the y-axis.
zScaleValue to scale by on the z-axis.
result[OutAttribute] The created scaling Matrix.

Definition at line 1144 of file Matrix.cs.

static Matrix VRageMath.Matrix.CreateScale ( Vector3  scales)
inlinestatic

Creates a scaling Matrix.

Parameters
scalesAmounts to scale by on the x, y, and z axes.

Definition at line 1171 of file Matrix.cs.

static void VRageMath.Matrix.CreateScale ( ref Vector3  scales,
out Matrix  result 
)
inlinestatic

Creates a scaling Matrix.

Parameters
scalesAmounts to scale by on the x, y, and z axes.
result[OutAttribute] The created scaling Matrix.

Definition at line 1200 of file Matrix.cs.

static Matrix VRageMath.Matrix.CreateScale ( float  scale)
inlinestatic

Creates a scaling Matrix.

Parameters
scaleAmount to scale by.

Definition at line 1227 of file Matrix.cs.

static void VRageMath.Matrix.CreateScale ( float  scale,
out Matrix  result 
)
inlinestatic

Creates a scaling Matrix.

Parameters
scaleValue to scale by.
result[OutAttribute] The created scaling Matrix.

Definition at line 1254 of file Matrix.cs.

static Matrix VRageMath.Matrix.CreateShadow ( Vector3  lightDirection,
Plane  plane 
)
inlinestatic

Creates a Matrix that flattens geometry into a specified Plane as if casting a shadow from a specified light source.

Parameters
lightDirectionA Vector3 specifying the direction from which the light that will cast the shadow is coming.
planeThe Plane onto which the new matrix should flatten geometry so as to cast a shadow.

Definition at line 2219 of file Matrix.cs.

static void VRageMath.Matrix.CreateShadow ( ref Vector3  lightDirection,
ref Plane  plane,
out Matrix  result 
)
inlinestatic

Fills in a Matrix to flatten geometry into a specified Plane as if casting a shadow from a specified light source.

Parameters
lightDirectionA Vector3 specifying the direction from which the light that will cast the shadow is coming.
planeThe Plane onto which the new matrix should flatten geometry so as to cast a shadow.
result[OutAttribute] A Matrix that can be used to flatten geometry onto the specified plane from the specified direction.

Definition at line 2252 of file Matrix.cs.

static Matrix VRageMath.Matrix.CreateTranslation ( Vector3  position)
inlinestatic

Creates a translation Matrix.

Parameters
positionAmounts to translate by on the x, y, and z axes.

Definition at line 1015 of file Matrix.cs.

static void VRageMath.Matrix.CreateTranslation ( ref Vector3  position,
out Matrix  result 
)
inlinestatic

Creates a translation Matrix.

Parameters
positionAmounts to translate by on the x, y, and z axes.
result[OutAttribute] The created translation Matrix.

Definition at line 1041 of file Matrix.cs.

static Matrix VRageMath.Matrix.CreateTranslation ( float  xPosition,
float  yPosition,
float  zPosition 
)
inlinestatic

Creates a translation Matrix.

Parameters
xPositionValue to translate by on the x-axis.
yPositionValue to translate by on the y-axis.
zPositionValue to translate by on the z-axis.

Definition at line 1065 of file Matrix.cs.

static void VRageMath.Matrix.CreateTranslation ( float  xPosition,
float  yPosition,
float  zPosition,
out Matrix  result 
)
inlinestatic

Creates a translation Matrix.

Parameters
xPositionValue to translate by on the x-axis.
yPositionValue to translate by on the y-axis.
zPositionValue to translate by on the z-axis.
result[OutAttribute] The created translation Matrix.

Definition at line 1091 of file Matrix.cs.

static Matrix VRageMath.Matrix.CreateWorld ( Vector3  position)
inlinestatic

Definition at line 2054 of file Matrix.cs.

static Matrix VRageMath.Matrix.CreateWorld ( Vector3  position,
Vector3  forward,
Vector3  up 
)
inlinestatic

Creates a world matrix with the specified parameters.

Parameters
positionPosition of the object. This value is used in translation operations.
forwardForward direction of the object.
upUpward direction of the object; usually [0, 1, 0].

Definition at line 2063 of file Matrix.cs.

static void VRageMath.Matrix.CreateWorld ( ref Vector3  position,
ref Vector3  forward,
ref Vector3  up,
out Matrix  result 
)
inlinestatic

Creates a world matrix with the specified parameters.

Parameters
positionPosition of the object. This value is used in translation operations.
forwardForward direction of the object.
upUpward direction of the object; usually [0, 1, 0].
result[OutAttribute] The created world matrix.

Definition at line 2092 of file Matrix.cs.

float VRageMath.Matrix.Determinant ( )
inline

Calculates the determinant of the matrix.

Definition at line 2776 of file Matrix.cs.

static Matrix VRageMath.Matrix.Divide ( Matrix  matrix1,
Matrix  matrix2 
)
inlinestatic

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

Parameters
matrix1Source matrix.
matrix2The divisor.

Definition at line 3379 of file Matrix.cs.

static void VRageMath.Matrix.Divide ( ref Matrix  matrix1,
ref Matrix  matrix2,
out Matrix  result 
)
inlinestatic

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

Parameters
matrix1Source matrix.
matrix2The divisor.
result[OutAttribute] Result of the division.

Definition at line 3405 of file Matrix.cs.

static Matrix VRageMath.Matrix.Divide ( Matrix  matrix1,
float  divider 
)
inlinestatic

Divides the components of a matrix by a scalar.

Parameters
matrix1Source matrix.
dividerThe divisor.

Definition at line 3429 of file Matrix.cs.

static void VRageMath.Matrix.Divide ( ref Matrix  matrix1,
float  divider,
out Matrix  result 
)
inlinestatic

Divides the components of a matrix by a scalar.

Parameters
matrix1Source matrix.
dividerThe divisor.
result[OutAttribute] Result of the division.

Definition at line 3456 of file Matrix.cs.

bool VRageMath.Matrix.Equals ( Matrix  other)
inline

Determines whether the specified Object is equal to the Matrix.

Parameters
otherThe Object to compare with the current Matrix.

Definition at line 2637 of file Matrix.cs.

override bool VRageMath.Matrix.Equals ( object  obj)
inline

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

Parameters
objObject with which to make the comparison.

Definition at line 2670 of file Matrix.cs.

bool VRageMath.Matrix.EqualsFast ( ref Matrix  other,
float  epsilon = 0.0001f 
)
inline

Compares just position, forward and up

Definition at line 2648 of file Matrix.cs.

Base6Directions.Direction VRageMath.Matrix.GetClosestDirection ( Vector3  referenceVector)
inline

Definition at line 361 of file Matrix.cs.

Base6Directions.Direction VRageMath.Matrix.GetClosestDirection ( ref Vector3  referenceVector)
inline

Definition at line 366 of file Matrix.cs.

Vector3 VRageMath.Matrix.GetDirectionVector ( Base6Directions.Direction  direction)
inline

Gets the base vector of the matrix, corresponding to the given direction

Definition at line 308 of file Matrix.cs.

static bool VRageMath.Matrix.GetEulerAnglesXYZ ( ref Matrix  mat,
out Vector3  xyz 
)
inlinestatic

Definition at line 3703 of file Matrix.cs.

override int VRageMath.Matrix.GetHashCode ( )
inline

Gets the hash code of this object.

Definition at line 2681 of file Matrix.cs.

Matrix VRageMath.Matrix.GetOrientation ( )
inline

Gets the orientation.

Returns

Definition at line 3481 of file Matrix.cs.

Vector4 VRageMath.Matrix.GetRow ( int  row)
inline

Definition at line 2573 of file Matrix.cs.

bool VRageMath.Matrix.HasNoTranslationOrPerspective ( )
inline

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.

Definition at line 3526 of file Matrix.cs.

static Matrix VRageMath.Matrix.Invert ( Matrix  matrix)
inlinestatic

Calculates the inverse of a matrix.

Parameters
matrixSource matrix.

Definition at line 2807 of file Matrix.cs.

static Matrix VRageMath.Matrix.Invert ( ref Matrix  matrix)
inlinestatic

Definition at line 2812 of file Matrix.cs.

static void VRageMath.Matrix.Invert ( ref Matrix  matrix,
out Matrix  result 
)
inlinestatic

Calculates the inverse of a matrix.

Parameters
matrixThe source matrix.
result[OutAttribute] The inverse of matrix. The same matrix can be used for both arguments.

Definition at line 2877 of file Matrix.cs.

bool VRageMath.Matrix.IsMirrored ( )
inline

Definition at line 3772 of file Matrix.cs.

bool VRageMath.Matrix.IsNan ( )
inline

Definition at line 3501 of file Matrix.cs.

bool VRageMath.Matrix.IsRotation ( )
inline

Definition at line 3506 of file Matrix.cs.

bool VRageMath.Matrix.IsValid ( )
inline

Definition at line 3496 of file Matrix.cs.

static Matrix VRageMath.Matrix.Lerp ( Matrix  matrix1,
Matrix  matrix2,
float  amount 
)
inlinestatic

Linearly interpolates between the corresponding values of two matrices.

Parameters
matrix1Source matrix.
matrix2Source matrix.
amountInterpolation value.

Definition at line 2940 of file Matrix.cs.

static void VRageMath.Matrix.Lerp ( ref Matrix  matrix1,
ref Matrix  matrix2,
float  amount,
out Matrix  result 
)
inlinestatic

Linearly interpolates between the corresponding values of two matrices.

Parameters
matrix1Source matrix.
matrix2Source matrix.
amountInterpolation value.
result[OutAttribute] Resulting matrix.

Definition at line 2966 of file Matrix.cs.

static Matrix VRageMath.Matrix.Multiply ( Matrix  matrix1,
Matrix  matrix2 
)
inlinestatic

Multiplies a matrix by another matrix.

Parameters
matrix1Source matrix.
matrix2Source matrix.

Definition at line 3229 of file Matrix.cs.

static void VRageMath.Matrix.Multiply ( ref Matrix  matrix1,
ref Matrix  matrix2,
out Matrix  result 
)
inlinestatic

Native Interop Function

Multiplies a matrix by another matrix.

Parameters
matrix1Source matrix.
matrix2Source matrix.
result[OutAttribute] Result of the multiplication.

Definition at line 3283 of file Matrix.cs.

static Matrix VRageMath.Matrix.Multiply ( Matrix  matrix1,
float  scaleFactor 
)
inlinestatic

Multiplies a matrix by a scalar value.

Parameters
matrix1Source matrix.
scaleFactorScalar value.

Definition at line 3327 of file Matrix.cs.

static void VRageMath.Matrix.Multiply ( ref Matrix  matrix1,
float  scaleFactor,
out Matrix  result 
)
inlinestatic

Multiplies a matrix by a scalar value.

Parameters
matrix1Source matrix.
scaleFactorScalar value.
result[OutAttribute] The result of the multiplication.

Definition at line 3354 of file Matrix.cs.

static Matrix VRageMath.Matrix.Negate ( Matrix  matrix)
inlinestatic

Negates individual elements of a matrix.

Parameters
matrixSource matrix.

Definition at line 3079 of file Matrix.cs.

static void VRageMath.Matrix.Negate ( ref Matrix  matrix,
out Matrix  result 
)
inlinestatic

Negates individual elements of a matrix.

Parameters
matrixSource matrix.
result[OutAttribute] Negated matrix.

Definition at line 3105 of file Matrix.cs.

static Matrix VRageMath.Matrix.Normalize ( Matrix  matrix)
inlinestatic

Definition at line 3572 of file Matrix.cs.

static bool VRageMath.Matrix.operator!= ( Matrix  matrix1,
Matrix  matrix2 
)
inlinestatic

Tests a matrix for inequality with another matrix.

Parameters
matrix1The matrix on the left of the equal sign.
matrix2The matrix on the right of the equal sign.

Definition at line 610 of file Matrix.cs.

static Matrix VRageMath.Matrix.operator* ( Matrix  matrix1,
Matrix  matrix2 
)
inlinestatic

Multiplies a matrix by another matrix.

Parameters
matrix1Source matrix.
matrix2Source matrix.

Definition at line 674 of file Matrix.cs.

static Matrix VRageMath.Matrix.operator* ( Matrix  matrix,
float  scaleFactor 
)
inlinestatic

Multiplies a matrix by a scalar value.

Parameters
matrixSource matrix.
scaleFactorScalar value.

Definition at line 706 of file Matrix.cs.

static Matrix VRageMath.Matrix.operator* ( float  scaleFactor,
Matrix  matrix 
)
inlinestatic

Multiplies a matrix by a scalar value.

Parameters
scaleFactorScalar value.
matrixSource matrix.

Definition at line 733 of file Matrix.cs.

static Matrix VRageMath.Matrix.operator+ ( Matrix  matrix1,
Matrix  matrix2 
)
inlinestatic

Adds a matrix to another matrix.

Parameters
matrix1Source matrix.
matrix2Source matrix.

Definition at line 622 of file Matrix.cs.

static Matrix VRageMath.Matrix.operator- ( Matrix  matrix1)
inlinestatic

Negates individual elements of a matrix.

Parameters
matrix1Source matrix.

Definition at line 572 of file Matrix.cs.

static Matrix VRageMath.Matrix.operator- ( Matrix  matrix1,
Matrix  matrix2 
)
inlinestatic

Subtracts matrices.

Parameters
matrix1Source matrix.
matrix2Source matrix.

Definition at line 648 of file Matrix.cs.

static Matrix VRageMath.Matrix.operator/ ( Matrix  matrix1,
Matrix  matrix2 
)
inlinestatic

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

Parameters
matrix1Source matrix.
matrix2The divisor.

Definition at line 760 of file Matrix.cs.

static Matrix VRageMath.Matrix.operator/ ( Matrix  matrix1,
float  divider 
)
inlinestatic

Divides the components of a matrix by a scalar.

Parameters
matrix1Source matrix.
dividerThe divisor.

Definition at line 786 of file Matrix.cs.

static bool VRageMath.Matrix.operator== ( Matrix  matrix1,
Matrix  matrix2 
)
inlinestatic

Compares a matrix for equality with another matrix.

Parameters
matrix1Source matrix.
matrix2Source matrix.

Definition at line 598 of file Matrix.cs.

static Matrix VRageMath.Matrix.Orthogonalize ( Matrix  rotationMatrix)
inlinestatic

Definition at line 3582 of file Matrix.cs.

static void VRageMath.Matrix.Rescale ( ref Matrix  matrix,
float  scale 
)
inlinestatic

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

Definition at line 426 of file Matrix.cs.

static void VRageMath.Matrix.Rescale ( ref Matrix  matrix,
ref Vector3  scale 
)
inlinestatic

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

Definition at line 445 of file Matrix.cs.

static Matrix VRageMath.Matrix.Rescale ( Matrix  matrix,
float  scale 
)
inlinestatic

Definition at line 461 of file Matrix.cs.

static Matrix VRageMath.Matrix.Rescale ( Matrix  matrix,
Vector3  scale 
)
inlinestatic

Definition at line 468 of file Matrix.cs.

static Matrix VRageMath.Matrix.Round ( ref Matrix  matrix)
inlinestatic

Definition at line 3596 of file Matrix.cs.

void VRageMath.Matrix.SetDirectionVector ( Base6Directions.Direction  direction,
Vector3  newValue 
)
inline

Sets the base vector of the matrix, corresponding to the given direction

Definition at line 333 of file Matrix.cs.

void VRageMath.Matrix.SetRow ( int  row,
Vector4  value 
)
inline

Definition at line 2585 of file Matrix.cs.

static void VRageMath.Matrix.Slerp ( ref Matrix  matrix1,
ref Matrix  matrix2,
float  amount,
out Matrix  result 
)
inlinestatic

Performs spherical linear interpolation of position and rotation.

Definition at line 2989 of file Matrix.cs.

static void VRageMath.Matrix.Slerp ( Matrix  matrix1,
Matrix  matrix2,
float  amount,
out Matrix  result 
)
inlinestatic

Performs spherical linear interpolation of position and rotation.

Definition at line 3041 of file Matrix.cs.

static Matrix VRageMath.Matrix.Slerp ( Matrix  matrix1,
Matrix  matrix2,
float  amount 
)
inlinestatic

Performs spherical linear interpolation of position and rotation.

Definition at line 3049 of file Matrix.cs.

static void VRageMath.Matrix.SlerpScale ( ref Matrix  matrix1,
ref Matrix  matrix2,
float  amount,
out Matrix  result 
)
inlinestatic

Performs spherical linear interpolation of position and rotation and scale.

Definition at line 3007 of file Matrix.cs.

static void VRageMath.Matrix.SlerpScale ( Matrix  matrix1,
Matrix  matrix2,
float  amount,
out Matrix  result 
)
inlinestatic

Performs spherical linear interpolation of position and rotation and scale.

Definition at line 3059 of file Matrix.cs.

static Matrix VRageMath.Matrix.SlerpScale ( Matrix  matrix1,
Matrix  matrix2,
float  amount 
)
inlinestatic

Performs spherical linear interpolation of position and rotation and scale.

Definition at line 3067 of file Matrix.cs.

static Matrix VRageMath.Matrix.Subtract ( Matrix  matrix1,
Matrix  matrix2 
)
inlinestatic

Subtracts matrices.

Parameters
matrix1Source matrix.
matrix2Source matrix.

Definition at line 3179 of file Matrix.cs.

static void VRageMath.Matrix.Subtract ( ref Matrix  matrix1,
ref Matrix  matrix2,
out Matrix  result 
)
inlinestatic

Subtracts matrices.

Parameters
matrix1Source matrix.
matrix2Source matrix.
result[OutAttribute] Result of the subtraction.

Definition at line 3205 of file Matrix.cs.

static Matrix VRageMath.Matrix.SwapYZCoordinates ( Matrix  m)
inlinestatic

Definition at line 3767 of file Matrix.cs.

override string VRageMath.Matrix.ToString ( )
inline

Retrieves a string representation of the current object.

Definition at line 2627 of file Matrix.cs.

static Matrix VRageMath.Matrix.Transform ( Matrix  value,
Quaternion  rotation 
)
inlinestatic

Transforms a Matrix by applying a Quaternion rotation.

Parameters
valueThe Matrix to transform.
rotationThe rotation to apply, expressed as a Quaternion.

Definition at line 2469 of file Matrix.cs.

static void VRageMath.Matrix.Transform ( ref Matrix  value,
ref Quaternion  rotation,
out Matrix  result 
)
inlinestatic

Transforms a Matrix by applying a Quaternion rotation.

Parameters
valueThe Matrix to transform.
rotationThe rotation to apply, expressed as a Quaternion.
result[OutAttribute] An existing Matrix filled in with the result of the transform.

Definition at line 2516 of file Matrix.cs.

static Matrix VRageMath.Matrix.Transpose ( Matrix  matrix)
inlinestatic

Transposes the rows and columns of a matrix.

Parameters
matrixSource matrix.

Definition at line 2690 of file Matrix.cs.

static void VRageMath.Matrix.Transpose ( ref Matrix  matrix,
out Matrix  result 
)
inlinestatic

Transposes the rows and columns of a matrix.

Parameters
matrixSource matrix.
result[OutAttribute] Transposed matrix.

Definition at line 2716 of file Matrix.cs.

void VRageMath.Matrix.TransposeRotationInPlace ( )
inline

Transposes the rows and columns of a matrix that is assumed to be rotation only in place.

Parameters
matrixSource matrix.

Definition at line 2756 of file Matrix.cs.

Member Data Documentation

Matrix VRageMath.Matrix.Identity = new Matrix(1f, 0.0f, 0.0f, 0.0f, 0.0f, 1f, 0.0f, 0.0f, 0.0f, 0.0f, 1f, 0.0f, 0.0f, 0.0f, 0.0f, 1f)
static

Definition at line 35 of file Matrix.cs.

float VRageMath.Matrix.M11

Value at row 1 column 1 of the matrix.

Definition at line 52 of file Matrix.cs.

float VRageMath.Matrix.M12

Value at row 1 column 2 of the matrix.

Definition at line 58 of file Matrix.cs.

float VRageMath.Matrix.M13

Value at row 1 column 3 of the matrix.

Definition at line 64 of file Matrix.cs.

float VRageMath.Matrix.M14

Value at row 1 column 4 of the matrix.

Definition at line 70 of file Matrix.cs.

float VRageMath.Matrix.M21

Value at row 2 column 1 of the matrix.

Definition at line 76 of file Matrix.cs.

float VRageMath.Matrix.M22

Value at row 2 column 2 of the matrix.

Definition at line 82 of file Matrix.cs.

float VRageMath.Matrix.M23

Value at row 2 column 3 of the matrix.

Definition at line 88 of file Matrix.cs.

float VRageMath.Matrix.M24

Value at row 2 column 4 of the matrix.

Definition at line 94 of file Matrix.cs.

float VRageMath.Matrix.M31

Value at row 3 column 1 of the matrix.

Definition at line 100 of file Matrix.cs.

float VRageMath.Matrix.M32

Value at row 3 column 2 of the matrix.

Definition at line 106 of file Matrix.cs.

float VRageMath.Matrix.M33

Value at row 3 column 3 of the matrix.

Definition at line 112 of file Matrix.cs.

float VRageMath.Matrix.M34

Value at row 3 column 4 of the matrix.

Definition at line 118 of file Matrix.cs.

float VRageMath.Matrix.M41

Value at row 4 column 1 of the matrix.

Definition at line 124 of file Matrix.cs.

float VRageMath.Matrix.M42

Value at row 4 column 2 of the matrix.

Definition at line 130 of file Matrix.cs.

float VRageMath.Matrix.M43

Value at row 4 column 3 of the matrix.

Definition at line 136 of file Matrix.cs.

float VRageMath.Matrix.M44

Value at row 4 column 4 of the matrix.

Definition at line 142 of file Matrix.cs.

Matrix VRageMath.Matrix.Zero = new Matrix(0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0)
static

Definition at line 36 of file Matrix.cs.

Property Documentation

Vector3 VRageMath.Matrix.Backward
getset

Gets and sets the backward vector of the Matrix.

Definition at line 288 of file Matrix.cs.

Vector3 VRageMath.Matrix.Col0
get

Definition at line 208 of file Matrix.cs.

Vector3 VRageMath.Matrix.Col1
get

Definition at line 220 of file Matrix.cs.

Vector3 VRageMath.Matrix.Col2
get

Definition at line 232 of file Matrix.cs.

Vector3 VRageMath.Matrix.Down
getset

Gets and sets the down vector of the Matrix.

Definition at line 169 of file Matrix.cs.

Vector3 VRageMath.Matrix.Forward
getset

Gets and sets the forward vector of the Matrix.

Definition at line 267 of file Matrix.cs.

Vector3 VRageMath.Matrix.Left
getset

Gets and sets the left vector of the Matrix.

Definition at line 246 of file Matrix.cs.

Vector3 VRageMath.Matrix.Right
getset

Gets and sets the right vector of the Matrix.

Definition at line 190 of file Matrix.cs.

Vector3 VRageMath.Matrix.Scale
get

Definition at line 414 of file Matrix.cs.

float VRageMath.Matrix.this[int row, int column]
getset

Definition at line 2601 of file Matrix.cs.

Vector3 VRageMath.Matrix.Translation
getset

Gets and sets the translation vector of the Matrix.

Definition at line 478 of file Matrix.cs.

Vector3 VRageMath.Matrix.Up
getset

Gets and sets the up vector of the Matrix.

Definition at line 148 of file Matrix.cs.


The documentation for this struct was generated from the following file: