RTCSETGEOMETRYTRANSFORMQUATERNION(3)
π NAME
rtcSetGeometryTransformQuaternion β bestie, this one sets the transformation for a particular time step of an instance geometry, and it does it as a decomposition of the transformation matrix using quaternions to represent the rotation. Yes, that's a lot of words. We'll get through it together π«Ά
This page lives in section 3 of the Embree Ray Tracing Kernels 4 manuals, and the title is that long boi up there, rtcSetGeo...Quaternion β the man page system truncated it because even it got tired π
β¨ SYNOPSIS β¨
#include <embree4/rtcore.h>
void rtcSetGeometryTransformQuaternion(
RTCGeometry geometry,
unsigned int timeStep,
const struct RTCQuaternionDecomposition* qd
);
πΈ DESCRIPTION πΈ
Okay so. The rtcSetGeometryTransformQuaternion function sets the local-to-world affine transformation β that's the qd parameter, queen β of an instance geometry (that's the geometry parameter) for a particular time step (that's the timeStep parameter, we love a themed naming scheme π).
And the transformation is specified as an [RTCQuaternionDecomposition], which is, quote unquote, a decomposition of an affine transformation that represents the rotational component of an affine transformation as a quaternion. Why do we care? Because this lets you interpolate rotational transformations exactly using spherical linear interpolation β like a turning wheel π‘β¨, which honestly ate.
Want the full lore on the decomposition? Go read up on [RTCQuaternionDecomposition]. And heads up: the quaternion you put in the RTCQuaternionDecomposition struct will be normalized internally π§ so don't stress about pre-normalizing it yourself.
β οΈ Okay bestie, this is the important one, no cap: for correct results, the transformation matrices for all time steps must be set either usingrtcSetGeometryTransformorrtcSetGeometryTransformQuaternion. Mixing both representations is not allowed. Pick a lane, we don't do situationships here π
And also: spherical linear interpolation will be used iff the transformation matrices are set with rtcSetGeometryTransformQuaternion. Iff means if-and-only-if. Iconic logic, periodt.
For an example of this whole feature in action, go check out the tutorial [Quaternion Motion Blur] π
π EXIT STATUS π
On failure, an error code is set β and you can go query it with rtcGetDeviceError π΅οΈβοΈ
π SEE ALSO π
- [
rtcInitQuaternionDecomposition] - [
rtcSetGeometryTransform]
Anyway, that's the whole page, mwah π this one came out of the Embree Ray Tracing Kernels 4 manuals, section 3, and if you need to cite it, it's the rtcSetGeo...Quaternion(3) page. Go set some quaternions, you're gonna slay π¦β¨
π¦ where this page comes from
- ubuntu stonking: libembree-dev 4.4.1+dfsg-2ubuntu1 Β· Apache-2.0
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms