[]
        
(Showing Draft Content)

GrapeCity.Documents.DX.Matrix4x4

Struct Matrix4x4

Namespace
GrapeCity.Documents.DX
Assembly
GcDocs.DX.Windows.dll

Represents a 4x4 mathematical matrix.

public struct Matrix4x4 : IEquatable<Matrix4x4>, IFormattable
Implements
System.IEquatable<T><Matrix4x4>
System.IFormattable
Inherited Members
object.Equals(object, object)
object.ReferenceEquals(object, object)
object.GetType()

Constructors

Matrix4x4(float, float, float, float, float, float, float, float, float, float, float, float, float, float, float, float)

Initializes a new instance of the Matrix4x4 struct.

public Matrix4x4(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)

Parameters

M11 float

The value to assign at row 1 column 1 of the matrix.

M12 float

The value to assign at row 1 column 2 of the matrix.

M13 float

The value to assign at row 1 column 3 of the matrix.

M14 float

The value to assign at row 1 column 4 of the matrix.

M21 float

The value to assign at row 2 column 1 of the matrix.

M22 float

The value to assign at row 2 column 2 of the matrix.

M23 float

The value to assign at row 2 column 3 of the matrix.

M24 float

The value to assign at row 2 column 4 of the matrix.

M31 float

The value to assign at row 3 column 1 of the matrix.

M32 float

The value to assign at row 3 column 2 of the matrix.

M33 float

The value to assign at row 3 column 3 of the matrix.

M34 float

The value to assign at row 3 column 4 of the matrix.

M41 float

The value to assign at row 4 column 1 of the matrix.

M42 float

The value to assign at row 4 column 2 of the matrix.

M43 float

The value to assign at row 4 column 3 of the matrix.

M44 float

The value to assign at row 4 column 4 of the matrix.

Matrix4x4(float)

Initializes a new instance of the Matrix4x4 struct.

public Matrix4x4(float value)

Parameters

value float

The value that will be assigned to all components.

Matrix4x4(float[])

Initializes a new instance of the Matrix4x4 struct.

public Matrix4x4(float[] values)

Parameters

values float[]

The values to assign to the components of the matrix. This must be an array with sixteen elements.

Exceptions

System.ArgumentNullException

Thrown when values is null.

System.ArgumentOutOfRangeException

Thrown when values contains more or less than sixteen elements.

Fields

Identity

The identity Matrix4x4.

public static readonly Matrix4x4 Identity

Field Value

Matrix4x4

M11

Value at row 1 column 1 of the matrix.

public float M11

Field Value

float

M12

Value at row 1 column 2 of the matrix.

public float M12

Field Value

float

M13

Value at row 1 column 3 of the matrix.

public float M13

Field Value

float

M14

Value at row 1 column 4 of the matrix.

public float M14

Field Value

float

M21

Value at row 2 column 1 of the matrix.

public float M21

Field Value

float

M22

Value at row 2 column 2 of the matrix.

public float M22

Field Value

float

M23

Value at row 2 column 3 of the matrix.

public float M23

Field Value

float

M24

Value at row 2 column 4 of the matrix.

public float M24

Field Value

float

M31

Value at row 3 column 1 of the matrix.

public float M31

Field Value

float

M32

Value at row 3 column 2 of the matrix.

public float M32

Field Value

float

M33

Value at row 3 column 3 of the matrix.

public float M33

Field Value

float

M34

Value at row 3 column 4 of the matrix.

public float M34

Field Value

float

M41

Value at row 4 column 1 of the matrix.

public float M41

Field Value

float

M42

Value at row 4 column 2 of the matrix.

public float M42

Field Value

float

M43

Value at row 4 column 3 of the matrix.

public float M43

Field Value

float

M44

Value at row 4 column 4 of the matrix.

public float M44

Field Value

float

SizeInBytes

The size of the Matrix4x4 type, in bytes.

public const int SizeInBytes = 64

Field Value

int

Zero

A Matrix4x4 with all of its components set to zero.

public static readonly Matrix4x4 Zero

Field Value

Matrix4x4

Properties

Column1

Gets or sets the first column in the matrix; that is M11, M21, M31, and M41.

public Vector4 Column1 { get; set; }

Property Value

Vector4

Column2

Gets or sets the second column in the matrix; that is M12, M22, M32, and M42.

public Vector4 Column2 { get; set; }

Property Value

Vector4

Column3

