quat_rotate_point_3d🔗
Short description🔗
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 )
Description🔗
Given a rotation quaternion (e.g., generated by axis_angle_to_quat),
the operator quat_rotate_point_3d can be used to rotate a 3D point
(Px, Py, Pz). The rotated point is returned in
(Qx, Qy, Qz).
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_conjugate). 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_3d does not check whether
Quaternion is a unit quaternion. If Quaternion 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🔗
Quaternion (input_control) quaternion → (real)
Rotation quaternion.
Px (input_control) real → (real)
X coordinate of the point to be rotated.
Py (input_control) real → (real)
Y coordinate of the point to be rotated.
Pz (input_control) real → (real)
Z coordinate of the point to be rotated.
Qx (output_control) real → (real)
X coordinate of the rotated point.
Qy (output_control) real → (real)
Y coordinate of the rotated point.
Qz (output_control) real → (real)
Z coordinate of the rotated point.
Combinations with other operators🔗
Combinations
Possible predecessors
See also
axis_angle_to_quat, quat_to_hom_mat3d, quat_compose, quat_normalize, quat_conjugate, quat_interpolate, dual_quat_trans_point_3d, dual_quat_trans_line_3d
Module🔗
Foundation