Struct RigidTransform
A rigid transformation type.
Namespace: Unity.Mathematics
Syntax
public struct RigidTransform
Constructors
Name | Description |
---|---|
RigidTransform(float3x3, float3) | Constructs a RigidTransform from a rotation represented by a float3x3 matrix and a translation represented by a float3 vector. |
RigidTransform(float4x4) | Constructs a RigidTransform from a float4x4. Assumes the matrix is orthonormal. |
RigidTransform(quaternion, float3) | Constructs a RigidTransform from a rotation represented by a unit quaternion and a translation represented by a float3 vector. |
Fields
Name | Description |
---|---|
identity | A RigidTransform representing the identity transform. |
pos | The translation part of the rigid transformation. |
rot | The rotation part of the rigid transformation. |
Methods
Name | Description |
---|---|
AxisAngle(float3, Single) | Returns a RigidTransform 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 RigidTransform is equal to a given RigidTransform, false otherwise. |
Equals(RigidTransform) | Returns true if the RigidTransform is equal to a given RigidTransform, false otherwise. |
Euler(Single, Single, Single, math.RotationOrder) | Returns a RigidTransform 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 RigidTransform 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 RigidTransform 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 RigidTransform 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 RigidTransform 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 RigidTransform 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 RigidTransform 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 RigidTransform 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 RigidTransform 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 RigidTransform 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 RigidTransform 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 RigidTransform 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 RigidTransform 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 RigidTransform 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 RigidTransform. |
RotateX(Single) | Returns a RigidTransform that rotates around the x-axis by a given number of radians. |
RotateY(Single) | Returns a RigidTransform that rotates around the y-axis by a given number of radians. |
RotateZ(Single) | Returns a RigidTransform that rotates around the z-axis by a given number of radians. |
ToString() | Returns a string representation of the RigidTransform. |
ToString(String, IFormatProvider) | Returns a string representation of the RigidTransform using a specified format and culture-specific format information. |
Translate(float3) | Returns a RigidTransform that translates by an amount specified by a float3 vector. |