AffineTransform
An affine transformation type.
Read time 1 minuteLast updated 11 days ago
Definition
- Type: Struct
- Namespace: Unity.Mathematics
- Assembly: UnityEngine.MathematicsModule
- Implements: IEquatable<AffineTransform>, IFormattable
public struct AffineTransform : IEquatable<AffineTransform>, IFormattable
Fields
Value | Description |
|---|---|
| rs | The rotation and scale part of the affine transformation. |
| t | The translation part of the affine transformation. |
Static Fields
Value | Description |
|---|---|
| identity | An AffineTransform representing the identity transform. |
| zero | An AffineTransform zero value. |
Constructors
Constructor | Description |
|---|---|
| AffineTransform(Unity.Mathematics.float3,Unity.Mathematics.float3x3) | Constructs an AffineTransform from a translation represented by float3 vector and a float3x3 matrix representing both rotation and scale. |
| AffineTransform(Unity.Mathematics.float3,Unity.Mathematics.quaternion) | Constructs an AffineTransform from a translation represented by a float3 vector and rotation represented by a unit quaternion. |
| AffineTransform(Unity.Mathematics.float3,Unity.Mathematics.quaternion,Unity.Mathematics.float3) | Constructs an AffineTransform from a translation represented by a float3 vector, rotation represented by a unit quaternion and scale represented by a float3 vector. |
| AffineTransform(Unity.Mathematics.float3x3) | Constructs an AffineTransform from float3x3 matrix representating both rotation and scale. |
| AffineTransform(Unity.Mathematics.float3x4) | Constructs an AffineTransform from a float3x4 matrix. |
| AffineTransform(Unity.Mathematics.float4x4) | Constructs an AffineTransform from a float4x4 matrix. |
| AffineTransform(Unity.Mathematics.RigidTransform) | Constructs an AffineTransform from a RigidTransform. |
Methods
Method | Description |
|---|---|
| Equals | Returns true if the AffineTransform is equal to a given AffineTransform, false otherwise. |
| GetHashCode | Returns a hash code for the AffineTransform. |
| ToString | Returns a string representation of the AffineTransform. |