RTCQuater...mposition(3)
π RTCQuaternionDecomposition(3) π
okay bestie, sit down, hydrate, because we're talking about RTCQuaternionDecomposition β and yes, it's from Embree Ray Tracing Kernels 3, so you already know it's giving serious graphics-girl energy. β¨
πΈ NAME πΈ
RTCQuaternionDecomposition β it's a struct, and what it represents is a whole entire quaternion decomposition of an affine transformation. like, the whole vibe. the full breakdown. no crumbs. π
β¨ SYNOPSIS β¨
struct RTCQuaternionDecomposition
{
float scale_x, scale_y, scale_z;
float skew_xy, skew_xz, skew_yz;
float shift_x, shift_y, shift_z;
float quaternion_r, quaternion_i, quaternion_j, quaternion_k;
float translation_x, translation_y, translation_z;
};
look at her. fifteen floats. a main character lineup fr fr. π
π¦ DESCRIPTION π¦
so the tea is: this struct, RTCQuaternionDecomposition, represents an affine transformation that's been decomposed into three separate parts. not two. not four. three. periodt.
part one is an upper triangular scaling/skew/shift matrix:
$$ S = \left( \begin{array}{cccc} scale_x & skew_{xy} & skew_{xz}
& shift_x \\ 0 & scale_y & skew_{yz} & shift_y \\ 0 & 0 & scale_z
& shift_z \\ 0 & 0 & 0 & 1 \\ \end{array} \right), $$
part two is a translation matrix:
$$ T = \left( \begin{array}{cccc} 1 & 0 & 0 & translation_x \\ 0
& 1 & 0 & translation_y \\ 0 & 0 & 1 & translation_z \\ 0 & 0 & 0
& 1 \\ \end{array} \right), $$
part three is a rotation matrix R, and the way we're repping it is as a quaternion:
quaternion_r + quaternion_i i + quaternion_j i + quaternion_k k
where i, j k are the imaginary quaternion units. π§
π«Ά heads up bestie: the quaternion you pass in will be normalized internally. you don't gotta do it yourself, it's handled. iconic behavior honestly.
so the affine transformation matrix that corresponds to a RTCQuaternionDecomposition is TRS, and a point p = (p_x, p_y, p_z, 1)^T gets transformed like this:
pβ² = T R S p.
not me staring at that equation like it's a love letter. ππ
and because setting all those fields by hand is so much typing (iykyk), these functions exist to make it convenient:
rtcInitQuaternionDecompositionrtcQuaternionDecompositionSetQuaternionrtcQuaternionDecompositionSetScalertcQuaternionDecompositionSetSkewrtcQuaternionDecompositionSetShiftrtcQuaternionDecompositionSetTranslation
they all let you set the fields of the structure more conveniently. use them. your wrists will thank you. π
π EXIT STATUS π
No error code is set by this function.
literally nothing. silence. no drama, no errors, no exit code. she simply does not set one. π
π SEE ALSO π
- [
rtcSetGeometryTransformQuaternion] - [
rtcInitQuaternionDecomposition]
and that's the whole page bestie, we ate and left absolutely no crumbs πβ¨ β this was RTCQuaternionDecomposition(3) from Embree Ray Tracing Kernels 3, and the footer is doing its lil truncated thing as RTCQuater...mposition(3) because even manpages get shy sometimes π
π¦
π¦ where this page comes from
- epel 9: embree 3.13.5-4.el9 Β· Apache-2.0
- fedora 43: embree3 3.13.5-9.fc41 Β· Apache-2.0
- fedora 44: embree3 3.13.5-16.fc44 Β· Apache-2.0
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms