Struct Matrix4x4
Represents a 4x4 matrix.
Implements
Inherited Members
Namespace: Evergine.Mathematics
Assembly: Evergine.Mathematics.dll
Syntax
public struct Matrix4x4 : IEquatable<Matrix4x4>
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.
Declaration
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
Type | Name | Description |
---|---|---|
float | m11 | The M11. |
float | m12 | The M12. |
float | m13 | The M13. |
float | m14 | The M14. |
float | m21 | The M21. |
float | m22 | The M22. |
float | m23 | The M23. |
float | m24 | The M24. |
float | m31 | The M31. |
float | m32 | The M32. |
float | m33 | The M33. |
float | m34 | The M34. |
float | m41 | The M41. |
float | m42 | The M42. |
float | m43 | The M43. |
float | m44 | The M44. |
Matrix4x4(float[])
Initializes a new instance of the Matrix4x4 struct.
Declaration
public Matrix4x4(float[] values)
Parameters
Type | Name | Description |
---|---|---|
float[] | values | The array values. |
Fields
Identity
Identity matrix.
Declaration
public static readonly Matrix4x4 Identity
Field Value
Type | Description |
---|---|
Matrix4x4 |
M11
First row, first column.
Declaration
public float M11
Field Value
Type | Description |
---|---|
float |
M12
First row, second column.
Declaration
public float M12
Field Value
Type | Description |
---|---|
float |
M13
First row, third column.
Declaration
public float M13
Field Value
Type | Description |
---|---|
float |
M14
First row, fourth column.
Declaration
public float M14
Field Value
Type | Description |
---|---|
float |
M21
Second row, first column.
Declaration
public float M21
Field Value
Type | Description |
---|---|
float |
M22
Second row, second column.
Declaration
public float M22
Field Value
Type | Description |
---|---|
float |
M23
Second row, third column.
Declaration
public float M23
Field Value
Type | Description |
---|---|
float |
M24
Second row, fourth column.
Declaration
public float M24
Field Value
Type | Description |
---|---|
float |
M31
Third row, first column.
Declaration
public float M31
Field Value
Type | Description |
---|---|
float |
M32
Third row, second column.
Declaration
public float M32
Field Value
Type | Description |
---|---|
float |
M33
Third row, third column.
Declaration
public float M33
Field Value
Type | Description |
---|---|
float |
M34
Third row, fourth column.
Declaration
public float M34
Field Value
Type | Description |
---|---|
float |
M41
Fourth row, first column.
Declaration
public float M41
Field Value
Type | Description |
---|---|
float |
M42
Fourth row, second column.
Declaration
public float M42
Field Value
Type | Description |
---|---|
float |
M43
Fourth row, third column.
Declaration
public float M43
Field Value
Type | Description |
---|---|
float |
M44
Fourth row, fourth column.
Declaration
public float M44
Field Value
Type | Description |
---|---|
float |
Properties
Backward
Gets or sets the backward.
Declaration
public Vector3 Backward { get; set; }
Property Value
Type | Description |
---|---|
Vector3 | The backward. |
Basis
Gets or sets the basis matrix for the rotation.
Declaration
public Matrix4x4 Basis { get; set; }
Property Value
Type | Description |
---|---|
Matrix4x4 |
Column1
Gets or sets the first column in the matrix; that is M11, M21, M31, and M41.
Declaration
public Vector4 Column1 { get; set; }
Property Value
Type | Description |
---|---|
Vector4 |
Column2
Gets or sets the second column in the matrix; that is M12, M22, M32, and M42.
Declaration
public Vector4 Column2 { get; set; }
Property Value
Type | Description |
---|---|
Vector4 |
Column3
Gets or sets the third column in the matrix; that is M13, M23, M33, and M43.
Declaration
public Vector4 Column3 { get; set; }
Property Value
Type | Description |
---|---|
Vector4 |
Column4
Gets or sets the fourth column in the matrix; that is M14, M24, M34, and M44.
Declaration
public Vector4 Column4 { get; set; }
Property Value
Type | Description |
---|---|
Vector4 |
Down
Gets or sets down.
Declaration
public Vector3 Down { get; set; }
Property Value
Type | Description |
---|---|
Vector3 | Down vector. |
Forward
Gets or sets the forward.
Declaration
public Vector3 Forward { get; set; }
Property Value
Type | Description |
---|---|
Vector3 | The forward. |
IsIdentity
Gets a value indicating whether the matrix is the identity matrix.
Declaration
public bool IsIdentity { get; }
Property Value
Type | Description |
---|---|
bool |
this[int]
Gets or sets the component at the specified index.
Declaration
public float this[int index] { get; set; }
Parameters
Type | Name | Description |
---|---|---|
int | index | The zero-based index of the component to access. |
Property Value
Type | Description |
---|---|
float | The value of the matrix component, depending on the index. |
this[int, int]
Gets or sets the component at the specified index.
Declaration
public float this[int row, int column] { get; set; }
Parameters
Type | Name | Description |
---|---|---|
int | row | The row of the matrix to access. |
int | column | The column of the matrix to access. |
Property Value
Type | Description |
---|---|
float | The value of the matrix component, depending on the index. |
Left
Gets or sets the left.
Declaration
public Vector3 Left { get; set; }
Property Value
Type | Description |
---|---|
Vector3 | The left. |
Orientation
Gets a quaternion from the Matrix.
Declaration
public Quaternion Orientation { get; }
Property Value
Type | Description |
---|---|
Quaternion |
Right
Gets or sets the right.
Declaration
public Vector3 Right { get; set; }
Property Value
Type | Description |
---|---|
Vector3 | The right. |
Rotation
Gets the euler angles.
Declaration
public Vector3 Rotation { get; }
Property Value
Type | Description |
---|---|
Vector3 |
Row1
Gets or sets the first row in the matrix; that is M11, M12, M13, and M14.
Declaration
public Vector4 Row1 { get; set; }
Property Value
Type | Description |
---|---|
Vector4 |
Row2
Gets or sets the second row in the matrix; that is M21, M22, M23, and M24.
Declaration
public Vector4 Row2 { get; set; }
Property Value
Type | Description |
---|---|
Vector4 |
Row3
Gets or sets the third row in the matrix; that is M31, M32, M33, and M34.
Declaration
public Vector4 Row3 { get; set; }
Property Value
Type | Description |
---|---|
Vector4 |
Row4
Gets or sets the fourth row in the matrix; that is M41, M42, M43, and M44.
Declaration
public Vector4 Row4 { get; set; }
Property Value
Type | Description |
---|---|
Vector4 |
Scale
Gets the scale vector from the matrix.
Declaration
public Vector3 Scale { get; }
Property Value
Type | Description |
---|---|
Vector3 |
Translation
Gets or sets the translation.
Declaration
public Vector3 Translation { get; set; }
Property Value
Type | Description |
---|---|
Vector3 | The translation. |
Up
Gets or sets up.
Declaration
public Vector3 Up { get; set; }
Property Value
Type | Description |
---|---|
Vector3 | Up vector. |
Methods
Abs(Matrix4x4)
Divides the specified matrix1.
Declaration
public static Matrix4x4 Abs(Matrix4x4 matrix)
Parameters
Type | Name | Description |
---|---|---|
Matrix4x4 | matrix | The matrix. |
Returns
Type | Description |
---|---|
Matrix4x4 | The absolute matrix. |
Abs(ref Matrix4x4, out Matrix4x4)
Divides the specified matrix1.
Declaration
public static void Abs(ref Matrix4x4 matrix1, out Matrix4x4 result)
Parameters
Type | Name | Description |
---|---|---|
Matrix4x4 | matrix1 | The matrix1. |
Matrix4x4 | result | The result. |
Add(Matrix4x4, Matrix4x4)
Adds two matrices together.
Declaration
public static Matrix4x4 Add(Matrix4x4 matrix1, Matrix4x4 matrix2)
Parameters
Type | Name | Description |
---|---|---|
Matrix4x4 | matrix1 | The first source matrix. |
Matrix4x4 | matrix2 | The second source matrix. |
Returns
Type | Description |
---|---|
Matrix4x4 | The resulting matrix. |
Add(ref Matrix4x4, ref Matrix4x4, out Matrix4x4)
Adds two matrices together.
Declaration
public static void Add(ref Matrix4x4 matrix1, ref Matrix4x4 matrix2, out Matrix4x4 result)
Parameters
Type | Name | Description |
---|---|---|
Matrix4x4 | matrix1 | The first source matrix. |
Matrix4x4 | matrix2 | The second source matrix. |
Matrix4x4 | result | The resulting matrix. |
CreateBillboard(Vector3, Vector3, Vector3, Vector3?)
Creates the billboard.
Declaration
public static Matrix4x4 CreateBillboard(Vector3 objectPosition, Vector3 cameraPosition, Vector3 cameraUpVector, Vector3? cameraForwardVector)
Parameters
Type | Name | Description |
---|---|---|
Vector3 | objectPosition | The object position. |
Vector3 | cameraPosition | The camera position. |
Vector3 | cameraUpVector | The camera up vector. |
Vector3? | cameraForwardVector | The camera forward vector. |
Returns
Type | Description |
---|---|
Matrix4x4 | The result. |
CreateBillboard(ref Vector3, ref Vector3, ref Vector3, Vector3?, out Matrix4x4)
Creates the billboard.
Declaration
public static void CreateBillboard(ref Vector3 objectPosition, ref Vector3 cameraPosition, ref Vector3 cameraUpVector, Vector3? cameraForwardVector, out Matrix4x4 result)
Parameters
Type | Name | Description |
---|---|---|
Vector3 | objectPosition | The object position. |
Vector3 | cameraPosition | The camera position. |
Vector3 | cameraUpVector | The camera up vector. |
Vector3? | cameraForwardVector | The camera forward vector. |
Matrix4x4 | result | The result. |
CreateConstrainedBillboard(Vector3, Vector3, Vector3, Vector3?, Vector3?)
Creates the constrained billboard.
Declaration
public static Matrix4x4 CreateConstrainedBillboard(Vector3 objectPosition, Vector3 cameraPosition, Vector3 rotateAxis, Vector3? cameraForwardVector, Vector3? objectForwardVector)
Parameters
Type | Name | Description |
---|---|---|
Vector3 | objectPosition | The object position. |
Vector3 | cameraPosition | The camera position. |
Vector3 | rotateAxis | The rotate axis. |
Vector3? | cameraForwardVector | The camera forward vector. |
Vector3? | objectForwardVector | The object forward vector. |
Returns
Type | Description |
---|---|
Matrix4x4 | The result. |
CreateConstrainedBillboard(ref Vector3, ref Vector3, ref Vector3, Vector3?, Vector3?, out Matrix4x4)
Creates the constrained billboard.
Declaration
public static void CreateConstrainedBillboard(ref Vector3 objectPosition, ref Vector3 cameraPosition, ref Vector3 rotateAxis, Vector3? cameraForwardVector, Vector3? objectForwardVector, out Matrix4x4 result)
Parameters
Type | Name | Description |
---|---|---|
Vector3 | objectPosition | The object position. |
Vector3 | cameraPosition | The camera position. |
Vector3 | rotateAxis | The rotate axis. |
Vector3? | cameraForwardVector | The camera forward vector. |
Vector3? | objectForwardVector | The object forward vector. |
Matrix4x4 | result | The result. |
CreateFromAxisAngle(Vector3, float)
Creates a matrix that rotates around an arbitrary vector.
Declaration
public static Matrix4x4 CreateFromAxisAngle(Vector3 axis, float angle)
Parameters
Type | Name | Description |
---|---|---|
Vector3 | axis | The axis to rotate around. |
float | angle | The angle to rotate around |
Returns
Type | Description |
---|---|
Matrix4x4 | The rotation matrix. |
CreateFromAxisAngle(ref Vector3, float, out Matrix4x4)
Creates a matrix that rotates around an arbitrary vector.
Declaration
public static void CreateFromAxisAngle(ref Vector3 axis, float angle, out Matrix4x4 result)
Parameters
Type | Name | Description |
---|---|---|
Vector3 | axis | The axis to rotate around. |
float | angle | The angle to rotate around |
Matrix4x4 | result | The rotation matrix. |
CreateFromQuaternion(Quaternion)
Creates from quaternion.
Declaration
public static Matrix4x4 CreateFromQuaternion(Quaternion quaternion)
Parameters
Type | Name | Description |
---|---|---|
Quaternion | quaternion | The quaternion. |
Returns
Type | Description |
---|---|
Matrix4x4 | The result. |
CreateFromQuaternion(ref Quaternion, out Matrix4x4)
Creates from quaternion.
Declaration
public static void CreateFromQuaternion(ref Quaternion quaternion, out Matrix4x4 result)
Parameters
Type | Name | Description |
---|---|---|
Quaternion | quaternion | The quaternion. |
Matrix4x4 | result | The result. |
CreateFromTR(Vector3, Quaternion)
Create a translation, and rotation matrix.
Declaration
public static Matrix4x4 CreateFromTR(Vector3 translate, Quaternion orientation)
Parameters
Type | Name | Description |
---|---|---|
Vector3 | translate | Translate vector. |
Quaternion | orientation | Orientation quaternion. |
Returns
Type | Description |
---|---|
Matrix4x4 | The TRS matrix. |
CreateFromTR(ref Vector3, ref Quaternion, out Matrix4x4)
Create a translation, rotation matrix.
Declaration
public static void CreateFromTR(ref Vector3 translate, ref Quaternion orientation, out Matrix4x4 matrix)
Parameters
Type | Name | Description |
---|---|---|
Vector3 | translate | Translate vector. |
Quaternion | orientation | Orientation quaternion. |
Matrix4x4 | matrix | The TRS Matrix. |
CreateFromTRS(Vector3, Quaternion, Vector3)
Create a translation, rotation and scaling matrix.
Declaration
public static Matrix4x4 CreateFromTRS(Vector3 translate, Quaternion orientation, Vector3 scale)
Parameters
Type | Name | Description |
---|---|---|
Vector3 | translate | Translate vector. |
Quaternion | orientation | Orientation quaternion. |
Vector3 | scale | Scale vector. |
Returns
Type | Description |
---|---|
Matrix4x4 | The TRS matrix. |
CreateFromTRS(Vector3, Vector3, Vector3)
Create a translation, rotation and scaling matrix.
Declaration
public static Matrix4x4 CreateFromTRS(Vector3 translate, Vector3 rotation, Vector3 scale)
Parameters
Type | Name | Description |
---|---|---|
Vector3 | translate | Translate vector. |
Vector3 | rotation | The euler angles (Pitch, Yaw, Roll). |
Vector3 | scale | Scale vector. |
Returns
Type | Description |
---|---|
Matrix4x4 | The TRS matrix. |
CreateFromTRS(ref Vector3, ref Quaternion, ref Vector3, out Matrix4x4)
Create a translation, rotation and scaling matrix.
Declaration
public static void CreateFromTRS(ref Vector3 translate, ref Quaternion orientation, ref Vector3 scale, out Matrix4x4 matrix)
Parameters
Type | Name | Description |
---|---|---|
Vector3 | translate | Translate vector. |
Quaternion | orientation | Orientation quaternion. |
Vector3 | scale | Scale vector. |
Matrix4x4 | matrix | The TRS Matrix. |
CreateFromTRS(ref Vector3, ref Vector3, ref Vector3, out Matrix4x4)
Create a translation, rotation and scaling matrix.
Declaration
public static void CreateFromTRS(ref Vector3 translate, ref Vector3 rotation, ref Vector3 scale, out Matrix4x4 matrix)
Parameters
Type | Name | Description |
---|---|---|
Vector3 | translate | Translate vector. |
Vector3 | rotation | The euler angles (Pitch, Yaw, Roll). |
Vector3 | scale | Scale vector. |
Matrix4x4 | matrix | The TRS matrix. |
CreateFromTS(ref Vector3, ref Vector3, out Matrix4x4)
Create a translation and scaling matrix.
Declaration
public static void CreateFromTS(ref Vector3 translate, ref Vector3 scale, out Matrix4x4 matrix)
Parameters
Type | Name | Description |
---|---|---|
Vector3 | translate | Translate vector. |
Vector3 | scale | Scale vector. |
Matrix4x4 | matrix | The TRS Matrix. |
CreateFromTS(ref Vector3, float, out Matrix4x4)
Create a translation and scaling matrix.
Declaration
public static void CreateFromTS(ref Vector3 translate, float scale, out Matrix4x4 matrix)
Parameters
Type | Name | Description |
---|---|---|
Vector3 | translate | Translate vector. |
float | scale | Scale vector. |
Matrix4x4 | matrix | The TRS Matrix. |
CreateFromYawPitchRoll(float, float, float)
Creates from yaw pitch roll.
Declaration
public static Matrix4x4 CreateFromYawPitchRoll(float yaw, float pitch, float roll)
Parameters
Type | Name | Description |
---|---|---|
float | yaw | The yaw. |
float | pitch | The pitch. |
float | roll | The roll. |
Returns
Type | Description |
---|---|
Matrix4x4 | The result. |
CreateFromYawPitchRoll(float, float, float, out Matrix4x4)
Creates from yaw pitch roll.
Declaration
public static void CreateFromYawPitchRoll(float yaw, float pitch, float roll, out Matrix4x4 result)
Parameters
Type | Name | Description |
---|---|---|
float | yaw | The yaw. |
float | pitch | The pitch. |
float | roll | The roll. |
Matrix4x4 | result | The result. |
CreateLookAt(Vector3, Vector3, Vector3)
Creates a view matrix.
Declaration
public static Matrix4x4 CreateLookAt(Vector3 position, Vector3 target, Vector3 upVector)
Parameters
Type | Name | Description |
---|---|---|
Vector3 | position | The init position. |
Vector3 | target | The target. |
Vector3 | upVector | The up vector. |
Returns
Type | Description |
---|---|
Matrix4x4 | The result. |
CreateLookAt(ref Vector3, ref Vector3, ref Vector3, out Matrix4x4)
Creates a view matrix.
Declaration
public static void CreateLookAt(ref Vector3 position, ref Vector3 target, ref Vector3 upVector, out Matrix4x4 result)
Parameters
Type | Name | Description |
---|---|---|
Vector3 | position | The init position. |
Vector3 | target | The look target. |
Vector3 | upVector | The up vector. |
Matrix4x4 | result | The result. |
CreateOrthographic(float, float, float, float, bool)
Creates the orthographic.
Declaration
public static Matrix4x4 CreateOrthographic(float width, float height, float zNearPlane, float zFarPlane, bool zeroToOneDepthClip = true)
Parameters
Type | Name | Description |
---|---|---|
float | width | The width. |
float | height | The height. |
float | zNearPlane | The z near plane. |
float | zFarPlane | The z far plane. |
bool | zeroToOneDepthClip | Indicates if we want to creat a ZeroToOne range depth, or if false, Negative One to One. |
Returns
Type | Description |
---|---|
Matrix4x4 | The result. |
CreateOrthographic(float, float, float, float, bool, out Matrix4x4)
Creates the orthographic.
Declaration
public static void CreateOrthographic(float width, float height, float zNearPlane, float zFarPlane, bool zeroToOneDepthClip, out Matrix4x4 result)
Parameters
Type | Name | Description |
---|---|---|
float | width | The width. |
float | height | The height. |
float | zNearPlane | The z near plane. |
float | zFarPlane | The z far plane. |
bool | zeroToOneDepthClip | Indicates if we want to creat a ZeroToOne range depth, or if false, Negative One to One. |
Matrix4x4 | result | The result. |
CreateOrthographicOffCenter(float, float, float, float, float, float, bool)
Creates the orthographic off center.
Declaration
public static Matrix4x4 CreateOrthographicOffCenter(float left, float right, float bottom, float top, float zNearPlane, float zFarPlane, bool zeroToOneDepthClip = true)
Parameters
Type | Name | Description |
---|---|---|
float | left | The left. |
float | right | The right. |
float | bottom | The bottom. |
float | top | The top. |
float | zNearPlane | The z near plane. |
float | zFarPlane | The z far plane. |
bool | zeroToOneDepthClip | Indicates if we want to creat a ZeroToOne range depth, or if false, Negative One to One. |
Returns
Type | Description |
---|---|
Matrix4x4 | The result. |
CreateOrthographicOffCenter(float, float, float, float, float, float, bool, out Matrix4x4)
Creates the orthographic off center.
Declaration
public static void CreateOrthographicOffCenter(float left, float right, float bottom, float top, float zNearPlane, float zFarPlane, bool zeroToOneDepthClip, out Matrix4x4 result)
Parameters
Type | Name | Description |
---|---|---|
float | left | The left. |
float | right | The right. |
float | bottom | The bottom. |
float | top | The top. |
float | zNearPlane | The z near plane. |
float | zFarPlane | The z far plane. |
bool | zeroToOneDepthClip | Indicates if we want to creat a ZeroToOne range depth, or if false, Negative One to One. |
Matrix4x4 | result | The result. |
CreatePerspective(float, float, float, float, bool)
Creates the perspective.
Declaration
public static Matrix4x4 CreatePerspective(float width, float height, float nearPlaneDistance, float farPlaneDistance, bool zeroToOneDepthClip = true)
Parameters
Type | Name | Description |
---|---|---|
float | width | The width. |
float | height | The height. |
float | nearPlaneDistance | The near plane distance. |
float | farPlaneDistance | The far plane distance. |
bool | zeroToOneDepthClip | Indicates if we want to creat a ZeroToOne range depth, or if false, Negative One to One. |
Returns
Type | Description |
---|---|
Matrix4x4 | The result. |
CreatePerspective(float, float, float, float, bool, out Matrix4x4)
Creates the perspective.
Declaration
public static void CreatePerspective(float width, float height, float nearPlaneDistance, float farPlaneDistance, bool zeroToOneDepthClip, out Matrix4x4 result)
Parameters
Type | Name | Description |
---|---|---|
float | width | The width. |
float | height | The height. |
float | nearPlaneDistance | The near plane distance. |
float | farPlaneDistance | The far plane distance. |
bool | zeroToOneDepthClip | Indicates if we want to creat a ZeroToOne range depth, or if false, Negative One to One. |
Matrix4x4 | result | The result. |
CreatePerspectiveFieldOfView(float, float, float, float, bool, bool)
Creates a perspective projection matrix based on a field of view, aspect ratio, and near and far view plane distances.
Declaration
public static Matrix4x4 CreatePerspectiveFieldOfView(float fieldOfView, float aspectRatio, float nearPlaneDistance, float farPlaneDistance, bool verticalFieldOfView = true, bool zeroToOneDepthClip = true)
Parameters
Type | Name | Description |
---|---|---|
float | fieldOfView | The field of view. |
float | aspectRatio | The aspect ratio. |
float | nearPlaneDistance | The near plane distance. |
float | farPlaneDistance | The far plane distance. |
bool | verticalFieldOfView | Indicates if the field of view is parameter is vertical. |
bool | zeroToOneDepthClip | Indicates if we want to creat a ZeroToOne range depth, or if false, Negative One to One. |
Returns
Type | Description |
---|---|
Matrix4x4 | The result. |
CreatePerspectiveFieldOfView(float, float, float, float, bool, bool, out Matrix4x4)
Creates a perspective projection matrix based on a field of view, aspect ratio, and near and far view plane distances.
Declaration
public static void CreatePerspectiveFieldOfView(float fieldOfView, float aspectRatio, float nearPlaneDistance, float farPlaneDistance, bool verticalFieldOfView, bool zeroToOneDepthClip, out Matrix4x4 result)
Parameters
Type | Name | Description |
---|---|---|
float | fieldOfView | The field of view. |
float | aspectRatio | The aspect ratio. |
float | nearPlaneDistance | The near plane distance. |
float | farPlaneDistance | The far plane distance. |
bool | verticalFieldOfView | Indicates if the field of view is parameter is vertical. |
bool | zeroToOneDepthClip | Indicates if we want to creat a ZeroToOne range depth, or if false, Negative One to One. |
Matrix4x4 | result | The result. |
CreatePerspectiveOffCenter(float, float, float, float, float, float, bool)
Creates the perspective off center.
Declaration
public static Matrix4x4 CreatePerspectiveOffCenter(float left, float right, float bottom, float top, float nearPlaneDistance, float farPlaneDistance, bool zeroToOneDepthClip = true)
Parameters
Type | Name | Description |
---|---|---|
float | left | The left. |
float | right | The right. |
float | bottom | The bottom. |
float | top | The top. |
float | nearPlaneDistance | The near plane distance. |
float | farPlaneDistance | The far plane distance. |
bool | zeroToOneDepthClip | Indicates if we want to creat a ZeroToOne range depth, or if false, Negative One to One. |
Returns
Type | Description |
---|---|
Matrix4x4 | The result. |
CreatePerspectiveOffCenter(float, float, float, float, float, float, bool, out Matrix4x4)
Creates the perspective off center.
Declaration
public static void CreatePerspectiveOffCenter(float left, float right, float bottom, float top, float nearPlaneDistance, float farPlaneDistance, bool zeroToOneDepthClip, out Matrix4x4 result)
Parameters
Type | Name | Description |
---|---|---|
float | left | The left. |
float | right | The right. |
float | bottom | The bottom. |
float | top | The top. |
float | nearPlaneDistance | The near plane distance. |
float | farPlaneDistance | The far plane distance. |
bool | zeroToOneDepthClip | Indicates if we want to creat a ZeroToOne range depth, or if false, Negative One to One. |
Matrix4x4 | result | The result. |
CreateReflection(Plane)
Creates the reflection.
Declaration
public static Matrix4x4 CreateReflection(Plane value)
Parameters
Type | Name | Description |
---|---|---|
Plane | value | The value. |
Returns
Type | Description |
---|---|
Matrix4x4 | The result. |
CreateReflection(ref Plane, out Matrix4x4)
Creates the reflection.
Declaration
public static void CreateReflection(ref Plane value, out Matrix4x4 result)
Parameters
Type | Name | Description |
---|---|---|
Plane | value | The value. |
Matrix4x4 | result | The result. |
CreateRotationX(float)
Creates the rotation X.
Declaration
public static Matrix4x4 CreateRotationX(float radians)
Parameters
Type | Name | Description |
---|---|---|
float | radians | The radians. |
Returns
Type | Description |
---|---|
Matrix4x4 | The result. |
CreateRotationX(float, out Matrix4x4)
Creates the rotation X.
Declaration
public static void CreateRotationX(float radians, out Matrix4x4 result)
Parameters
Type | Name | Description |
---|---|---|
float | radians | The radians. |
Matrix4x4 | result | The result. |
CreateRotationX(float, ref Vector3)
Creates a matrix for rotating points around the X-axis, from a center point.
Declaration
public static Matrix4x4 CreateRotationX(float radians, ref Vector3 centerPoint)
Parameters
Type | Name | Description |
---|---|---|
float | radians | The amount, in radians, by which to rotate around the X-axis. |
Vector3 | centerPoint | The center point. |
Returns
Type | Description |
---|---|
Matrix4x4 | The rotation matrix. |
CreateRotationX(float, ref Vector3, out Matrix4x4)
Creates a matrix for rotating points around the X-axis, from a center point.
Declaration
public static void CreateRotationX(float radians, ref Vector3 centerPoint, out Matrix4x4 result)
Parameters
Type | Name | Description |
---|---|---|
float | radians | The amount, in radians, by which to rotate around the X-axis. |
Vector3 | centerPoint | The center point. |
Matrix4x4 | result | The rotation matrix. |
CreateRotationY(float)
Creates the rotation Y.
Declaration
public static Matrix4x4 CreateRotationY(float radians)
Parameters
Type | Name | Description |
---|---|---|
float | radians | The radians. |
Returns
Type | Description |
---|---|
Matrix4x4 | The result. |
CreateRotationY(float, out Matrix4x4)
Creates the rotation Y.
Declaration
public static void CreateRotationY(float radians, out Matrix4x4 result)
Parameters
Type | Name | Description |
---|---|---|
float | radians | The radians. |
Matrix4x4 | result | The result. |
CreateRotationY(float, ref Vector3)
Creates a matrix for rotating points around the Y-axis, from a center point.
Declaration
public static Matrix4x4 CreateRotationY(float radians, ref Vector3 centerPoint)
Parameters
Type | Name | Description |
---|---|---|
float | radians | The amount, in radians, by which to rotate around the Y-axis. |
Vector3 | centerPoint | The center point. |
Returns
Type | Description |
---|---|
Matrix4x4 | The rotation matrix. |
CreateRotationY(float, ref Vector3, out Matrix4x4)
Creates a matrix for rotating points around the Y-axis, from a center point.
Declaration
public static void CreateRotationY(float radians, ref Vector3 centerPoint, out Matrix4x4 result)
Parameters
Type | Name | Description |
---|---|---|
float | radians | The amount, in radians, by which to rotate around the Y-axis. |
Vector3 | centerPoint | The center point. |
Matrix4x4 | result | The rotation matrix. |
CreateRotationZ(float)
Creates the rotation Z.
Declaration
public static Matrix4x4 CreateRotationZ(float radians)
Parameters
Type | Name | Description |
---|---|---|
float | radians | The radians. |
Returns
Type | Description |
---|---|
Matrix4x4 | The result. |
CreateRotationZ(float, out Matrix4x4)
Creates the rotation Z.
Declaration
public static void CreateRotationZ(float radians, out Matrix4x4 result)
Parameters
Type | Name | Description |
---|---|---|
float | radians | The radians. |
Matrix4x4 | result | The result. |
CreateRotationZ(float, ref Vector3)
Creates a matrix for rotating points around the Z-axis, from a center point.
Declaration
public static Matrix4x4 CreateRotationZ(float radians, ref Vector3 centerPoint)
Parameters
Type | Name | Description |
---|---|---|
float | radians | The amount, in radians, by which to rotate around the Z-axis. |
Vector3 | centerPoint | The center point. |
Returns
Type | Description |
---|---|
Matrix4x4 | The rotation matrix. |
CreateRotationZ(float, ref Vector3, out Matrix4x4)
Creates a matrix for rotating points around the Z-axis, from a center point.
Declaration
public static void CreateRotationZ(float radians, ref Vector3 centerPoint, out Matrix4x4 result)
Parameters
Type | Name | Description |
---|---|---|
float | radians | The amount, in radians, by which to rotate around the Z-axis. |
Vector3 | centerPoint | The center point. |
Matrix4x4 | result | The rotation matrix. |
CreateScale(Vector3)
Creates the scale.
Declaration
public static Matrix4x4 CreateScale(Vector3 scales)
Parameters
Type | Name | Description |
---|---|---|
Vector3 | scales | The scales. |
Returns
Type | Description |
---|---|
Matrix4x4 | The result. |
CreateScale(Vector3, Vector3)
Creates a scaling matrix with a center point.
Declaration
public static Matrix4x4 CreateScale(Vector3 scales, Vector3 centerPoint)
Parameters
Type | Name | Description |
---|---|---|
Vector3 | scales | The vector containing the amount to scale by on each axis. |
Vector3 | centerPoint | The center point. |
Returns
Type | Description |
---|---|
Matrix4x4 | The scaling matrix. |
CreateScale(ref Vector3, out Matrix4x4)
Creates the scale.
Declaration
public static void CreateScale(ref Vector3 scales, out Matrix4x4 result)
Parameters
Type | Name | Description |
---|---|---|
Vector3 | scales | The scales. |
Matrix4x4 | result | The result. |
CreateScale(ref Vector3, ref Vector3, out Matrix4x4)
Creates a scaling matrix with a center point.
Declaration
public static void CreateScale(ref Vector3 scales, ref Vector3 centerPoint, out Matrix4x4 result)
Parameters
Type | Name | Description |
---|---|---|
Vector3 | scales | The vector containing the amount to scale by on each axis. |
Vector3 | centerPoint | The center point. |
Matrix4x4 | result | The scaling matrix. |
CreateScale(float)
Creates the scale.
Declaration
public static Matrix4x4 CreateScale(float scale)
Parameters
Type | Name | Description |
---|---|---|
float | scale | The scale. |
Returns
Type | Description |
---|---|
Matrix4x4 | The result. |
CreateScale(float, out Matrix4x4)
Creates the scale.
Declaration
public static void CreateScale(float scale, out Matrix4x4 result)
Parameters
Type | Name | Description |
---|---|---|
float | scale | The scale. |
Matrix4x4 | result | The result. |
CreateScale(float, ref Vector3)
Creates a uniform scaling matrix that scales equally on each axis with a center point.
Declaration
public static Matrix4x4 CreateScale(float scale, ref Vector3 centerPoint)
Parameters
Type | Name | Description |
---|---|---|
float | scale | The uniform scaling factor. |
Vector3 | centerPoint | The center point. |
Returns
Type | Description |
---|---|
Matrix4x4 | The scaling matrix. |
CreateScale(float, ref Vector3, out Matrix4x4)
Creates a uniform scaling matrix that scales equally on each axis with a center point.
Declaration
public static void CreateScale(float scale, ref Vector3 centerPoint, out Matrix4x4 result)
Parameters
Type | Name | Description |
---|---|---|
float | scale | The uniform scaling factor. |
Vector3 | centerPoint | The center point. |
Matrix4x4 | result | The scaling matrix. |
CreateScale(float, float, float)
Creates the scale.
Declaration
public static Matrix4x4 CreateScale(float xScale, float yScale, float zScale)
Parameters
Type | Name | Description |
---|---|---|
float | xScale | The x scale. |
float | yScale | The y scale. |
float | zScale | The z scale. |
Returns
Type | Description |
---|---|
Matrix4x4 | The result. |
CreateScale(float, float, float, out Matrix4x4)
Creates the scale.
Declaration
public static void CreateScale(float xScale, float yScale, float zScale, out Matrix4x4 result)
Parameters
Type | Name | Description |
---|---|---|
float | xScale | The x scale. |
float | yScale | The y scale. |
float | zScale | The z scale. |
Matrix4x4 | result | The result. |
CreateScale(float, float, float, ref Vector3)
Creates a scaling matrix with a center point.
Declaration
public static Matrix4x4 CreateScale(float xScale, float yScale, float zScale, ref Vector3 centerPoint)
Parameters
Type | Name | Description |
---|---|---|
float | xScale | Value to scale by on the X-axis. |
float | yScale | Value to scale by on the Y-axis. |
float | zScale | Value to scale by on the Z-axis. |
Vector3 | centerPoint | The center point. |
Returns
Type | Description |
---|---|
Matrix4x4 | The scaling matrix. |
CreateScale(float, float, float, ref Vector3, out Matrix4x4)
Creates a scaling matrix with a center point.
Declaration
public static void CreateScale(float xScale, float yScale, float zScale, ref Vector3 centerPoint, out Matrix4x4 result)
Parameters
Type | Name | Description |
---|---|---|
float | xScale | Value to scale by on the X-axis. |
float | yScale | Value to scale by on the Y-axis. |
float | zScale | Value to scale by on the Z-axis. |
Vector3 | centerPoint | The center point. |
Matrix4x4 | result | The scaling matrix. |
CreateShadow(Vector3, Plane)
Creates the shadow.
Declaration
public static Matrix4x4 CreateShadow(Vector3 lightDirection, Plane plane)
Parameters
Type | Name | Description |
---|---|---|
Vector3 | lightDirection | The light direction. |
Plane | plane | The plane. |
Returns
Type | Description |
---|---|
Matrix4x4 | The result. |
CreateShadow(ref Vector3, ref Plane, out Matrix4x4)
Creates the shadow.
Declaration
public static void CreateShadow(ref Vector3 lightDirection, ref Plane plane, out Matrix4x4 result)
Parameters
Type | Name | Description |
---|---|---|
Vector3 | lightDirection | The light direction. |
Plane | plane | The plane. |
Matrix4x4 | result | The result. |
CreateTranslation(Vector3)
Creates the translation.
Declaration
public static Matrix4x4 CreateTranslation(Vector3 position)
Parameters
Type | Name | Description |
---|---|---|
Vector3 | position | The position. |
Returns
Type | Description |
---|---|
Matrix4x4 | The result. |
CreateTranslation(ref Vector3, out Matrix4x4)
Creates the translation.
Declaration
public static void CreateTranslation(ref Vector3 position, out Matrix4x4 result)
Parameters
Type | Name | Description |
---|---|---|
Vector3 | position | The position. |
Matrix4x4 | result | The result. |
CreateTranslation(float, float, float)
Creates the translation.
Declaration
public static Matrix4x4 CreateTranslation(float xPosition, float yPosition, float zPosition)
Parameters
Type | Name | Description |
---|---|---|
float | xPosition | The x position. |
float | yPosition | The y position. |
float | zPosition | The z position. |
Returns
Type | Description |
---|---|
Matrix4x4 | The result. |
CreateTranslation(float, float, float, out Matrix4x4)
Creates the translation.
Declaration
public static void CreateTranslation(float xPosition, float yPosition, float zPosition, out Matrix4x4 result)
Parameters
Type | Name | Description |
---|---|---|
float | xPosition | The x position. |
float | yPosition | The y position. |
float | zPosition | The z position. |
Matrix4x4 | result | The result. |
CreateWorld(Vector3, Vector3, Vector3)
Creates the world.
Declaration
public static Matrix4x4 CreateWorld(Vector3 position, Vector3 forward, Vector3 up)
Parameters
Type | Name | Description |
---|---|---|
Vector3 | position | The position. |
Vector3 | forward | The forward. |
Vector3 | up | Up vector. |
Returns
Type | Description |
---|---|
Matrix4x4 | The result. |
CreateWorld(ref Vector3, ref Vector3, ref Vector3, out Matrix4x4)
Creates the world.
Declaration
public static void CreateWorld(ref Vector3 position, ref Vector3 forward, ref Vector3 up, out Matrix4x4 result)
Parameters
Type | Name | Description |
---|---|---|
Vector3 | position | The position. |
Vector3 | forward | The forward. |
Vector3 | up | Up vector. |
Matrix4x4 | result | The result. |
Decompose(Matrix4x4, out Vector3, out Quaternion, out Vector3)
Attempts to extract the scale, translation, and rotation components from the given scale/rotation/translation matrix. If successful, the out parameters will contained the extracted values.
Declaration
public static bool Decompose(Matrix4x4 matrix, out Vector3 scale, out Quaternion rotation, out Vector3 translation)
Parameters
Type | Name | Description |
---|---|---|
Matrix4x4 | matrix | The source matrix. |
Vector3 | scale | The scaling component of the transformation matrix. |
Quaternion | rotation | The rotation component of the transformation matrix. |
Vector3 | translation | The translation component of the transformation matrix. |
Returns
Type | Description |
---|---|
bool | True if the source matrix was successfully decomposed; False otherwise. |
Determinant()
Calculates the determinant of the matrix.
Declaration
public float Determinant()
Returns
Type | Description |
---|---|
float | The determinant of the matrix. |
Equals(Matrix4x4)
Equalses the specified other.
Declaration
public bool Equals(Matrix4x4 other)
Parameters
Type | Name | Description |
---|---|---|
Matrix4x4 | other | The other. |
Returns
Type | Description |
---|---|
bool | The result. |
Equals(ref Matrix4x4)
Equalses the specified other.
Declaration
public bool Equals(ref Matrix4x4 other)
Parameters
Type | Name | Description |
---|---|---|
Matrix4x4 | other | The other. |
Returns
Type | Description |
---|---|
bool | The result. |
Equals(object)
Determines whether the specified object is equal to this instance.
Declaration
public override bool Equals(object obj)
Parameters
Type | Name | Description |
---|---|---|
object | obj | The object to compare with this instance. |
Returns
Type | Description |
---|---|
bool |
|
Overrides
GetHashCode()
Returns a hash code for this instance.
Declaration
public override int GetHashCode()
Returns
Type | Description |
---|---|
int | A hash code for this instance, suitable for use in hashing algorithms and data structures like a hash table. |
Overrides
Invert()
Inverts the specified matrix.
Declaration
public void Invert()
Invert(Matrix4x4)
Attempts to calculate the inverse of the given matrix. If successful, result will contain the inverted matrix.
Declaration
public static Matrix4x4 Invert(Matrix4x4 matrix)
Parameters
Type | Name | Description |
---|---|---|
Matrix4x4 | matrix | The source matrix to invert. |
Returns
Type | Description |
---|---|
Matrix4x4 | If successful, contains the inverted matrix. |
Invert(ref Matrix4x4, out Matrix4x4)
Attempts to calculate the inverse of the given matrix. If successful, result will contain the inverted matrix.
Declaration
public static bool Invert(ref Matrix4x4 matrix, out Matrix4x4 result)
Parameters
Type | Name | Description |
---|---|---|
Matrix4x4 | matrix | The source matrix to invert. |
Matrix4x4 | result | If successful, contains the inverted matrix. |
Returns
Type | Description |
---|---|
bool | True if the source matrix could be inverted; False otherwise. |
Lerp(Matrix4x4, Matrix4x4, float)
Linearly interpolates between the corresponding values of two matrices.
Declaration
public static Matrix4x4 Lerp(Matrix4x4 matrix1, Matrix4x4 matrix2, float amount)
Parameters
Type | Name | Description |
---|---|---|
Matrix4x4 | matrix1 | The first source matrix. |
Matrix4x4 | matrix2 | The second source matrix. |
float | amount | The relative weight of the second source matrix. |
Returns
Type | Description |
---|---|
Matrix4x4 | The interpolated matrix. |
Lerp(ref Matrix4x4, ref Matrix4x4, float, out Matrix4x4)
Linearly interpolates between the corresponding values of two matrices.
Declaration
public static void Lerp(ref Matrix4x4 matrix1, ref Matrix4x4 matrix2, float amount, out Matrix4x4 result)
Parameters
Type | Name | Description |
---|---|---|
Matrix4x4 | matrix1 | The first source matrix. |
Matrix4x4 | matrix2 | The second source matrix. |
float | amount | The relative weight of the second source matrix. |
Matrix4x4 | result | The interpolated matrix. |
Multiply(Matrix4x4, Matrix4x4)
Multiplies a matrix by another matrix.
Declaration
public static Matrix4x4 Multiply(Matrix4x4 matrix1, Matrix4x4 matrix2)
Parameters
Type | Name | Description |
---|---|---|
Matrix4x4 | matrix1 | The first source matrix. |
Matrix4x4 | matrix2 | The second source matrix. |
Returns
Type | Description |
---|---|
Matrix4x4 | The result of the multiplication. |
Multiply(Matrix4x4, float)
Multiplies the specified matrix1.
Declaration
public static Matrix4x4 Multiply(Matrix4x4 matrix1, float scaleFactor)
Parameters
Type | Name | Description |
---|---|---|
Matrix4x4 | matrix1 | The matrix1. |
float | scaleFactor | The scale factor. |
Returns
Type | Description |
---|---|
Matrix4x4 | The result. |
Multiply(ref Matrix4x4, ref Matrix4x4, out Matrix4x4)
Multiplies a matrix by another matrix.
Declaration
public static void Multiply(ref Matrix4x4 matrix1, ref Matrix4x4 matrix2, out Matrix4x4 result)
Parameters
Type | Name | Description |
---|---|---|
Matrix4x4 | matrix1 | The first source matrix. |
Matrix4x4 | matrix2 | The second source matrix. |
Matrix4x4 | result | The result of the multiplication. |
Multiply(ref Matrix4x4, float, out Matrix4x4)
Multiplies the specified matrix1.
Declaration
public static void Multiply(ref Matrix4x4 matrix1, float scaleFactor, out Matrix4x4 result)
Parameters
Type | Name | Description |
---|---|---|
Matrix4x4 | matrix1 | The matrix1. |
float | scaleFactor | The scale factor. |
Matrix4x4 | result | The result. |
Negate(Matrix4x4)
Returns a new matrix with the negated elements of the given matrix.
Declaration
public static Matrix4x4 Negate(Matrix4x4 matrix)
Parameters
Type | Name | Description |
---|---|---|
Matrix4x4 | matrix | The source matrix. |
Returns
Type | Description |
---|---|
Matrix4x4 | The negated matrix. |
Negate(ref Matrix4x4, out Matrix4x4)
Returns a new matrix with the negated elements of the given matrix.
Declaration
public static void Negate(ref Matrix4x4 matrix, out Matrix4x4 result)
Parameters
Type | Name | Description |
---|---|---|
Matrix4x4 | matrix | The source matrix. |
Matrix4x4 | result | The negated matrix. |
Subtract(Matrix4x4, Matrix4x4)
Subtracts the second matrix from the first.
Declaration
public static Matrix4x4 Subtract(Matrix4x4 matrix1, Matrix4x4 matrix2)
Parameters
Type | Name | Description |
---|---|---|
Matrix4x4 | matrix1 | The first source matrix. |
Matrix4x4 | matrix2 | The second source matrix. |
Returns
Type | Description |
---|---|
Matrix4x4 | The result of the subtraction. |
Subtract(ref Matrix4x4, ref Matrix4x4, out Matrix4x4)
Subtracts the second matrix from the first.
Declaration
public static void Subtract(ref Matrix4x4 matrix1, ref Matrix4x4 matrix2, out Matrix4x4 result)
Parameters
Type | Name | Description |
---|---|---|
Matrix4x4 | matrix1 | The first source matrix. |
Matrix4x4 | matrix2 | The second source matrix. |
Matrix4x4 | result | The result of the subtraction. |
ToEngineFlippedYMatrix(ref Matrix4x4, float[])
Convert to a Flipped Y Evergine matrix.
Declaration
public static void ToEngineFlippedYMatrix(ref Matrix4x4 m, float[] mat)
Parameters
Type | Name | Description |
---|---|---|
Matrix4x4 | m | reference to a Evergine matrix. |
float[] | mat | OpenGL matrix. |
ToString()
Returns a string that represents this instance.
Declaration
public override string ToString()
Returns
Type | Description |
---|---|
string | A string that represents this instance. |
Overrides
Transform(Matrix4x4, Quaternion)
Transforms the specified value.
Declaration
public static Matrix4x4 Transform(Matrix4x4 value, Quaternion rotation)
Parameters
Type | Name | Description |
---|---|---|
Matrix4x4 | value | The value. |
Quaternion | rotation | The rotation. |
Returns
Type | Description |
---|---|
Matrix4x4 | The result. |
Transform(ref Matrix4x4, ref Quaternion, out Matrix4x4)
Transforms the given matrix by applying the given Quaternion rotation.
Declaration
public static void Transform(ref Matrix4x4 value, ref Quaternion rotation, out Matrix4x4 result)
Parameters
Type | Name | Description |
---|---|---|
Matrix4x4 | value | The source matrix to transform. |
Quaternion | rotation | The rotation to apply. |
Matrix4x4 | result | The transformed matrix. |
Transpose(Matrix4x4)
Transposes the rows and columns of a matrix.
Declaration
public static Matrix4x4 Transpose(Matrix4x4 matrix)
Parameters
Type | Name | Description |
---|---|---|
Matrix4x4 | matrix | The source matrix. |
Returns
Type | Description |
---|---|
Matrix4x4 | The transposed matrix. |
Transpose(ref Matrix4x4, out Matrix4x4)
Transposes the rows and columns of a matrix.
Declaration
public static void Transpose(ref Matrix4x4 matrix, out Matrix4x4 result)
Parameters
Type | Name | Description |
---|---|---|
Matrix4x4 | matrix | The source matrix. |
Matrix4x4 | result | The transposed matrix. |
Operators
operator +(Matrix4x4, Matrix4x4)
Implements the operator +.
Declaration
public static Matrix4x4 operator +(Matrix4x4 matrix1, Matrix4x4 matrix2)
Parameters
Type | Name | Description |
---|---|---|
Matrix4x4 | matrix1 | The matrix1. |
Matrix4x4 | matrix2 | The matrix2. |
Returns
Type | Description |
---|---|
Matrix4x4 | The result of the operator. |
operator ==(Matrix4x4, Matrix4x4)
Implements the operator ==.
Declaration
public static bool operator ==(Matrix4x4 matrix1, Matrix4x4 matrix2)
Parameters
Type | Name | Description |
---|---|---|
Matrix4x4 | matrix1 | The matrix1. |
Matrix4x4 | matrix2 | The matrix2. |
Returns
Type | Description |
---|---|
bool | The result of the operator. |
operator !=(Matrix4x4, Matrix4x4)
Implements the operator !=.
Declaration
public static bool operator !=(Matrix4x4 matrix1, Matrix4x4 matrix2)
Parameters
Type | Name | Description |
---|---|---|
Matrix4x4 | matrix1 | The matrix1. |
Matrix4x4 | matrix2 | The matrix2. |
Returns
Type | Description |
---|---|
bool | The result of the operator. |
operator *(Matrix4x4, Matrix4x4)
Implements the operator *.
Declaration
public static Matrix4x4 operator *(Matrix4x4 matrix1, Matrix4x4 matrix2)
Parameters
Type | Name | Description |
---|---|---|
Matrix4x4 | matrix1 | The matrix1. |
Matrix4x4 | matrix2 | The matrix2. |
Returns
Type | Description |
---|---|
Matrix4x4 | The result of the operator. |
operator *(Matrix4x4, float)
Implements the operator *.
Declaration
public static Matrix4x4 operator *(Matrix4x4 matrix, float scaleFactor)
Parameters
Type | Name | Description |
---|---|---|
Matrix4x4 | matrix | The matrix. |
float | scaleFactor | The scale factor. |
Returns
Type | Description |
---|---|
Matrix4x4 | The result of the operator. |
operator *(float, Matrix4x4)
Implements the operator *.
Declaration
public static Matrix4x4 operator *(float scaleFactor, Matrix4x4 matrix)
Parameters
Type | Name | Description |
---|---|---|
float | scaleFactor | The scale factor. |
Matrix4x4 | matrix | The matrix. |
Returns
Type | Description |
---|---|
Matrix4x4 | The result of the operator. |
operator -(Matrix4x4, Matrix4x4)
Implements the operator -.
Declaration
public static Matrix4x4 operator -(Matrix4x4 matrix1, Matrix4x4 matrix2)
Parameters
Type | Name | Description |
---|---|---|
Matrix4x4 | matrix1 | The matrix1. |
Matrix4x4 | matrix2 | The matrix2. |
Returns
Type | Description |
---|---|
Matrix4x4 | The result of the operator. |
operator -(Matrix4x4)
Returns a new matrix with the negated elements of the given matrix.
Declaration
public static Matrix4x4 operator -(Matrix4x4 value)
Parameters
Type | Name | Description |
---|---|---|
Matrix4x4 | value | The source matrix. |
Returns
Type | Description |
---|---|
Matrix4x4 | The negated matrix. |