RTCGETGEOMETRYTRANSFORMEX(3embree4)
β¨ NAME β¨
rtcGetGeometryTransformEx β bestie, this one hands you back the interpolated instance transformation for an instance of an instance array geometry, for whatever time you ask for. π
π¦ SYNOPSIS π¦
#include <embree4/rtcore.h>
void rtcGetGeometryTransformEx(
RTCGeometry geometry,
unsigned int instPrimID,
float time,
enum RTCFormat format,
void* xfm
);
π DESCRIPTION π
Okay so. rtcGetGeometryTransformEx gives you the interpolated local-to-world transformation β that's the xfm parameter, she's your output β of the instPrimID-th instance of an instance array geometry (the geometry parameter, obviously π) for one particular time (and that time parameter lives in the range [0, 1], no cap), in whatever format you asked for.
And like, plot twist, you can totally use this when geometry refers to a regular instance too β but then instPrimID has to be 0. Periodt. Don't fight it. π
The possible formats for the returned matrix are, and I need you to read these carefully because the names are giving:
RTC_FORMAT_FLOAT3X4_ROW_MAJORβ the 3Γ4 float matrix is laid out in row-major form. πRTC_FORMAT_FLOAT3X4_COLUMN_MAJORβ the 3Γ4 float matrix is laid out in column-major form. π¦RTC_FORMAT_FLOAT4X4_COLUMN_MAJORβ the 3Γ4 float matrix is laid out in column-major form as a 4Γ4 homogeneous matrix with last row equal to(0, 0, 0, 1). π
Lowkey important: row-major vs column-major is not a vibe, it's a memory layout, and picking the wrong one means your matrix is a whole mess. Read the names. Twice. π
πΈ EXIT STATUS πΈ
If it doesn't work out, an error code gets set, and you can go ask about it with rtcGetDeviceError. She'll tell you what went wrong, bestie. π«Ά
π SEE ALSO π
[RTC_GEOMETRY_TYPE_INSTANCE_ARRAY]β go read up on the geometry type that makes all of this possible. Iconic behavior honestly. β
That's the whole page, angel β no notes, we ate. This one's from Embree Ray Tracing Kernels 4, the rtcGetGeo...ransformEx(3) era, and if the page is truncated like that in your terminal it's just the man page being dramatic about column width. Byeee πβ¨
π¦ where this page comes from
- alpine 3.24: embree-doc 4.4.1-r0 Β· Apache-2.0
- arch rolling: embree 4.4.1-1 Β· Apache-2.0
- fedora 43: embree 4.4.1-1.fc43 Β· Apache-2.0
- fedora 44: embree 4.4.1-1.fc44 Β· Apache-2.0
- nixpkgs unstable: embree 4.4.1
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms