# rigid3d

（不推荐）使用后乘约定的三维刚性几何变换

## 说明

`rigid3d` 对象存储有关三维刚性几何变换的信息，并支持正向变换和逆变换。

## 创建对象

### 语法

``tform = rigid3d``
``tform = rigid3d(t)``
``tform = rigid3d(rot,trans)``

### 描述

``tform = rigid3d` 创建对应于恒等变换的默认 `rigid3d` 对象。`
``tform = rigid3d(t)` 将 `T` 属性设置为指定的三维刚性变换矩阵 `t`。`

``tform = rigid3d(rot,trans)` 将 `Rotation` 和 `Translation` 属性分别设置为指定的旋转矩阵 `rot` 和平移向量 `trans`。`

## 属性

`$\left[\begin{array}{cccc}x& y& z& 1\end{array}\right]=\left[\begin{array}{cccc}u& v& w& 1\end{array}\right]*T$`

`T` 的形式为

`$\begin{array}{ccccc}\left[{r}_{11}& {r}_{12}& {r}_{13}& 0;& ...\\ {r}_{21}& {r}_{22}& {r}_{23}& 0;& ...\\ {r}_{31}& {r}_{32}& {r}_{33}& 0;& ...\\ {t}_{x}& {t}_{y}& {t}_{z}& 1\right];& \end{array}$`

`$\left[\begin{array}{ccc}x& y& z\end{array}\right]=\left[\begin{array}{ccc}u& v& w\end{array}\right]*R$`

`$\left[\begin{array}{ccc}x& y& z\end{array}\right]=\left[\begin{array}{ccc}u& v& w\end{array}\right]+t$`

## 对象函数

 `invert` Invert geometric transformation `outputLimits` Find output spatial limits given input spatial limits `transformPointsForward` Apply forward geometric transformation `transformPointsInverse` Apply inverse geometric transformation

## 示例

```theta = 30; rot = [ cosd(theta) sind(theta) 0; ... -sind(theta) cosd(theta) 0; ... 0 0 1];```

`trans = [2 3 4];`

`tform = rigid3d(rot,trans)`
```tform = rigid3d with properties: Rotation: [3x3 double] Translation: [2 3 4] ```

## 版本历史记录

### R2022b: 不推荐

• 将函数名称 `rigid3d` 的实例更改为 `rigidtform3d`

• 将变换矩阵指定为 `T` 的转置，或将旋转矩阵指定为 `Rotation` 的转置。`T``rigid3d` 对象的 `T` 属性的值，或用于创建 `rigid3d` 对象的变换矩阵。`Rotation``rigid3d` 对象的 `Rotation` 属性的值，或用于创建 `rigid3d` 对象的旋转矩阵。

```T = [1 0 0 0; 0 1 0 0; 0 0 1 0; 5 10 -5 1]; tformPost = rigid3d(T);```

```T = [1 0 0 0; 0 1 0 0; 0 0 1 0; 5 10 -5 1]; tform = rigidtform3d(T');```

```T = tformPost.T; tform = rigidtform2d(T');```

```theta = 30; rot = [ cosd(theta) sind(theta) 0; ... -sind(theta) cosd(theta) 0; ... 0 0 1]; trans = [5 10 -5]; tformPost = rigid3d(rot,trans);```

```theta = 30; rot = [ cosd(theta) sind(theta) 0; ... -sind(theta) cosd(theta) 0; ... 0 0 1]; trans = [5 10 -5]; tform = rigidtform3d(rot',trans);```