Skip to content

hom_mat3d_composeHomMat3dComposeHomMat3dComposehom_mat3d_composeT_hom_mat3d_compose🔗

Short description🔗

hom_mat3d_composeHomMat3dComposeHomMat3dComposehom_mat3d_composeT_hom_mat3d_compose — Multiply two homogeneous 3D transformation matrices.

Signature🔗

hom_mat3d_compose( hom_mat3d HomMat3DLeft, hom_mat3d HomMat3DRight, out hom_mat3d HomMat3DCompose )void HomMat3dCompose( const HTuple& HomMat3DLeft, const HTuple& HomMat3DRight, HTuple* HomMat3DCompose )static void HOperatorSet.HomMat3dCompose( HTuple homMat3DLeft, HTuple homMat3DRight, out HTuple homMat3DCompose )def hom_mat3d_compose( hom_mat_3dleft: Sequence[float], hom_mat_3dright: Sequence[float] ) -> Sequence[float]

Herror T_hom_mat3d_compose( const Htuple HomMat3DLeft, const Htuple HomMat3DRight, Htuple* HomMat3DCompose )

HHomMat3D HHomMat3D::HomMat3dCompose( const HHomMat3D& HomMat3DRight ) const

HHomMat3D HHomMat3D.HomMat3dCompose( HHomMat3D homMat3DRight )

Description🔗

hom_mat3d_composeHomMat3dCompose composes a new 3D transformation matrix by multiplying the two input matrices:

\[\begin{eqnarray*} \textrm{HomMat3DCompose} = \textrm{HomMat3DLeft} \cdot \textrm{HomMat3DRight} \end{eqnarray*}\]

For example, if the two input matrices correspond to rigid transformations, i.e., to transformations consisting of a rotation and a translation, the resulting matrix is calculated as follows:

\[\begin{eqnarray*} \textrm{HomMat3DCompose} = \mvHomMatrixThreeDRotTrans{\mvRotationMatrixVar{}{l}} {\mvTranslationVectorVar{}{l}} \cdot \mvHomMatrixThreeDRotTrans{\mvRotationMatrixVar{}{r}} {\mvTranslationVectorVar{}{r}} = \mvHomMatrixThreeDRotTrans{ \mvRotationMatrixVar{}{l} \cdot \mvRotationMatrixVar{}{r}}{ \mvRotationMatrixVar{}{l} \cdot \mvTranslationVectorVar{}{r} + \mvTranslationVectorVar{}{l}} \end{eqnarray*}\]

Attention🔗

Note that homogeneous matrices are stored row-by-row as a tuple; the last row is usually not stored because it is identical for all homogeneous matrices that describe an affine transformation. For example, the homogeneous matrix \(\mvHomMatrixThreeDElements{ ra & rb & rc & td \\ re & rf & rg & th \\ ri & rj & rk & tl}\) is stored as the tuple [ra, rb, rc, td, re, rf, rg, th, ri, rj, rk, tl]. However, it is also possible to process full 4×4 matrices, which represent a projective 4D transformation.

Execution information🔗

Execution information
  • Multithreading type: reentrant (runs in parallel with non-exclusive operators).

  • Multithreading scope: global (may be called from any thread).

  • Processed without parallelization.

Parameters🔗

HomMat3DLefthomMat3DLefthom_mat_3dleft (input_control) hom_mat3d → (real)HTuple (double)HHomMat3D, HTuple (double)Sequence[float]Htuple (double)

Left input transformation matrix.

HomMat3DRighthomMat3DRighthom_mat_3dright (input_control) hom_mat3d → (real)HTuple (double)HHomMat3D, HTuple (double)Sequence[float]Htuple (double)

Right input transformation matrix.

HomMat3DComposehomMat3DComposehom_mat_3dcompose (output_control) hom_mat3d → (real)HTuple (double)HHomMat3D, HTuple (double)Sequence[float]Htuple (double)

Output transformation matrix.

Result🔗

If the parameters are valid, the operator hom_mat3d_composeHomMat3dCompose returns 2 (H_MSG_TRUE). If necessary, an exception is raised.

Combinations with other operators🔗

Combinations

Possible predecessors

hom_mat3d_composeHomMat3dCompose, hom_mat3d_translateHomMat3dTranslate, hom_mat3d_translate_localHomMat3dTranslateLocal, hom_mat3d_scaleHomMat3dScale, hom_mat3d_scale_localHomMat3dScaleLocal, hom_mat3d_rotateHomMat3dRotate, hom_mat3d_rotate_localHomMat3dRotateLocal, pose_to_hom_mat3dPoseToHomMat3d

Possible successors

hom_mat3d_composeHomMat3dCompose, hom_mat3d_translateHomMat3dTranslate, hom_mat3d_translate_localHomMat3dTranslateLocal, hom_mat3d_scaleHomMat3dScale, hom_mat3d_scale_localHomMat3dScaleLocal, hom_mat3d_rotateHomMat3dRotate, hom_mat3d_rotate_localHomMat3dRotateLocal

Alternatives

pose_composePoseCompose, dual_quat_composeDualQuatCompose

See also

affine_trans_point_3dAffineTransPoint3d, hom_mat3d_identityHomMat3dIdentity, hom_mat3d_rotateHomMat3dRotate, hom_mat3d_translateHomMat3dTranslate, pose_to_hom_mat3dPoseToHomMat3d, hom_mat3d_to_poseHomMat3dToPose

Module🔗

Foundation