rtcIntersectNM(3)

πŸ“¦
version 3.13.5 Β· 2 versions
, in debian bookworm

✨ rtcIntersectNM ✨

okay bestie, gather round, because we're about to talk about rtcIntersectNM from the Embree Ray Tracing Kernels 3 manual (section 3, iykyk) πŸ’…


πŸŽ€ NAME πŸŽ€

rtcIntersectNM β€” finds the closest hits for a stream of M ray packets of size N πŸ’–


πŸ¦‹ SYNOPSIS πŸ¦‹

#include <embree3/rtcore.h>

void rtcIntersectNM(
  RTCScene scene,
  struct RTCIntersectContext* context,
  struct RTCRayHitN* rayhit,
  unsigned int N,
  unsigned int M,
  size_t byteStride
);

🌸 DESCRIPTION 🌸

so basically, rtcIntersectNM finds the closest hits for a stream of M ray packets (that's the rayhit argument) of size N, and it does it against the scene (the scene argument). iconic behaviour honestly 🫢

the rays argument points to an array of ray and hit packets, and there's a specified byte stride (the byteStride argument) sitting between each ray/hit packet. and if you wanna know how to actually set up and trace rays in the first place? go read Section [rtcIntersect1], it's all there, no cap πŸ“–

a ray inside a ray stream counts as inactive if its tnear value is larger than its tfar value. that's the vibe check, that's the rule πŸ’€

okay and now the important constraints, because these are not optional:

  • the packet size N must be larger than 0 β€” zero packets? not today bestie
  • the stream size M can be an arbitrary positive integer, and yes that includes 0
  • each ray must be aligned to 16 bytes β€” 16, exactly, don't play games with alignment 🌈

πŸ‘‘ EXIT STATUS πŸ‘‘

so for performance reasons this function does not do any error checks. like, none. so on failure it will not set any error flags. it's giving "I'm fast and I'm not sorry" 😭 so you better have your inputs correct before you call it, fr fr.


πŸ’œ SEE ALSO πŸ’œ

  • [rtcOccludedNM]

kisses, this was rtcIntersectNM(3) out of the Embree Ray Tracing Kernels 3 manual β€” go trace something pretty bestie πŸ¦‹βœ¨πŸŽ€πŸ’–

πŸ“¦ where this page comes from