RTCRayHitN(3)
RTCRayHitN π
okay bestie, welcome to the Embree Ray Tracing Kernels 3 corner of the manual, where we're talking about RTCRayHitN β the combined ray/hit packet of runtime size. yes, runtime. the size is a whole mystery until you actually run the thing. main character energy tbh β¨
β¨ NAME β¨
RTCRayHitN β combined ray/hit packet of runtime size π
πΈ SYNOPSIS πΈ
#include <embree3/rtcore_ray.h>
struct RTCRayHitN;
struct RTCRayN* RTCRayHitN_RayN(struct RTCRayHitN* rayhit, unsigned int N);
struct RTCHitN* RTCRayHitN_HitN(struct RTCRayHitN* rayhit, unsigned int N);
π DESCRIPTION π
so here's the tea π: sometimes you don't know the packet size of a ray/hit structure at compile time. like, at all. the classic example is when Embree hands you back a ray/hit packet inside the RTCIntersectFunctionN callback function β at that point the size is just... whatever it is, and you find out when you find out. when that happens, Embree uses the RTCRayHitN type for ray packets. it's giving flexible. it's giving runtime. π¦
β οΈ heads up though: these ray/hit packets can only have sizes of1,4,8, or16. that's it. no other packet size will be used. periodt. π
so what's a girl to do? you've got two paths, and both are valid, pick your fighter π:
- implement different special code paths for each of those possible packet sizes, and cast the ray/hit to the appropriate ray/hit packet type β very bespoke, very tailored, very you β¨
- extract the
RTCRayNandRTCHitNcomponents using thertcGetRayNandrtcGetHitNhelper functions, then use theRTCRayN_XXXandRTCHitN_XXXfunctions to access the ray and hit parts of the structure β honestly iconic, lowkey the move π«Ά
either way you're getting at the ray bits and the hit bits. no cap. π―
π EXIT STATUS π
(nothing here bestie, the original left it blank β we move in silence π€«)
π SEE ALSO π
- [
RTCHitN]
okay that's the whole page, you ate it up fr fr π this was RTCRayHitN(3) from Embree Ray Tracing Kernels 3 β go forth and packet-ify responsibly, bestie π§β¨
π¦ where this page comes from
- epel 9: embree 3.13.5-4.el9 Β· Apache-2.0
- fedora 43: embree3 3.13.5-9.fc41 Β· Apache-2.0
- fedora 44: embree3 3.13.5-16.fc44 Β· Apache-2.0
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms