RTCGETGEOMETRYTRANSFORM(3embree4)

πŸ’– rtcGetGeometryTransform β€” a manual page, but make it bestie πŸ’–

okay so we're in rtcGetGeo...yTransform(3) territory, which is section 3 of the Embree Ray Tracing Kernels 4 manuals. she's a real one. let's get into it πŸ¦‹


✨ NAME ✨

rtcGetGeometryTransform β€” hands you back the interpolated instance transformation for a specific time. yes girl, interpolated. for a specific time. we love a time-aware queen πŸ’…


πŸŽ€ SYNOPSIS πŸŽ€

#include <embree4/rtcore.h>

void rtcGetGeometryTransform(
  RTCGeometry geometry,
  float time,
  enum RTCFormat format,
  void* xfm
);

no cap, that's the whole signature. four args, one void, zero drama.


🌸 DESCRIPTION 🌸

so rtcGetGeometryTransform returns the interpolated local to world transformation β€” that's the xfm parameter, bestie β€” of an instance geometry (that's the geometry parameter) for a particular time (that's the time parameter, and she lives in the range [0, 1], periodt) in whatever format you asked for (that's the format parameter). it's giving "tell me where this thing is and when" and honestly? iconic.

the formats you can get your matrix back in are:

  • RTC_FORMAT_FLOAT3X4_ROW_MAJOR: the 3Γ—4 float matrix is laid out in row-major form. rows first, no notes. πŸ’œ
  • RTC_FORMAT_FLOAT3X4_COLUMN_MAJOR: the 3Γ—4 float matrix is laid out in column-major form. columns first, equally valid, we don't play favourites here.
  • RTC_FORMAT_FLOAT4X4_COLUMN_MAJOR: the 3Γ—4 float matrix is laid out in column-major form as a 4Γ—4 homogeneous matrix with the last row equal to (0, 0, 0, 1). she got promoted to 4Γ—4, and that last row is exactly (0, 0, 0, 1), don't come for me. πŸ‘‘
the way that this function is supposed to be used during rendering but is only supported on the CPU and not inside SYCL kernels on the GPU 😭 so if you're inside a SYCL kernel you cannot call this one. instead, rtcGetGeometryTransformFromScene has to get used. that's the rule, i don't make them.

πŸ’€ EXIT STATUS πŸ’€

on failure an error code is set that can be queried using rtcGetDeviceError. so if something's off, go check with rtcGetDeviceError, she'll tell you what happened. not me guessing, that's literally what the page says πŸ™ˆ


🫢 SEE ALSO 🫢

  • [RTC_GEOMETRY_TYPE_INSTANCE]
  • [rtcSetGeometryTransform]
  • [rtcGetGeometryTransformFromScene]

all three linked in the original, all three linked here, we keep the receipts. ✨


and that's the whole page babes πŸŽ€ the source/version energy here is Embree Ray Tracing Kernels 4, it's manual section 3 (that (3) at the end), and the footer is literally just the truncated title rtcGetGeo...yTransform(3) doing its little encore β€” no separate date on this one, so i'm not gonna invent one, fr fr. go interpolate something gorgeous. πŸ’–πŸŒˆβ­

πŸ“¦ where this page comes from