Gets or sets the third column in the matrix; that is M13, M23, M33, and M43.

public Vector4 Column3 { get; set; }

Property Value

Vector4

Column4

Gets or sets the fourth column in the matrix; that is M14, M24, M34, and M44.

public Vector4 Column4 { get; set; }

Property Value

Vector4

Determinant

Calculates the determinant of the matrix.

public float Determinant { get; }

Property Value

float

The determinant of the matrix.

IsIdentity

Gets a value indicating whether this instance is an identity matrix.

public bool IsIdentity { get; }

Property Value

bool

true if this instance is an identity matrix; otherwise, false.

this[int, int]

Gets or sets the component at the specified index.

public float this[int row, int column] { get; set; }

Parameters

row int

The row of the matrix to access.

column int

The column of the matrix to access.

Property Value

float

The value of the matrix component, depending on the index.

Exceptions

System.ArgumentOutOfRangeException

Thrown when the row or columnis out of the range [0, 3].

this[int]

Gets or sets the component at the specified index.

public float this[int index] { get; set; }

Parameters

index int

The zero-based index of the component to access.

Property Value

float

The value of the matrix component, depending on the index.

Exceptions

System.ArgumentOutOfRangeException

Thrown when the index is out of the range [0, 15].

Row1

Gets or sets the first row in the matrix; that is M11, M12, M13, and M14.

public Vector4 Row1 { get; set; }

Property Value

Vector4

Row2

Gets or sets the second row in the matrix; that is M21, M22, M23, and M24.

public Vector4 Row2 { get; set; }

Property Value

Vector4

Row3

Gets or sets the third row in the matrix; that is M31, M32, M33, and M34.

public Vector4 Row3 { get; set; }

Property Value

Vector4

Row4

Gets or sets the fourth row in the matrix; that is M41, M42, M43, and M44.

public Vector4 Row4 { get; set; }

Property Value

Vector4

ScaleVector

Gets or sets the scale of the matrix; that is M11, M22, and M33.

public Vector3 ScaleVector { get; set; }

Property Value

Vector3

TranslationVector

Gets or sets the translation of the matrix; that is M41, M42, and M43.

public Vector3 TranslationVector { get; set; }

Property Value

Vector3

Methods

Add(in Matrix4x4, in Matrix4x4)

Determines the sum of two matrices.

public static Matrix4x4 Add(in Matrix4x4 left, in Matrix4x4 right)

Parameters

left Matrix4x4

The first matrix to add.

right Matrix4x4

The second matrix to add.

Returns

Matrix4x4

The sum of the two matrices.

Billboard(Vector3, Vector3, Vector3, Vector3)

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

public static Matrix4x4 Billboard(Vector3 objectPosition, Vector3 cameraPosition, Vector3 cameraUpVector, Vector3 cameraForwardVector)

Parameters

objectPosition Vector3

The position of the object that the billboard will rotate around.

cameraPosition Vector3

The position of the camera.

cameraUpVector Vector3

The up vector of the camera.

cameraForwardVector Vector3

The forward vector of the camera.

Returns

Matrix4x4

The created billboard.

ConstrainedBillboard(Vector3, Vector3, Vector3, Vector3, Vector3)

Creates a cylindrical billboard that rotates around a specified axis.

public static Matrix4x4 ConstrainedBillboard(Vector3 objectPosition, Vector3 cameraPosition, Vector3 rotateAxis, Vector3 cameraForwardVector, Vector3 objectForwardVector)

Parameters

objectPosition Vector3

The position of the object that the billboard will rotate around.

cameraPosition Vector3

The position of the camera.

rotateAxis Vector3

The axis to rotate the billboard around.

cameraForwardVector Vector3

The forward vector of the camera.

objectForwardVector Vector3

The forward vector of the object.

Returns

Matrix4x4

The billboard matrix.

Divide(in Matrix4x4, float)

Divides a matrix by the given value.

public static Matrix4x4 Divide(in Matrix4x4 left, float right)

Parameters

left Matrix4x4

The matrix to divides.

right float

The amount by which to divides.

Returns

Matrix4x4

The resulting matrix.

Equals(Matrix4x4)

Determines whether the specified Matrix4x4 is equal to this instance.

public bool Equals(Matrix4x4 other)

Parameters

other Matrix4x4

Returns

bool

Equals(in Matrix4x4, in Matrix4x4)

Determines whether two instances of Matrix4x4 are equal.

