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