# 同時変換行列
$
\begin{pmatrix} rot_0 & rot_1 & rot_2 & pos_x \\
rot_3 & rot_4 & rot_5 & pos_y \\
rot_6 & rot_7 & rot_8 & pos_z \\
0 & 0 & 0 & 1 \end{pmatrix}
$
- rot 0 - 8
- オブジェクトの回転
- ローカル座標系の各軸に沿った回転をグローバル座標系に変換
- pos_x, pos_y, pos_z
- オブジェクトの平行移動
- ローカル座標系の原点がグローバル座標系でどこに位置するか
- (0, 0, 0, 1)
- 行列をホモジニアス座標形式にする
- 主に数学的な操作を単純化するために使用
与えられた同時変換行列 $M$
$
M = \begin{pmatrix} rot_0 & rot_1 & rot_2 & pos_x \\
rot_3 & rot_4 & rot_5 & pos_y \\
rot_6 & rot_7 & rot_8 & pos_z \\
0 & 0 & 0 & 1 \end{pmatrix}
$
ローカル座標
$
P_{local} = (x, y, z)
$
ホモジニアス座標に変換
$
P_{local} = (x, y, z, 1)
$
同時変換行列 $M$ を適用して、グローバル座標系における新しい位置 $P_{global}$ を計算
$
P_{global} = M \times P_{local}
$
$
\begin{pmatrix} rot_0 & rot_1 & rot_2 & pos_x \\
rot_3 & rot_4 & rot_5 & pos_y \\
rot_6 & rot_7 & rot_8 & pos_z \\
0 & 0 & 0 & 1 \end{pmatrix} \times \begin{pmatrix} x \\
y \\
z \\
1 \end{pmatrix}
$