rtcGetSceneBounds(3)

πŸ’– rtcGetSceneBounds(3) πŸ’–

okay bestie, welcome to the Embree Ray Tracing Kernels 4 manual page for rtcGetSceneBounds, and no cap this one is a little bop πŸŽ€


✨ NAME ✨

rtcGetSceneBounds β€” hands you the axis-aligned bounding box of the scene, like a little gift 🎁


🌸 SYNOPSIS 🌸

#include <embree4/rtcore.h>

struct RTCORE_ALIGN(16) RTCBounds
{
  float lower_x, lower_y, lower_z, align0;
  float upper_x, upper_y, upper_z, align1;
};

void rtcGetSceneBounds(
  RTCScene scene,
  struct RTCBounds* bounds_o
);

πŸ¦‹ DESCRIPTION πŸ¦‹

so the rtcGetSceneBounds function is the one that asks a scene for its axis-aligned bounding box β€” the scene in question being the scene argument, obviously πŸ’… β€” and then it drops that bounding box right into the destination pointer you handed it, aka the bounds_o argument. that's it. that's the whole job. iconic.

the bounding box it stores is made up of a lower bound and an upper bound for each of the x, y, and z dimensions, and that whole shape is described by the RTCBounds structure. three dims, two bounds each, very demure, very mindful.

⚠️ two things you absolutely cannot skip, bestie: - the destination pointer you pass in must be aligned to 16 bytes. not vibes-aligned. actually aligned. 16. bytes. πŸ’€ - you can only call this function after committing the scene. if you call it before that, the result is undefined β€” and undefined behaviour is not the moment, fr fr. πŸ™ˆ

πŸ’€ EXIT STATUS πŸ’€

if it fails, an error code gets set, and you can go query that code with rtcGetDeviceError. so if something smells off, that's where you go snooping πŸ•΅οΈβ™€οΈ


πŸ‘‘ SEE ALSO πŸ‘‘

  • [rtcGetSceneLinearBounds]
  • [rtcCommitScene]
  • [rtcJoinCommitScene]

and that's the page, bestie 🫢 this was rtcGetSceneBounds(3) from the Embree Ray Tracing Kernels 4 manual β€” go forth, get those bounds, and stay 16-byte aligned βœ¨πŸŒˆπŸ’œ

πŸ“¦ where this page comes from