Struct Matrix
Defines a 4x4 matrix.
Implements
Inherited Members
Namespace: GTA.Math
Assembly: ScriptHookVDotNet2.dll
Syntax
[Serializable]
public struct Matrix : IEquatable<Matrix>
Constructors
Name | Description |
---|---|
Matrix(Single[]) | Initializes a new instance of the Matrix structure. |
Fields
Name | Description |
---|---|
M11 | Gets or sets the element of the matrix that exists in the first row and first column. |
M12 | Gets or sets the element of the matrix that exists in the first row and second column. |
M13 | Gets or sets the element of the matrix that exists in the first row and third column. |
M14 | Gets or sets the element of the matrix that exists in the first row and fourth column. |
M21 | Gets or sets the element of the matrix that exists in the second row and first column. |
M22 | Gets or sets the element of the matrix that exists in the second row and second column. |
M23 | Gets or sets the element of the matrix that exists in the second row and third column. |
M24 | Gets or sets the element of the matrix that exists in the second row and fourth column. |
M31 | Gets or sets the element of the matrix that exists in the third row and first column. |
M32 | Gets or sets the element of the matrix that exists in the third row and second column. |
M33 | Gets or sets the element of the matrix that exists in the third row and third column. |
M34 | Gets or sets the element of the matrix that exists in the third row and fourth column. |
M41 | Gets or sets the element of the matrix that exists in the fourth row and first column. |
M42 | Gets or sets the element of the matrix that exists in the fourth row and second column. |
M43 | Gets or sets the element of the matrix that exists in the fourth row and third column. |
M44 | Gets or sets the element of the matrix that exists in the fourth row and fourth column. |
Properties
Name | Description |
---|---|
HasInverse | Gets a value indicating whether this instance has an inverse matrix. |
Identity | The identity Matrix. |
IsIdentity | Gets a value indicating whether this instance is an identity matrix. |
Item[Int32, Int32] | Gets or sets the component at the specified index. |
Methods
Name | Description |
---|---|
Add(Matrix, Matrix) | Determines the sum of two matrices. |
Determinant() | Calculates the determinant of the matrix. |
Divide(Matrix, Matrix) | Determines the quotient of two matrices. |
Divide(Matrix, Single) | Scales a matrix by the given value. |
Equals(Matrix) | Returns a value that indicates whether the current instance is equal to the specified object. |
Equals(ref Matrix, ref Matrix) | Determines whether the specified object instances are considered equal. |
Equals(Object) | Returns a value that indicates whether the current instance is equal to a specified object. |
FromArray(Single[]) | Converts the matrix to an array of floats. |
GetHashCode() | Returns the hash code for this instance. |
Inverse() | Inverts the matrix. |
Inverse(Matrix) | Calculates the inverse of a matrix if it exists. |
Lerp(Matrix, Matrix, Single) | Performs a linear interpolation between two matrices. |
Multiply(Matrix, Matrix) | Determines the product of two matrices. |
Multiply(Matrix, Single) | Scales a matrix by the given value. |
Negate(Matrix) | Negates a matrix. |
RotationAxis(Vector3, Single) | Creates a matrix that rotates around an arbitrary axis. |
RotationQuaternion(Quaternion) | Creates a rotation matrix from a rotation. |
RotationX(Single) | Creates a matrix that rotates around the x-axis. |
RotationY(Single) | Creates a matrix that rotates around the y-axis. |
RotationYawPitchRoll(Single, Single, Single) | Creates a rotation matrix with a specified yaw, pitch, and roll. |
RotationZ(Single) | Creates a matrix that rotates around the z-axis. |
Scaling(Vector3) | Creates a matrix that scales along the x-axis, y-axis, and y-axis. |
Scaling(Single, Single, Single) | Creates a matrix that scales along the x-axis, y-axis, and y-axis. |
Subtract(Matrix, Matrix) | Determines the difference between two matrices. |
ToArray() | Converts the matrix to an array of floats. |
ToString() | Converts the value of the object to its equivalent string representation. |
Translation(Vector3) | Creates a translation matrix using the specified offsets. |
Translation(Single, Single, Single) | Creates a translation matrix using the specified offsets. |
Transpose(Matrix) | Calculates the transpose of the specified matrix. |
Operators
Name | Description |
---|---|
Addition(Matrix, Matrix) | Adds two matrices. |
Division(Matrix, Matrix) | Divides two matrices. |
Division(Matrix, Single) | Scales a matrix by a given value. |
Equality(Matrix, Matrix) | Tests for equality between two objects. |
Inequality(Matrix, Matrix) | Tests for inequality between two objects. |
Multiply(Matrix, Matrix) | Multiplies two matrices. |
Multiply(Matrix, Single) | Scales a matrix by a given value. |
Multiply(Single, Matrix) | Scales a matrix by a given value. |
Subtraction(Matrix, Matrix) | Subtracts two matrices. |
UnaryNegation(Matrix) | Negates a matrix. |