Skip to content

affine_trans_point_3dAffineTransPoint3dAffineTransPoint3daffine_trans_point_3dT_affine_trans_point_3d🔗

Short description🔗

affine_trans_point_3dAffineTransPoint3dAffineTransPoint3daffine_trans_point_3dT_affine_trans_point_3d — Apply an arbitrary affine 3D transformation to points.

Signature🔗

affine_trans_point_3d( hom_mat3d HomMat3D, point3d.x Px, point3d.y Py, point3d.z Pz, out point3d.x Qx, out point3d.y Qy, out point3d.z Qz )void AffineTransPoint3d( const HTuple& HomMat3D, const HTuple& Px, const HTuple& Py, const HTuple& Pz, HTuple* Qx, HTuple* Qy, HTuple* Qz )static void HOperatorSet.AffineTransPoint3d( HTuple homMat3D, HTuple px, HTuple py, HTuple pz, out HTuple qx, out HTuple qy, out HTuple qz )def affine_trans_point_3d( hom_mat_3d: Sequence[float], px: MaybeSequence[Union[float, int]], py: MaybeSequence[Union[float, int]], pz: MaybeSequence[Union[float, int]] ) -> Tuple[Sequence[float], Sequence[float], Sequence[float]]

def affine_trans_point_3d_s( hom_mat_3d: Sequence[float], px: MaybeSequence[Union[float, int]], py: MaybeSequence[Union[float, int]], pz: MaybeSequence[Union[float, int]] ) -> Tuple[float, float, float]Herror T_affine_trans_point_3d( const Htuple HomMat3D, const Htuple Px, const Htuple Py, const Htuple Pz, Htuple* Qx, Htuple* Qy, Htuple* Qz )

HTuple HHomMat3D::AffineTransPoint3d( const HTuple& Px, const HTuple& Py, const HTuple& Pz, HTuple* Qy, HTuple* Qz ) const

double HHomMat3D::AffineTransPoint3d( double Px, double Py, double Pz, double* Qy, double* Qz ) const

HTuple HHomMat3D.AffineTransPoint3d( HTuple px, HTuple py, HTuple pz, out HTuple qy, out HTuple qz )

double HHomMat3D.AffineTransPoint3d( double px, double py, double pz, out double qy, out double qz )

Description🔗

affine_trans_point_3dAffineTransPoint3d applies an arbitrary affine 3D transformation, i.e., scaling, rotation, and translation, to the input points (Pxpxpx,Pypypy,Pzpzpz) and returns the resulting points in (Qxqxqx, Qyqyqy,Qzqzqz). The affine transformation is described by the homogeneous transformation matrix given in HomMat3DhomMat3Dhom_mat_3d. This corresponds to the following equation (input and output points as homogeneous vectors):

\[\begin{eqnarray*} \mvHomVectorThreeD{\textrm{Qx}}{\textrm{Qy}}{\textrm{Qz}} = \textrm{HomMat3D} \cdot \mvHomVectorThreeD{\textrm{Px}}{\textrm{Py}}{\textrm{Pz}} \end{eqnarray*}\]

The transformation matrix can be created using the operators hom_mat3d_identityHomMat3dIdentity, hom_mat3d_scaleHomMat3dScale, hom_mat3d_rotateHomMat3dRotate, hom_mat3d_translateHomMat3dTranslate, etc., or be the result of pose_to_hom_mat3dPoseToHomMat3d.

For example, if HomMat3DhomMat3Dhom_mat_3d corresponds to a rigid transformation, i.e., if it consists of a rotation and a translation, the points are transformed as follows:

\[\begin{eqnarray*} \mvHomVectorThreeD{\textrm{Qx}}{\textrm{Qy}}{\textrm{Qz}} \: = \: \mvHomMatrixThreeDRotTrans{\mvRotationMatrixVar{}{}} {\mvTranslationVectorVar{}{}} \cdot \mvHomVectorThreeD{\textrm{Px}}{\textrm{Py}}{\textrm{Pz}} \: = \: \mvVectorTwoD{\mvRotationMatrixVar{}{} \cdot \mvVectorThreeD{\textrm{Px}}{\textrm{Py}}{\textrm{Pz}} + \mvTranslationVectorVar{}{}}{1} \end{eqnarray*}\]

Execution information🔗

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

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

  • Automatically parallelized on internal data level.

Parameters🔗

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

Input transformation matrix.

Pxpxpx (input_control) point3d.x(-array) → (real / integer)HTuple (double / Hlong)HTuple (double / int / long)MaybeSequence[Union[float, int]]Htuple (double / Hlong)

Input point(s) (x coordinate).

Default: 6464
Suggested values: 0, 16, 32, 64, 128, 256, 512, 10240, 16, 32, 64, 128, 256, 512, 1024

Pypypy (input_control) point3d.y(-array) → (real / integer)HTuple (double / Hlong)HTuple (double / int / long)MaybeSequence[Union[float, int]]Htuple (double / Hlong)

Input point(s) (y coordinate).

Default: 6464
Suggested values: 0, 16, 32, 64, 128, 256, 512, 10240, 16, 32, 64, 128, 256, 512, 1024

Pzpzpz (input_control) point3d.z(-array) → (real / integer)HTuple (double / Hlong)HTuple (double / int / long)MaybeSequence[Union[float, int]]Htuple (double / Hlong)

Input point(s) (z coordinate).

Default: 6464
Suggested values: 0, 16, 32, 64, 128, 256, 512, 10240, 16, 32, 64, 128, 256, 512, 1024

Qxqxqx (output_control) point3d.x(-array) → (real)HTuple (double)HTuple (double)Sequence[float]Htuple (double)

Output point(s) (x coordinate).

Qyqyqy (output_control) point3d.y(-array) → (real)HTuple (double)HTuple (double)Sequence[float]Htuple (double)

Output point(s) (y coordinate).

Qzqzqz (output_control) point3d.z(-array) → (real)HTuple (double)HTuple (double)Sequence[float]Htuple (double)

Output point(s) (z coordinate).

Result🔗

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

Combinations with other operators🔗

Combinations

Possible predecessors

hom_mat3d_translateHomMat3dTranslate, hom_mat3d_translate_localHomMat3dTranslateLocal, hom_mat3d_scaleHomMat3dScale, hom_mat3d_scale_localHomMat3dScaleLocal, hom_mat3d_rotateHomMat3dRotate, hom_mat3d_rotate_localHomMat3dRotateLocal

Possible successors

hom_mat3d_translateHomMat3dTranslate, hom_mat3d_translate_localHomMat3dTranslateLocal, hom_mat3d_scaleHomMat3dScale, hom_mat3d_scale_localHomMat3dScaleLocal, hom_mat3d_rotateHomMat3dRotate, hom_mat3d_rotate_localHomMat3dRotateLocal

Module🔗

Foundation