RTCGETGEOMETRYUSERDATAFROMSCENE(3)

πŸ“¦
version 4.4.1 Β· 3 versions
, in ubuntu stonking

πŸ’– rtcGetGeometryUserDataFromScene β€” Embree Ray Tracing Kernels 4 πŸ’–

okay bestie, gather round, because this one is literally just "hey, what was that lil pointer I stapled to my geometry?" and the answer comes to you through the scene. no cap.


✨ NAME ✨

rtcGetGeometryUserDataFromScene β€” returns the user data pointer of the geometry through the scene object 🫢


🌸 SYNOPSIS 🌸

#include <embree4/rtcore.h>

void* rtcGetGeometryUserDataFromScene(RTCScene scene, unsigned int geomID);

πŸ¦‹ DESCRIPTION πŸ¦‹

so. the rtcGetGeometryUserDataFromScene function goes and fetches that user data pointer you already set earlier with rtcSetGeometryUserData, grabbing it off the geometry sitting at index geomID inside the scene you passed in as scene. that's it, that's the whole job πŸ’…

and if you never called rtcSetGeometryUserData at all? then it just hands you back NULL. no drama, no error, just NULL. iconic behaviour honestly.

now here's the part that's actually the main character moment ✨ β€” unlike its sibling rtcGetGeometryUserData, the rtcGetGeometryUserDataFromScene function can be used during rendering inside a SYCL kernel. yes queen, from inside the kernel. that's the whole reason this variant exists. iykyk.


πŸ’€ EXIT STATUS πŸ’€

if something goes wrong, an error code gets set, and you can go peek at it with rtcGetDeviceError. so like, if things are giving nothing, check the error code first, bestie 😭


πŸŽ€ SEE ALSO πŸŽ€

  • [rtcSetGeometryUserData]
  • [rtcGetGeometryUserData]

and that's the tea, periodt πŸ’–βœ¨πŸŒΈπŸ¦‹πŸ’…

this lil page is from Embree Ray Tracing Kernels 4 (the 3 in the section number is the manual section, not the version, don't @ me) β€” go forth and query your geometry user data responsibly, queen πŸ‘‘

πŸ“¦ where this page comes from