# AffineTransform

> Returns an AffineTransform constructed from a translation represented by a float3 vector and rotation represented by a unit quaternion.

## Definition

* **Type:** Method
* **Namespace:** [Unity.Mathematics](/engine/6000.7/script-reference/unity/mathematics.md)
* **Assembly:** UnityEngine.MathematicsModule

## AffineTransform(float3, quaternion)

Returns an AffineTransform constructed from a translation represented by a float3 vector and rotation represented by a unit quaternion.

```csharp
public static AffineTransform AffineTransform(float3 translation, quaternion rotation)
```

### Parameters

**** (\[float3]\(/engine/6000.7/script-reference/unity/mathematics/float3)): The AffineTransform translation.**** (\[quaternion]\(/engine/6000.7/script-reference/unity/mathematics/quaternion)): The AffineTransform rotation.

### Returns

| Type                                                                                    | Description                                                               |
| --------------------------------------------------------------------------------------- | ------------------------------------------------------------------------- |
| [AffineTransform](/engine/6000.7/script-reference/unity/mathematics/affinetransform.md) | The AffineTransform given the translation vector and rotation quaternion. |

## AffineTransform(float3, quaternion, float3)

Returns an AffineTransform constructed from a translation represented by a float3 vector, rotation represented by a unit quaternion and scale represented by a float3 vector.

```csharp
public static AffineTransform AffineTransform(float3 translation, quaternion rotation, float3 scale)
```

### Parameters

**** (\[float3]\(/engine/6000.7/script-reference/unity/mathematics/float3)): The translation vector.**** (\[quaternion]\(/engine/6000.7/script-reference/unity/mathematics/quaternion)): The rotation quaternion.**** (\[float3]\(/engine/6000.7/script-reference/unity/mathematics/float3)): The scale vector.

### Returns

| Type                                                                                    | Description                                                                             |
| --------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------- |
| [AffineTransform](/engine/6000.7/script-reference/unity/mathematics/affinetransform.md) | The AffineTransform given the translation vector, rotation quaternion and scale vector. |

## AffineTransform(float3, float3x3)

Returns an AffineTransform constructed from a translation represented by float3 vector and a float3x3 matrix representing both rotation and scale.

```csharp
public static AffineTransform AffineTransform(float3 translation, float3x3 rotationScale)
```

### Parameters

**** (\[float3]\(/engine/6000.7/script-reference/unity/mathematics/float3)): The translation vector.**** (\[float3x3]\(/engine/6000.7/script-reference/unity/mathematics/float3x3)): The rotation and scale matrix.

### Returns

| Type                                                                                    | Description                                                           |
| --------------------------------------------------------------------------------------- | --------------------------------------------------------------------- |
| [AffineTransform](/engine/6000.7/script-reference/unity/mathematics/affinetransform.md) | The AffineTransform given the translation vector and float3x3 matrix. |

## AffineTransform(float3x3)

Returns an AffineTransform constructed from a float3x3 matrix representing both rotation and scale.

```csharp
public static AffineTransform AffineTransform(float3x3 rotationScale)
```

### Parameters

**** (\[float3x3]\(/engine/6000.7/script-reference/unity/mathematics/float3x3)): The rotation and scale matrix.

### Returns

| Type                                                                                    | Description                                  |
| --------------------------------------------------------------------------------------- | -------------------------------------------- |
| [AffineTransform](/engine/6000.7/script-reference/unity/mathematics/affinetransform.md) | The AffineTransform given a float3x3 matrix. |

## AffineTransform(float4x4)

Returns an AffineTransform constructed from a float4x4 matrix.

```csharp
public static AffineTransform AffineTransform(float4x4 m)
```

### Parameters

**** (\[float4x4]\(/engine/6000.7/script-reference/unity/mathematics/float4x4)): The float4x4 matrix.

### Returns

| Type                                                                                    | Description                                  |
| --------------------------------------------------------------------------------------- | -------------------------------------------- |
| [AffineTransform](/engine/6000.7/script-reference/unity/mathematics/affinetransform.md) | The AffineTransform given a float4x4 matrix. |

## AffineTransform(float3x4)

Returns an AffineTransform constructed from a float3x4 matrix.

```csharp
public static AffineTransform AffineTransform(float3x4 m)
```

### Parameters

**** (\[float3x4]\(/engine/6000.7/script-reference/unity/mathematics/float3x4)): The float3x4 matrix.

### Returns

| Type                                                                                    | Description                                  |
| --------------------------------------------------------------------------------------- | -------------------------------------------- |
| [AffineTransform](/engine/6000.7/script-reference/unity/mathematics/affinetransform.md) | The AffineTransform given a float3x4 matrix. |

## AffineTransform(RigidTransform)

Returns an AffineTransform constructed from a RigidTransform.

```csharp
public static AffineTransform AffineTransform(RigidTransform rigid)
```

### Parameters

**** (\[RigidTransform]\(/engine/6000.7/script-reference/unity/mathematics/rigidtransform)): The RigidTransform.

### Returns

| Type                                                                                    | Description                                 |
| --------------------------------------------------------------------------------------- | ------------------------------------------- |
| [AffineTransform](/engine/6000.7/script-reference/unity/mathematics/affinetransform.md) | The AffineTransform given a RigidTransform. |
