rtcGetGeo...FromScene(3)

✨ rtcGetGeo...FromScene(3) ✨

okay bestie, sit down, hydrate, and let me tell you about rtcGetGeometryTransformFromScene from the Embree Ray Tracing Kernels 4 era πŸ’– (yes the page name is abbreviated, that's just how it is, she's mysterious like that πŸŽ€)


🌸 NAME 🌸

rtcGetGeometryTransformFromScene β€” returns the interpolated instance transformation for the specified time πŸ•°οΈβœ¨


πŸ¦‹ SYNOPSIS πŸ¦‹

#include <embree4/rtcore.h>

void rtcGetGeometryTransformFromScene(
  RTCScene scene,
  unsigned int geomID,
  float time,
  enum RTCFormat format,
  void* xfm
);

πŸ’… DESCRIPTION πŸ’…

so like, the rtcGetGeometryTransformFromScene function returns the interpolated local to world transformation (that's your xfm output parameter, she's the main character here πŸ‘‘) of an instance geometry. which instance geometry tho? the one specified by its geometry ID β€” that's the geomID parameter πŸ’– β€” inside a scene (the scene parameter, duh) for a particular time (the time parameter, and she lives in the range [0, 1] fr fr) in the specified format (the format parameter ✨).

the possible formats for the returned matrix are, and listen closely because this matters:

  • 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 the last row equal to (0, 0, 0, 1) πŸ“

and now the plot twist that makes her iconic: in contrast to the rtcGetGeometryTransform function, rtcGetGeometryTransformFromScene can get used during rendering inside a SYCL kernel πŸ”₯ that's the whole point of her existence, no cap.


😭 EXIT STATUS 😭

on failure, an error code is set β€” and you can query it using rtcGetDeviceError πŸ™ˆ


πŸ’€ SEE ALSO πŸ’€

  • [RTC_GEOMETRY_TYPE_INSTANCE]
  • [rtcSetGeometryTransform]
  • [rtcGetGeometryTransform]

go read those too, bestie, they're giving family reunion energy 🫢


Embree Ray Tracing Kernels 4 ✨ page rtcGetGeo...FromScene(3) ✨ and that's the whole tea, thanks for coming to my ted talk, mwah πŸ’–πŸŽ€πŸ¦‹πŸŒΈπŸ‘‘

πŸ“¦ where this page comes from