RTCSETGEOMETRYTRANSFORM(3embree4)

πŸ’– NAME πŸ’–

rtcSetGeometryTransform β€” sets the transformation for a particular time step of an instance geometry. bestie. it literally puts your instance where you want it to be πŸ¦‹


✨ SYNOPSIS ✨

#include <embree4/rtcore.h>

void rtcSetGeometryTransform(
  RTCGeometry geometry,
  unsigned int timeStep,
  enum RTCFormat format,
  const float* xfm
);

🌸 DESCRIPTION 🌸

okay so here's the tea, bestie. rtcSetGeometryTransform sets the local-to-world affine transformation (that's the xfm parameter, the main character here πŸ‘‘) of an instance geometry (the geometry parameter) for a particular time step (the timeStep parameter). yes, a specific time step, because motion blur exists and she is booked and busy πŸ’…

the transformation gets specified as a 3Γ—4 matrix β€” and when we say 3Γ—4 we mean a 3Γ—3 linear transformation plus translation, no cap. the formats you can hand over via the format parameter are these iconic ones:

  • RTC_FORMAT_FLOAT3X4_ROW_MAJOR β€” the 3Γ—4 float matrix is laid out in row-major form. slay, rows first 🌈
  • RTC_FORMAT_FLOAT3X4_COLUMN_MAJOR β€” the 3Γ—4 float matrix is laid out in column-major form. columns first, periodt ✨
  • 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 being equal to (0, 0, 0, 1). it's giving extra row for free πŸŽ€

πŸ’€ EXIT STATUS πŸ’€

on failure, an error code gets set, and you can go query it with rtcGetDeviceError. not me being dramatic about it but fr fr, always check 😭


🫢 SEE ALSO 🫢

  • [RTC_GEOMETRY_TYPE_INSTANCE]

and that's the whole vibe, bestie πŸ’œ this was page rtcSetGeo...yTransform(3) from Embree Ray Tracing Kernels 4 β€” go set some transforms, you absolute icon πŸŒŸπŸ“

πŸ“¦ where this page comes from