Skip to content

quat_rotate_point_3dQuatRotatePoint3dQuatRotatePoint3dquat_rotate_point_3dT_quat_rotate_point_3d🔗

Short description🔗

quat_rotate_point_3dQuatRotatePoint3dQuatRotatePoint3dquat_rotate_point_3dT_quat_rotate_point_3d — Perform a rotation by a unit quaternion.

Signature🔗

quat_rotate_point_3d( quaternion Quaternion, real Px, real Py, real Pz, out real Qx, out real Qy, out real Qz )void QuatRotatePoint3d( const HTuple& Quaternion, const HTuple& Px, const HTuple& Py, const HTuple& Pz, HTuple* Qx, HTuple* Qy, HTuple* Qz )static void HOperatorSet.QuatRotatePoint3d( HTuple quaternion, HTuple px, HTuple py, HTuple pz, out HTuple qx, out HTuple qy, out HTuple qz )def quat_rotate_point_3d( quaternion: Sequence[float], px: float, py: float, pz: float ) -> Tuple[float, float, float]

Herror T_quat_rotate_point_3d( const Htuple Quaternion, const Htuple Px, const Htuple Py, const Htuple Pz, Htuple* Qx, Htuple* Qy, Htuple* Qz )

double HQuaternion::QuatRotatePoint3d( double Px, double Py, double Pz, double* Qy, double* Qz ) const

double HQuaternion.QuatRotatePoint3d( double px, double py, double pz, out double qy, out double qz )

Description🔗

Given a rotation quaternion (e.g., generated by axis_angle_to_quatAxisAngleToQuat), the operator quat_rotate_point_3dQuatRotatePoint3d can be used to rotate a 3D point (Pxpxpx, Pypypy, Pzpzpz). The rotated point is returned in (Qxqxqx, Qyqyqy, Qzqzqz).

The rotation of a point \(x\) by an unit quaternion \(q\) is given by

\(x' = q x \bar{q}\).

\(\bar{q}\) corresponds to the conjugation of a quaternion \(q\) (see quat_conjugateQuatConjugate). Note that \(x\) will be transformed into quaternion form to perform the rotation. This is done by setting the real part to zero and the three imaginary components to the three components of \(x\).

Attention🔗

The operator quat_rotate_point_3dQuatRotatePoint3d does not check whether Quaternionquaternionquaternion is a unit quaternion. If Quaternionquaternionquaternion is not a unit quaternion, the result of this operator is not defined.

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🔗

Quaternionquaternionquaternion (input_control) quaternion → (real)HTuple (double)HQuaternion, HTuple (double)Sequence[float]Htuple (double)

Rotation quaternion.

Pxpxpx (input_control) real → (real)HTuple (double)HTuple (double)floatHtuple (double)

X coordinate of the point to be rotated.

Pypypy (input_control) real → (real)HTuple (double)HTuple (double)floatHtuple (double)

Y coordinate of the point to be rotated.

Pzpzpz (input_control) real → (real)HTuple (double)HTuple (double)floatHtuple (double)

Z coordinate of the point to be rotated.

Qxqxqx (output_control) real → (real)HTuple (double)HTuple (double)floatHtuple (double)

X coordinate of the rotated point.

Qyqyqy (output_control) real → (real)HTuple (double)HTuple (double)floatHtuple (double)

Y coordinate of the rotated point.

Qzqzqz (output_control) real → (real)HTuple (double)HTuple (double)floatHtuple (double)

Z coordinate of the rotated point.

Combinations with other operators🔗

Combinations

Possible predecessors

axis_angle_to_quatAxisAngleToQuat

See also

axis_angle_to_quatAxisAngleToQuat, quat_to_hom_mat3dQuatToHomMat3d, quat_composeQuatCompose, quat_normalizeQuatNormalize, quat_conjugateQuatConjugate, quat_interpolateQuatInterpolate, dual_quat_trans_point_3dDualQuatTransPoint3d, dual_quat_trans_line_3dDualQuatTransLine3d

Module🔗

Foundation