rtcGetGeo...hreadSafe(3)

πŸ’– rtcGetGeometryThreadSafe β€” from the Embree Ray Tracing Kernels 4 manual, section 3 πŸ’–

okay bestie, gather round, we're reading a man page together and honestly? this one is short and sweet and you're gonna slay it 🫢


✨ NAME ✨

rtcGetGeometryThreadSafe β€” returns the geometry bound to the specified geometry ID πŸ’…

like. that's it. that's the whole job. she looks up a geometry and hands it to you.


🌸 SYNOPSIS 🌸

#include <embree4/rtcore.h>

RTCGeometry rtcGetGeometryThreadSafe(RTCScene scene, unsigned int geomID);

πŸ¦‹ DESCRIPTION πŸ¦‹

so the rtcGetGeometryThreadSafe function returns the geometry that is bound to the specified geometry ID (the geomID argument, yeah that one) for the specified scene (the scene argument, mhm). ✨

and listen, this is important: this function just looks up the handle and does not increment the reference count. no cap. so if you actually want to get ownership of the handle, you need to additionally call rtcRetainGeometry. don't forget, or the vibes will be off 😭

this function is thread safe 🧚 and should NOT get used during rendering. like, not the moment for her, bestie. if you need a fast non-thread-safe version during rendering, please use the rtcGetGeometry function instead. iykyk πŸ”₯


πŸ’€ EXIT STATUS πŸ’€

on failure NULL is returned 😭 and an error code is set that can be queried using rtcGetDeviceError. so if you get nothing back, go check the error, she's telling you something.


πŸ‘‘ SEE ALSO πŸ‘‘

  • rtcAttachGeometry
  • rtcAttachGeometryByID
  • rtcGetGeometry

okay that's the page, periodt πŸŽ€ this was section 3 of the Embree Ray Tracing Kernels 4 manual, and the page is called rtcGetGeometryThreadSafe(3) β€” go forth and look up your geometry handles responsibly, bestie πŸ’œπŸŒΈ

πŸ“¦ where this page comes from