主要内容

rigid3d

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

不建议使用 rigid3d。请改用 rigidtform3d 对象。有关详细信息,请参阅版本历史记录

说明

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

创建对象

描述

tform = rigid3d 创建对应于恒等变换的默认 rigid3d 对象。

tform = rigid3d(t)T 属性设置为指定的三维刚性变换矩阵 t

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

示例

属性

全部展开

正向刚性变换,指定为 4×4 数值矩阵。此矩阵必须为满足由下式给出的后乘约定的齐次变换矩阵:

[xyz1]=[uvw1]*T

T 的形式为

[r11r12r130;...r21r22r230;...r31r32r330;...txtytz1];

数据类型: single | double

变换的旋转分量,指定为 3×3 数值矩阵。此旋转矩阵满足由下式给出的后乘约定:

[xyz]=[uvw]*R

数据类型: single | double

变换的平移分量,指定为一个包含 3 个元素的数值行向量。此平移向量满足由下式给出的约定:

[xyz]=[uvw]+t

数据类型: single | double

此 属性 为只读。

几何变换的维度,指定为值 3

对象函数

invertInvert geometric transformation
outputLimitsFind output spatial limits given input spatial limits
transformPointsForwardApply forward geometric transformation
transformPointsInverseApply inverse geometric transformation

示例

全部折叠

以度为单位指定旋转角度,并创建一个 3×3 旋转矩阵。

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

分别指定水平、垂直和深度方向的平移量。

trans = [2 3 4];

创建一个执行旋转和平移的 rigid3d 对象。

tform = rigid3d(rot,trans)
tform = 
  rigid3d with properties:

       Rotation: [3×3 double]
    Translation: [2 3 4]

扩展功能

全部展开

版本历史记录

在 R2020a 中推出

全部折叠