public static bool Equals(in Matrix4x4 left, in Matrix4x4 right)

Parameters

left Matrix4x4
right Matrix4x4

Returns

bool

Equals(object)

Determines whether the specified object is equal to this instance.

public override bool Equals(object value)

Parameters

value object

Returns

bool

ExchangeColumns(int, int)

Exchanges two columns in the matrix.

public void ExchangeColumns(int firstColumn, int secondColumn)

Parameters

firstColumn int

The first column to exchange. This is an index of the column starting at zero.

secondColumn int

The second column to exchange. This is an index of the column starting at zero.

ExchangeRows(int, int)

Exchanges two rows in the matrix.

public void ExchangeRows(int firstRow, int secondRow)

Parameters

firstRow int

The first row to exchange. This is an index of the row starting at zero.

secondRow int

The second row to exchange. This is an index of the row starting at zero.

GetHashCode()

Returns a hash code for this instance.

public override int GetHashCode()

Returns

int

A hash code for this instance, suitable for use in hashing algorithms and data structures like a hash table.

HadamardDivide(in Matrix4x4, in Matrix4x4)

Element-wise division of two matrices.

public static Matrix4x4 HadamardDivide(in Matrix4x4 left, in Matrix4x4 right)

Parameters

left Matrix4x4

The first matrix.

right Matrix4x4

The second matrix.

Returns

Matrix4x4

The result of division of the two matrices.

HadamardProduct(in Matrix4x4, in Matrix4x4)

Determines the Hadamard (element-wise) product of two matrices.

public static Matrix4x4 HadamardProduct(in Matrix4x4 left, in Matrix4x4 right)

Parameters

left Matrix4x4

The first matrix to multiply.

right Matrix4x4

The second matrix to multiply.

Returns

Matrix4x4

The Hadamard (element-wise) product of the two matrices.

Invert(in Matrix4x4)

Calculates the inverse of the specified matrix.

public static Matrix4x4 Invert(in Matrix4x4 value)

Parameters

value Matrix4x4

The matrix whose inverse is to be calculated.

Returns

Matrix4x4

The inverse of the specified matrix.

Lerp(in Matrix4x4, in Matrix4x4, float)

Performs a linear interpolation between two matrices based on the given weighting.

public static Matrix4x4 Lerp(in Matrix4x4 matrix1, in Matrix4x4 matrix2, float amount)

Parameters

matrix1 Matrix4x4

The first matrix.

matrix2 Matrix4x4

The second matrix.

amount float

A value between 0 and 1 that indicates the weight of matrix2.

Returns

Matrix4x4

The interpolated matrix.

LookAt(Vector3, Vector3, Vector3)

Creates a view matrix.

public static Matrix4x4 LookAt(Vector3 cameraPosition, Vector3 cameraTarget, Vector3 cameraUpVector)

Parameters

cameraPosition Vector3

The position of the camera.

cameraTarget Vector3

The target towards which the camera is pointing.

cameraUpVector Vector3

The direction that is "up" from the camera's point of view.

Returns

Matrix4x4

The view matrix.

Multiply(in Matrix4x4, in Matrix4x4)

Determines the product of two matrices.

public static Matrix4x4 Multiply(in Matrix4x4 left, in Matrix4x4 right)

Parameters

left Matrix4x4

The first matrix to multiply.

right Matrix4x4

The second matrix to multiply.

Returns

Matrix4x4

The product of the two matrices.

Multiply(in Matrix4x4, float)

Scales a matrix by the given value.

public static Matrix4x4 Multiply(in Matrix4x4 left, float right)

Parameters

left Matrix4x4

The matrix to scale.

right float

The amount by which to scale.

Returns

Matrix4x4

The scaled matrix.

Negate(in Matrix4x4)

Negates a matrix.

public static Matrix4x4 Negate(in Matrix4x4 value)

Parameters

value Matrix4x4

The matrix to be negated.

Returns

Matrix4x4

The negated matrix.

NegateRef(ref Matrix4x4)

Negates a matrix.

public static void NegateRef(ref Matrix4x4 value)

Parameters

value Matrix4x4

The matrix to be negated.

Orthographic(float, float, float, float)

Creates an orthographic perspective matrix from the given view volume dimensions.

public static Matrix4x4 Orthographic(float width, float height, float zNearPlane, float zFarPlane)

Parameters

width float

The width of the view volume.

height float

