> ## Documentation Index
> Fetch the complete documentation index at: https://docs.encord.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Beta.scene.pose

Public pose types and convenience constructors.

## Position Objects

```python theme={"dark"}
@dataclass
class Position()
```

3-D position (translation).

## CompositePose Objects

```python theme={"dark"}
@dataclass
class CompositePose()
```

Rotation + position pair.

## AffinePose Objects

```python theme={"dark"}
@dataclass
class AffinePose()
```

4x4 affine transform matrix (16 floats, **column-major**).

The 16 values are stored column-by-column::

Given the matrix:
\| r00  r01  r02  tx |
\| r10  r11  r12  ty |
\| r20  r21  r22  tz |
\|  0    0    0    1 |

Flat order: \[r00, r10, r20, 0,
r01, r11, r21, 0,
r02, r12, r22, 0,
tx,  ty,  tz,  1]

The upper-left 3x3 must be a proper rotation matrix (orthogonal,
`det = 1`). The fourth column is translation and the fourth row
must be `[0, 0, 0, 1]`. These constraints are enforced server-side.

#### quaternion\_pose

```python theme={"dark"}
def quaternion_pose(qx: float, qy: float, qz: float, qw: float, x: float,
                    y: float, z: float) -> CompositePose
```

Create a pose from a unit quaternion rotation and a position.

The quaternion must have unit magnitude (server-side validated).
See [QuaternionRotation](https://docs.encord.com/sdk-documentation/sdk-references/beta.scene.rotation.md#quaternionrotation-objects) for constraints.

**Arguments**:

* `qx` - Quaternion *x* component (in `[-1, 1]`).
* `qy` - Quaternion *y* component (in `[-1, 1]`).
* `qz` - Quaternion *z* component (in `[-1, 1]`).
* `qw` - Quaternion *w* (scalar) component (in `[-1, 1]`).
* `x` - Translation along the world *x*-axis.
* `y` - Translation along the world *y*-axis.
* `z` - Translation along the world *z*-axis.

#### euler\_pose

```python theme={"dark"}
def euler_pose(rx: float, ry: float, rz: float, x: float, y: float,
               z: float) -> CompositePose
```

Create a pose from Euler angles (radians) and a position.

Rotation order is extrinsic X-Y-Z. See [EulerRotation](https://docs.encord.com/sdk-documentation/sdk-references/beta.scene.rotation.md#eulerrotation-objects) for
constraints.

**Arguments**:

* `rx` - Rotation around the *x*-axis in radians.
* `ry` - Rotation around the *y*-axis in radians.
* `rz` - Rotation around the *z*-axis in radians.
* `x` - Translation along the world *x*-axis.
* `y` - Translation along the world *y*-axis.
* `z` - Translation along the world *z*-axis.

#### matrix\_pose

```python theme={"dark"}
def matrix_pose(rotation: Sequence[float], x: float, y: float,
                z: float) -> CompositePose
```

Create a pose from a 3x3 rotation matrix and a position.

See [MatrixRotation](https://docs.encord.com/sdk-documentation/sdk-references/beta.scene.rotation.md#matrixrotation-objects) for constraints (orthogonal, `det = 1`).

**Arguments**:

* `rotation` - Nine floats in **column-major** order representing a
  3x3 rotation matrix.
* `x` - Translation along the world *x*-axis.
* `y` - Translation along the world *y*-axis.
* `z` - Translation along the world *z*-axis.

#### affine\_transform

```python theme={"dark"}
def affine_transform(matrix: Sequence[float]) -> AffinePose
```

Create a pose from a 4x4 affine transform matrix.

See [AffinePose](https://docs.encord.com/sdk-documentation/sdk-references/beta.scene.pose.md#affinepose-objects) for constraints (rotation submatrix must be
proper, bottom row `[0, 0, 0, 1]`).

**Arguments**:

* `matrix` - Sixteen floats in **column-major** order. The fourth
  row must be `[0, 0, 0, 1]`.

#### identity\_pose

```python theme={"dark"}
def identity_pose() -> CompositePose
```

Return the identity pose (no rotation, no translation).

#### translation\_only

```python theme={"dark"}
def translation_only(x: float, y: float, z: float) -> CompositePose
```

Create a pose with translation but no rotation.

**Arguments**:

* `x` - Translation along the world *x*-axis.
* `y` - Translation along the world *y*-axis.
* `z` - Translation along the world *z*-axis.

#### rotation\_only

```python theme={"dark"}
def rotation_only(rotation: Rotation) -> CompositePose
```

Create a pose with rotation but no translation.

**Arguments**:

* `rotation` - Any supported rotation type (quaternion, Euler, or
  matrix).


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.