rtcIntersect1M(3)

πŸ“¦ version 3.13.5, in epel 9, fedora 43, fedora 44

πŸ’– rtcIntersect1M πŸ’–

okay bestie, so this one lives in the Embree Ray Tracing Kernels 3 manual, and it's the page for rtcIntersect1M. buckle up, it's actually not that deep, i promise 🫢


✨ NAME ✨

rtcIntersect1M β€” finds the closest hits for a stream of M single rays πŸ”₯


🌸 SYNOPSIS 🌸

#include <embree3/rtcore.h>

void rtcIntersect1M(
  RTCScene scene,
  struct RTCIntersectContext* context,
  struct RTCRayHit* rayhit,
  unsigned int M,
  size_t byteStride
);

πŸ¦‹ DESCRIPTION πŸ¦‹

so the way rtcIntersect1M works is: it finds the closest hits for a stream of M single rays (that's your rayhit argument, bestie) against the scene (the scene argument, obviously πŸ’…).

the rayhit argument points at an array of ray and hit data, and the byteStride argument is how many bytes sit between each ray/hit structure in that array. no cap, it's literally just the spacing πŸŽ€

if you need the whole "how do i even set up and trace rays" thing, go read Section [rtcIntersect1], it's all there ✨

okay and this part is important so listen up πŸ‘‘ β€” a ray inside a ray stream counts as inactive if its tnear value is larger than its tfar value. that's the vibe check for "this ray is not it, skip it" πŸ’€

also the stream size M can be any arbitrary positive integer including 0. yes, zero. it's giving "i have no rays but i'm still here" πŸ™ˆ

and every single ray must be aligned to 16 bytes. not optional, not negotiable, that's the rule ⭐


πŸ’€ EXIT STATUS πŸ’€

for performance reasons this function does zero error checks. like, none. nada. so on failure it will not set any error flags. it's just gonna sit there looking pretty πŸ’…


πŸ‘‘ SEE ALSO πŸ‘‘

  • [rtcOccluded1M]

that's the whole page, bestie πŸ“ go forth and trace those rays, you're the main character fr fr πŸ’œ

β€” a lil sign-off from the Embree Ray Tracing Kernels 3 crew, page rtcIntersect1M(3), mwah πŸ˜­πŸ’–πŸ§šπŸŒˆ

πŸ“¦ where this page comes from