The height of the view volume.

zNearPlane float

The minimum Z-value of the view volume.

zFarPlane float

The maximum Z-value of the view volume.

Returns

Matrix4x4

The orthographic projection matrix.

OrthographicOffCenter(float, float, float, float, float, float)

Creates a customized orthographic projection matrix.

public static Matrix4x4 OrthographicOffCenter(float left, float right, float bottom, float top, float zNearPlane, float zFarPlane)

Parameters

left float

The minimum X-value of the view volume.

right float

The maximum X-value of the view volume.

bottom float

The minimum Y-value of the view volume.

top float

The maximum Y-value of the view volume.

zNearPlane float

The minimum Z-value of the view volume.

zFarPlane float

The maximum Z-value of the view volume.

Returns

Matrix4x4

The orthographic projection matrix.

Perspective(float, float, float, float)

Creates a perspective projection matrix from the given view volume dimensions.

public static Matrix4x4 Perspective(float width, float height, float nearPlaneDistance, float farPlaneDistance)

Parameters

width float

The width of the view volume at the near view plane.

height float

The height of the view volume at the near view plane.

nearPlaneDistance float

The distance to the near view plane.

farPlaneDistance float

The distance to the far view plane.

Returns

Matrix4x4

The perspective projection matrix.

PerspectiveFieldOfView(float, float, float, float)

Creates a perspective projection matrix based on a field of view, aspect ratio, and near and far view plane distances.

public static Matrix4x4 PerspectiveFieldOfView(float fieldOfView, float aspectRatio, float nearPlaneDistance, float farPlaneDistance)

Parameters

fieldOfView float

The field of view in the y direction, in radians.

aspectRatio float

The aspect ratio, defined as view space width divided by height.

nearPlaneDistance float

The distance to the near view plane.

farPlaneDistance float

The distance to the far view plane.

Returns

Matrix4x4

The perspective projection matrix.

PerspectiveOffCenter(float, float, float, float, float, float)

Creates a customized perspective projection matrix.

public static Matrix4x4 PerspectiveOffCenter(float left, float right, float bottom, float top, float nearPlaneDistance, float farPlaneDistance)

Parameters

left float

The minimum x-value of the view volume at the near view plane.

right float

The maximum x-value of the view volume at the near view plane.

bottom float

The minimum y-value of the view volume at the near view plane.

top float

The maximum y-value of the view volume at the near view plane.

nearPlaneDistance float

The distance to the near view plane.

farPlaneDistance float

The distance to the far view plane.

Returns

Matrix4x4

The perspective projection matrix.

Reflection(Vector3, float)

Creates a matrix that reflects the coordinate system about a specified plane.

public static Matrix4x4 Reflection(Vector3 normal, float d)

Parameters

normal Vector3

The plane's normal vector.

d float

The plane's distance from the origin along its normal vector.

Returns

Matrix4x4

A new matrix expressing the reflection.

RotationAxis(Vector3, float)

Creates a matrix that rotates around an arbitary axis.

public static Matrix4x4 RotationAxis(Vector3 axis, float radians)

Parameters

axis Vector3

The axis around which to rotate. This parameter is assumed to be normalized.

radians float

Angle of rotation, in radians. Angles are measured clockwise when looking along the rotation axis toward the origin.

Returns

Matrix4x4

The created rotation matrix.

RotationX(float, Vector3)

Creates a matrix for rotating points around the X axis from a center point.

public static Matrix4x4 RotationX(float radians, Vector3 centerPoint)

Parameters

radians float

The amount, in radians, by which to rotate around the X axis.

centerPoint Vector3

The center point.

Returns

Matrix4x4

The rotation matrix.

RotationX(float)

Creates a matrix that rotates around the x-axis.

public static Matrix4x4 RotationX(float radians)

Parameters

radians float

Angle of rotation in radians. Angles are measured clockwise when looking along the rotation axis toward the origin.

Returns

Matrix4x4

The created rotation matrix.

RotationY(float, Vector3)

Creates a matrix that rotates around the y-axis.

public static Matrix4x4 RotationY(float radians, Vector3 centerPoint)

Parameters

radians float

Angle of rotation in radians. Angles are measured clockwise when looking along the rotation axis toward the origin.

centerPoint Vector3

The center point.

Returns

Matrix4x4

The created rotation matrix.

RotationY(float)

Creates a matrix that rotates around the y-axis.

