RTCGETSCENELINEARBOUNDS(3)

πŸ’– NAME πŸ’–

rtcGetSceneLinearBounds β€” bestie, this one hands you the linear bounds of your scene. that's it, that's the whole job. πŸŽ€


✨ SYNOPSIS ✨

okay so first, the include, no skipping:

#include <embree4/rtcore.h>

and here's the struct you're gonna be filling out β€” she's aligned, literally:

struct RTCORE_ALIGN(16) RTCLinearBounds
{
  RTCBounds bounds0;
  RTCBounds bounds1;
};

and the function signature, copy it exactly bestie:

void rtcGetSceneLinearBounds(
  RTCScene scene,
  struct RTCLinearBounds* bounds_o
);

🌸 DESCRIPTION 🌸

so rtcGetSceneLinearBounds goes and asks the scene you pass in (that's the scene argument, duh) what its linear bounds are, and then it drops those bounds right into the destination pointer you gave it (that's the bounds_o argument). it's giving personal assistant energy fr fr. 🫢

and what even is a "linear bound" bestie?? okay so it's two whole bounding boxes bundled together, exactly how the RTCLinearBounds structure lays them out:

  • bounds0 β€” the bounding box for time 0
  • bounds1 β€” the bounding box for time 1

and here's the iconic part: if you linearly interpolate those two bounds out to some specific time t, you get the bounds for your geometry at that time. motion blur girlies, this one's for you. πŸ”₯

🚨 okay two things and they are NOT optional: - that destination pointer you hand over? it must be aligned to 16 bytes. no alignment, no vibes. - you can only call this after committing the scene. if you call it before committing, the result is undefined β€” and not the fun kind of undefined, the cursed kind. πŸ’€

πŸ’… EXIT STATUS πŸ’…

if it flops, an error code gets set, and you can go check it with rtcGetDeviceError. that's your little receipt of what went wrong. πŸ™ˆ


πŸ‘‘ SEE ALSO πŸ‘‘

go read these next, they're all in the same friend group:

  • rtcGetSceneBounds
  • rtcCommitScene
  • rtcJoinCommitScene

and that's the whole page bestie!! this lil manual page lives in the Embree Ray Tracing Kernels 4 docs β€” the page itself is titled rtcGetSce...nearBounds(3) (yes the header is truncated, it's a whole aesthetic, iykyk 😭). go commit your scene first and then come get your bounds. slay, aligned, periodt. πŸ’–βœ¨πŸ¦‹πŸŒΈ

πŸ“¦ where this page comes from