RTCGETSCENELINEARBOUNDS(3embree3)

πŸ“¦ version 3.13.5, in epel 9, fedora 43, fedora 44

πŸ’… rtcGetSceneLinearBounds β€” bestie edition

okay so real talk, we're in the Embree Ray Tracing Kernels 3 manual, page rtcGetSceneLinearBounds(3), and this one is lowkey one of my faves because it's short and it slays ✨


πŸŽ€ NAME πŸŽ€

rtcGetSceneLinearBounds β€” returns the linear bounds of the scene. that's it, that's the whole job, and she does it flawlessly πŸ’–


✨ SYNOPSIS ✨

#include <embree3/rtcore.h>

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

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

like, look at her. so clean. so demure. RTCORE_ALIGN(16) is right there in the struct definition, remember that, it comes back later and it is NOT a vibe to ignore πŸ™ˆ


πŸ¦‹ DESCRIPTION πŸ¦‹

so what does rtcGetSceneLinearBounds actually do, bestie? it queries the linear bounds of the scene you hand it (that's the scene argument 🫢) and it stores them into the destination pointer you gave it (that's bounds_o, mwah, thanks for the pointer babe).

the stored linear bounds are literally made of two bounding boxes:

  • a bounding box for time 0 β€” that's the bounds0 member πŸ‘‘
  • a bounding box for time 1 β€” that's the bounds1 member πŸ’œ

both of those live inside the RTCLinearBounds structure, exactly like the synopsis said, no notes.

and the way that this works is: you linearly interpolate these bounds to a specific time t and boom πŸ’₯ you get the bounds for the geometry at that time. it's giving math but make it fashion.

⚠️ okay two things, and I need you to actually listen, bestie: - the destination pointer you pass in must be aligned to 16 bytes. sixteen. one-six. not 8, not 15, not "close enough". do it or don't come crying to me 😭 - the function may be called only after committing the scene, otherwise the result is undefined. undefined!! we do not do undefined behaviour in this house. commit the scene first, periodt πŸ’…

πŸ’€ EXIT STATUS πŸ’€

on failure an error code is set that can be queried using rtcGetDeviceError. so if something goes sideways, that's where you go looking for the receipts πŸ”


🌈 SEE ALSO 🌈

  • rtcGetSceneBounds
  • rtcCommitScene
  • rtcJoinCommitScene

okay that's the whole page, you ate it, I'm obsessed πŸ“ and for the lil sign-off: this gorgeous piece of documentation comes to you from Embree Ray Tracing Kernels 3, and yeah the date up in that footer is doing the "..." thing so I'm just gonna blow it a kiss and say byeeee πŸ’–βœ¨πŸ§š

πŸ“¦ where this page comes from