Struct float4x4
A 4x4 matrix of floats.
Namespace: Unity.Mathematics
Syntax
public struct float4x4 : System.IEquatable<float4x4>, IFormattable
Constructors
Name | Description |
---|---|
float4x4(Boolean) | Constructs a float4x4 matrix from a single bool value by converting it to float and assigning it to every component. |
float4x4(Double) | Constructs a float4x4 matrix from a single double value by converting it to float and assigning it to every component. |
float4x4(Int32) | Constructs a float4x4 matrix from a single int value by converting it to float and assigning it to every component. |
float4x4(Single) | Constructs a float4x4 matrix from a single float value by assigning it to every component. |
float4x4(Single, Single, Single, Single, Single, Single, Single, Single, Single, Single, Single, Single, Single, Single, Single, Single) | Constructs a float4x4 matrix from 16 float values given in row-major order. |
float4x4(UInt32) | Constructs a float4x4 matrix from a single uint value by converting it to float and assigning it to every component. |
float4x4(bool4x4) | Constructs a float4x4 matrix from a bool4x4 matrix by componentwise conversion. |
float4x4(double4x4) | Constructs a float4x4 matrix from a double4x4 matrix by componentwise conversion. |
float4x4(float3x3, float3) | Constructs a float4x4 from a float3x3 rotation matrix and a float3 translation vector. |
float4x4(float4, float4, float4, float4) | Constructs a float4x4 matrix from four float4 vectors. |
float4x4(int4x4) | Constructs a float4x4 matrix from a int4x4 matrix by componentwise conversion. |
float4x4(quaternion, float3) | Constructs a float4x4 from a quaternion and a float3 translation vector. |
float4x4(RigidTransform) | Constructs a float4x4 from a RigidTransform. |
float4x4(uint4x4) | Constructs a float4x4 matrix from a uint4x4 matrix by componentwise conversion. |
Fields
Name | Description |
---|---|
c0 | Column 0 of the matrix. |
c1 | Column 1 of the matrix. |
c2 | Column 2 of the matrix. |
c3 | Column 3 of the matrix. |
identity | float4x4 identity transform. |
zero | float4x4 zero value. |
Properties
Name | Description |
---|---|
Item[Int32] | Returns the float4 element at a specified index. |
Methods
Name | Description |
---|---|
AxisAngle(float3, Single) | Returns a float4x4 matrix representing a rotation around a unit axis by an angle in radians. The rotation direction is clockwise when looking along the rotation axis towards the origin. |
Equals(Object) | Returns true if the float4x4 is equal to a given float4x4, false otherwise. |
Equals(float4x4) | Returns true if the float4x4 is equal to a given float4x4, false otherwise. |
Euler(Single, Single, Single, math.RotationOrder) | Returns a float4x4 rotation matrix constructed by first performing 3 rotations around the principal axes in a given order. All rotation angles are in radians and clockwise when looking along the rotation axis towards the origin. When the rotation order is known at compile time, it is recommended for performance reasons to use specific Euler rotation constructors such as EulerZXY(...). |
Euler(float3, math.RotationOrder) | Returns a float4x4 constructed by first performing 3 rotations around the principal axes in a given order. All rotation angles are in radians and clockwise when looking along the rotation axis towards the origin. When the rotation order is known at compile time, it is recommended for performance reasons to use specific Euler rotation constructors such as EulerZXY(...). |
EulerXYZ(Single, Single, Single) | Returns a float4x4 rotation matrix constructed by first performing a rotation around the x-axis, then the y-axis and finally the z-axis. All rotation angles are in radians and clockwise when looking along the rotation axis towards the origin. |
EulerXYZ(float3) | Returns a float4x4 rotation matrix constructed by first performing a rotation around the x-axis, then the y-axis and finally the z-axis. All rotation angles are in radians and clockwise when looking along the rotation axis towards the origin. |
EulerXZY(Single, Single, Single) | Returns a float4x4 rotation matrix constructed by first performing a rotation around the x-axis, then the z-axis and finally the y-axis. All rotation angles are in radians and clockwise when looking along the rotation axis towards the origin. |
EulerXZY(float3) | Returns a float4x4 rotation matrix constructed by first performing a rotation around the x-axis, then the z-axis and finally the y-axis. All rotation angles are in radians and clockwise when looking along the rotation axis towards the origin. |
EulerYXZ(Single, Single, Single) | Returns a float4x4 rotation matrix constructed by first performing a rotation around the y-axis, then the x-axis and finally the z-axis. All rotation angles are in radians and clockwise when looking along the rotation axis towards the origin. |
EulerYXZ(float3) | Returns a float4x4 rotation matrix constructed by first performing a rotation around the y-axis, then the x-axis and finally the z-axis. All rotation angles are in radians and clockwise when looking along the rotation axis towards the origin. |
EulerYZX(Single, Single, Single) | Returns a float4x4 rotation matrix constructed by first performing a rotation around the y-axis, then the z-axis and finally the x-axis. All rotation angles are in radians and clockwise when looking along the rotation axis towards the origin. |
EulerYZX(float3) | Returns a float4x4 rotation matrix constructed by first performing a rotation around the y-axis, then the z-axis and finally the x-axis. All rotation angles are in radians and clockwise when looking along the rotation axis towards the origin. |
EulerZXY(Single, Single, Single) | Returns a float4x4 rotation matrix constructed by first performing a rotation around the z-axis, then the x-axis and finally the y-axis. All rotation angles are in radians and clockwise when looking along the rotation axis towards the origin. This is the default order rotation order in Unity. |
EulerZXY(float3) | Returns a float4x4 rotation matrix constructed by first performing a rotation around the z-axis, then the x-axis and finally the y-axis. All rotation angles are in radians and clockwise when looking along the rotation axis towards the origin. This is the default order rotation order in Unity. |
EulerZYX(Single, Single, Single) | Returns a float4x4 rotation matrix constructed by first performing a rotation around the z-axis, then the y-axis and finally the x-axis. All rotation angles are in radians and clockwise when looking along the rotation axis towards the origin. |
EulerZYX(float3) | Returns a float4x4 rotation matrix constructed by first performing a rotation around the z-axis, then the y-axis and finally the x-axis. All rotation angles are in radians and clockwise when looking along the rotation axis towards the origin. |
GetHashCode() | Returns a hash code for the float4x4. |
LookAt(float3, float3, float3) | Returns a float4x4 view matrix given an eye position, a target point and a unit length up vector. The up vector is assumed to be unit length, the eye and target points are assumed to be distinct and the vector between them is assumes to be collinear with the up vector. If these assumptions are not met use float4x4.LookRotationSafe instead. |
Ortho(Single, Single, Single, Single) | Returns a float4x4 centered orthographic projection matrix. |
OrthoOffCenter(Single, Single, Single, Single, Single, Single) | Returns a float4x4 off-center orthographic projection matrix. |
PerspectiveFov(Single, Single, Single, Single) | Returns a float4x4 perspective projection matrix based on field of view. |
PerspectiveOffCenter(Single, Single, Single, Single, Single, Single) | Returns a float4x4 off-center perspective projection matrix. |
RotateX(Single) | Returns a float4x4 matrix that rotates around the x-axis by a given number of radians. |
RotateY(Single) | Returns a float4x4 matrix that rotates around the y-axis by a given number of radians. |
RotateZ(Single) | Returns a float4x4 matrix that rotates around the z-axis by a given number of radians. |
Scale(Single) | Returns a float4x4 scale matrix given 3 axis scales. |
Scale(Single, Single, Single) | Returns a float4x4 scale matrix given a float3 vector containing the 3 axis scales. |
Scale(float3) | Returns a float4x4 scale matrix given a float3 vector containing the 3 axis scales. |
ToString() | Returns a string representation of the float4x4. |
ToString(String, IFormatProvider) | Returns a string representation of the float4x4 using a specified format and culture-specific format information. |
Translate(float3) | Returns a float4x4 translation matrix given a float3 translation vector. |
TRS(float3, quaternion, float3) | Returns a float4x4 matrix representing a combined scale-, rotation- and translation transform. Equivalent to mul(translationTransform, mul(rotationTransform, scaleTransform)). |
Operators
Name | Description |
---|---|
Addition(Single, float4x4) | Returns the result of a componentwise addition operation on a float value and a float4x4 matrix. |
Addition(float4x4, Single) | Returns the result of a componentwise addition operation on a float4x4 matrix and a float value. |
Addition(float4x4, float4x4) | Returns the result of a componentwise addition operation on two float4x4 matrices. |
Decrement(float4x4) | Returns the result of a componentwise decrement operation on a float4x4 matrix. |
Division(Single, float4x4) | Returns the result of a componentwise division operation on a float value and a float4x4 matrix. |
Division(float4x4, Single) | Returns the result of a componentwise division operation on a float4x4 matrix and a float value. |
Division(float4x4, float4x4) | Returns the result of a componentwise division operation on two float4x4 matrices. |
Equality(Single, float4x4) | Returns the result of a componentwise equality operation on a float value and a float4x4 matrix. |
Equality(float4x4, Single) | Returns the result of a componentwise equality operation on a float4x4 matrix and a float value. |
Equality(float4x4, float4x4) | Returns the result of a componentwise equality operation on two float4x4 matrices. |
Explicit(Boolean to float4x4) | Explicitly converts a single bool value to a float4x4 matrix by converting it to float and assigning it to every component. |
Explicit(Double to float4x4) | Explicitly converts a single double value to a float4x4 matrix by converting it to float and assigning it to every component. |
Explicit(bool4x4 to float4x4) | Explicitly converts a bool4x4 matrix to a float4x4 matrix by componentwise conversion. |
Explicit(double4x4 to float4x4) | Explicitly converts a double4x4 matrix to a float4x4 matrix by componentwise conversion. |
GreaterThan(Single, float4x4) | Returns the result of a componentwise greater than operation on a float value and a float4x4 matrix. |
GreaterThan(float4x4, Single) | Returns the result of a componentwise greater than operation on a float4x4 matrix and a float value. |
GreaterThan(float4x4, float4x4) | Returns the result of a componentwise greater than operation on two float4x4 matrices. |
GreaterThanOrEqual(Single, float4x4) | Returns the result of a componentwise greater or equal operation on a float value and a float4x4 matrix. |
GreaterThanOrEqual(float4x4, Single) | Returns the result of a componentwise greater or equal operation on a float4x4 matrix and a float value. |
GreaterThanOrEqual(float4x4, float4x4) | Returns the result of a componentwise greater or equal operation on two float4x4 matrices. |
Implicit(Matrix4x4 to float4x4) | Converts a Matrix4x4 to float4x4. |
Implicit(Int32 to float4x4) | Implicitly converts a single int value to a float4x4 matrix by converting it to float and assigning it to every component. |
Implicit(Single to float4x4) | Implicitly converts a single float value to a float4x4 matrix by assigning it to every component. |
Implicit(UInt32 to float4x4) | Implicitly converts a single uint value to a float4x4 matrix by converting it to float and assigning it to every component. |
Implicit(float4x4 to Matrix4x4) | Converts a float4x4 to Matrix4x4. |
Implicit(int4x4 to float4x4) | Implicitly converts a int4x4 matrix to a float4x4 matrix by componentwise conversion. |
Implicit(uint4x4 to float4x4) | Implicitly converts a uint4x4 matrix to a float4x4 matrix by componentwise conversion. |
Increment(float4x4) | Returns the result of a componentwise increment operation on a float4x4 matrix. |
Inequality(Single, float4x4) | Returns the result of a componentwise not equal operation on a float value and a float4x4 matrix. |
Inequality(float4x4, Single) | Returns the result of a componentwise not equal operation on a float4x4 matrix and a float value. |
Inequality(float4x4, float4x4) | Returns the result of a componentwise not equal operation on two float4x4 matrices. |
LessThan(Single, float4x4) | Returns the result of a componentwise less than operation on a float value and a float4x4 matrix. |
LessThan(float4x4, Single) | Returns the result of a componentwise less than operation on a float4x4 matrix and a float value. |
LessThan(float4x4, float4x4) | Returns the result of a componentwise less than operation on two float4x4 matrices. |
LessThanOrEqual(Single, float4x4) | Returns the result of a componentwise less or equal operation on a float value and a float4x4 matrix. |
LessThanOrEqual(float4x4, Single) | Returns the result of a componentwise less or equal operation on a float4x4 matrix and a float value. |
LessThanOrEqual(float4x4, float4x4) | Returns the result of a componentwise less or equal operation on two float4x4 matrices. |
Modulus(Single, float4x4) | Returns the result of a componentwise modulus operation on a float value and a float4x4 matrix. |
Modulus(float4x4, Single) | Returns the result of a componentwise modulus operation on a float4x4 matrix and a float value. |
Modulus(float4x4, float4x4) | Returns the result of a componentwise modulus operation on two float4x4 matrices. |
Multiply(Single, float4x4) | Returns the result of a componentwise multiplication operation on a float value and a float4x4 matrix. |
Multiply(float4x4, Single) | Returns the result of a componentwise multiplication operation on a float4x4 matrix and a float value. |
Multiply(float4x4, float4x4) | Returns the result of a componentwise multiplication operation on two float4x4 matrices. |
Subtraction(Single, float4x4) | Returns the result of a componentwise subtraction operation on a float value and a float4x4 matrix. |
Subtraction(float4x4, Single) | Returns the result of a componentwise subtraction operation on a float4x4 matrix and a float value. |
Subtraction(float4x4, float4x4) | Returns the result of a componentwise subtraction operation on two float4x4 matrices. |
UnaryNegation(float4x4) | Returns the result of a componentwise unary minus operation on a float4x4 matrix. |
UnaryPlus(float4x4) | Returns the result of a componentwise unary plus operation on a float4x4 matrix. |