public static Matrix4x4 RotationY(float radians)

Parameters

radians float

Angle of rotation in radians. Angles are measured clockwise when looking along the rotation axis toward the origin.

Returns

Matrix4x4

The created rotation matrix.

RotationZ(float, Vector3)

Creates a matrix that rotates around the z-axis.

public static Matrix4x4 RotationZ(float radians, Vector3 centerPoint)

Parameters

radians float

Angle of rotation in radians. Angles are measured clockwise when looking along the rotation axis toward the origin.

centerPoint Vector3

The center point.

Returns

Matrix4x4

The created rotation matrix.

RotationZ(float)

Creates a matrix that rotates around the z-axis.

public static Matrix4x4 RotationZ(float radians)

Parameters

radians float

Angle of rotation in radians. Angles are measured clockwise when looking along the rotation axis toward the origin.

Returns

Matrix4x4

The created rotation matrix.

Scale(Vector3)

Creates a matrix that scales along the x-axis, y-axis, and y-axis.

public static Matrix4x4 Scale(Vector3 scale)

Parameters

scale Vector3

Scaling factor for all three axes.

Returns

Matrix4x4

The created scaling matrix.

Scale(float, float, float)

Creates a matrix that scales along the x-axis, y-axis, and y-axis.

public static Matrix4x4 Scale(float xScale, float yScale, float zScale)

Parameters

xScale float

Scaling factor that is applied along the x-axis.

yScale float

Scaling factor that is applied along the y-axis.

zScale float

Scaling factor that is applied along the z-axis.

Returns

Matrix4x4

The created scaling matrix.

Scale(float)

Creates a matrix that uniformally scales along all three axis.

public static Matrix4x4 Scale(float scale)

Parameters

scale float

The uniform scale that is applied along all axis.

Returns

Matrix4x4

The created scaling matrix.

Shadow(Vector3, Vector3, float)

Creates a matrix that flattens geometry into a specified plane as if casting a shadow from a specified light source.

public static Matrix4x4 Shadow(Vector3 lightDirection, Vector3 normal, float d)

Parameters

lightDirection Vector3

The direction from which the light that will cast the shadow is coming.

normal Vector3

The plane's normal vector.

d float

The plane's distance from the origin along its normal vector.

Returns

Matrix4x4

A new matrix that can be used to flatten geometry onto the specified plane from the specified direction.

Skew(Vector3, Vector3, float)

Creates a skew/shear matrix by means of a translation vector, a rotation vector, and a rotation angle.

public static Matrix4x4 Skew(Vector3 transVec, Vector3 rotationVec, float radians)

Parameters

transVec Vector3

The translation vector

rotationVec Vector3

The rotation vector

radians float

The rotation angle, in radians.

Returns

Matrix4x4

The created skew/shear matrix.

Remarks

Shearing is performed in the direction of translation vector, where translation vector and rotation vector define the shearing plane. The effect is such that the skewed rotation vector has the specified angle with rotation itself.

Subtract(in Matrix4x4, in Matrix4x4)

Determines the difference between two matrices.

public static Matrix4x4 Subtract(in Matrix4x4 left, in Matrix4x4 right)

Parameters

left Matrix4x4

The first matrix to subtract.

right Matrix4x4

The second matrix to subtract.

Returns

Matrix4x4

The difference between the two matrices.

ToArray()

Creates an array containing the elements of the matrix.

public float[] ToArray()

Returns

float[]

A sixteen-element array containing the components of the matrix.

ToString()

Returns a string that represents the current object.

public override string ToString()

Returns

string

ToString(IFormatProvider)

Returns a string that represents this instance.

public string ToString(IFormatProvider formatProvider)

Parameters

formatProvider System.IFormatProvider

The format provider.

Returns

string

A string that represents this instance.

ToString(string, IFormatProvider)

Returns a string that represents this instance.

public string ToString(string format, IFormatProvider formatProvider)

Parameters

format string

The format.

formatProvider System.IFormatProvider

The format provider.

Returns

string

A string that represents this instance.

ToString(string)

Returns a string that represents this instance.

public string ToString(string format)

Parameters

format string

The format.

Returns

string

A string that represents this instance.

Translation(Vector3)

Creates a translation matrix using the specified offsets.

public static Matrix4x4 Translation(Vector3 value)

Parameters

value Vector3

The amount to translate in each axis.

Returns

Matrix4x4

The created translation matrix.

