RTCRay(3)

πŸ’– RTCRay β€” bestie edition ✨

okay so this is the manual for RTCRay(3) from the Embree Ray Tracing Kernels 4 era, and ngl it's a short one but it's so important, iykyk. buckle up, it's the combined ray/hit structure and she is lowkey the main character of every intersection query you'll ever run πŸŽ€


🌸 NAME 🌸

RTCRayHit β€” the combined single ray/hit structure. one struct, two jobs, no notes πŸ’…


✨ SYNOPSIS ✨

#include <embree4/rtcore_ray.h>

struct RTCORE_ALIGN(16) RTCRayHit
{
  struct RTCRay ray;
  struct RTCHit hit;
};

like. look at her. aligned to 16, holding a ray and a hit. iconic behavior fr fr 🫢


πŸ¦‹ DESCRIPTION πŸ¦‹

so the RTCRayHit structure is literally what you hand to the rtcIntersect-type functions, okay? you put your ray in, and afterwards those hit fields are holding the intersection result. it's giving "input now, answer later" and honestly? obsessed 😭

the embree4/rtcore_ray.h header also defines the exact same ray/hit structure in structure of array (SOA) layout, for the API functions that take ray packets. and the sizes are:

  • packets of size 4 β†’ the RTCRayHit4 type
  • packets of size 8 β†’ the RTCRayHit8 type
  • packets of size 16 β†’ the RTCRayHit16 type

and on top of all that, the header also defines an RTCRayHitNt template so you can generate ray/hit packets of any arbitrary compile-time size you want. custom sizes? we love to see it πŸ’œ


πŸ’€ EXIT STATUS πŸ’€

not me checking this section and it's just… empty. nothing here bestie, genuinely nothing. no exit status, no vibe check, just silence πŸ™ˆ


πŸŽ€ SEE ALSO πŸŽ€

  • [RTCRay]
  • [RTCHit]

go read those two next, they're the whole squad fr 🌈


and that's the page!! brought to you by Embree Ray Tracing Kernels 4, filed under RTCRay(3) in the manual pages β€” mwah, love u, go intersect something pretty βœ¨πŸ’–

πŸ“¦ where this page comes from