Translation(float, float, float)

Creates a translation matrix using the specified offsets.

public static Matrix4x4 Translation(float x, float y, float z)

Parameters

x float

X-coordinate offset.

y float

Y-coordinate offset.

z float

Z-coordinate offset.

Returns

Matrix4x4

The created translation matrix.

Transpose(in Matrix4x4)

Calculates the transpose of the specified matrix.

public static Matrix4x4 Transpose(in Matrix4x4 value)

Parameters

value Matrix4x4

The matrix whose transpose is to be calculated.

Returns

Matrix4x4

The transpose of the specified matrix.

TransposeRef(ref Matrix4x4)

Transposes the matrix.

public static void TransposeRef(ref Matrix4x4 value)

Parameters

value Matrix4x4

The matrix whose transpose is to be calculated.

World(Vector3, Vector3, Vector3)

Creates a world matrix with the specified parameters.

public static Matrix4x4 World(Vector3 position, Vector3 forward, Vector3 up)

Parameters

position Vector3

The position of the object (used in translation operations).

forward Vector3

The forward direction of the object.

up Vector3

The upward direction of the object. Its value is usually [0, 1, 0].

Returns

Matrix4x4

The world matrix.

YawPitchRoll(float, float, float)

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

public static Matrix4x4 YawPitchRoll(float yaw, float pitch, float roll)

Parameters

yaw float

The angle of rotation, in radians, around the Y axis.

pitch float

The angle of rotation, in radians, around the X axis.

roll float

The angle of rotation, in radians, around the Z axis.

Returns

Matrix4x4

The rotation matrix.

Operators

operator +(in Matrix4x4, in Matrix4x4)

Adds two matricies.

public static Matrix4x4 operator +(in Matrix4x4 left, in Matrix4x4 right)

Parameters

left Matrix4x4

The first matrix to add.

right Matrix4x4

The second matrix to add.

Returns

Matrix4x4

The sum of the two matricies.

operator /(in Matrix4x4, float)

Scales a matrix by a given value.

public static Matrix4x4 operator /(in Matrix4x4 left, float right)

Parameters

left Matrix4x4

The matrix to scale.

right float

The amount by which to scale.

Returns

Matrix4x4

The scaled matrix.

operator ==(in Matrix4x4, in Matrix4x4)

Tests for equality between two objects.

public static bool operator ==(in Matrix4x4 left, in Matrix4x4 right)

Parameters

left Matrix4x4

The first value to compare.

right Matrix4x4

The second value to compare.

Returns

bool

true if left has the same value as right; otherwise, false.

operator !=(in Matrix4x4, in Matrix4x4)

Tests for inequality between two objects.

public static bool operator !=(in Matrix4x4 left, in Matrix4x4 right)

Parameters

left Matrix4x4

The first value to compare.

right Matrix4x4

The second value to compare.

Returns

bool

true if left has a different value than right; otherwise, false.

operator *(in Matrix4x4, in Matrix4x4)

Multiplies two matricies.

public static Matrix4x4 operator *(in Matrix4x4 left, in Matrix4x4 right)

Parameters

left Matrix4x4

The first matrix to multiply.

right Matrix4x4

The second matrix to multiply.

Returns

Matrix4x4

The product of the two matricies.

operator *(in Matrix4x4, float)

Scales a matrix by a given value.

public static Matrix4x4 operator *(in Matrix4x4 left, float right)

Parameters

left Matrix4x4

The matrix to scale.

right float

The amount by which to scale.

Returns

Matrix4x4

The scaled matrix.

operator *(float, in Matrix4x4)

Scales a matrix by a given value.

public static Matrix4x4 operator *(float left, in Matrix4x4 right)

Parameters

left float

The amount by which to scale.

right Matrix4x4

The matrix to scale.

Returns

Matrix4x4

The scaled matrix.

operator -(in Matrix4x4, in Matrix4x4)

Subtracts two matricies.

public static Matrix4x4 operator -(in Matrix4x4 left, in Matrix4x4 right)

Parameters

left Matrix4x4

The first matrix to subtract.

right Matrix4x4

The second matrix to subtract.

Returns

Matrix4x4

The difference between the two matricies.

operator -(in Matrix4x4)

Negates a matrix.

public static Matrix4x4 operator -(in Matrix4x4 value)

Parameters

value Matrix4x4

The matrix to negate.

Returns

Matrix4x4

The negated matrix.