.\" Automatically generated by Pandoc 2.9.2.1
.\"
.TH "RTCRayN" "3" "" "" "Embree Ray Tracing Kernels 4"
.hy
.SS NAME
.IP
.nf
\f[C]
RTCRayN - ray packet of runtime size
\f[R]
.fi
.SS SYNOPSIS
.IP
.nf
\f[C]
#include <embree4/rtcore_ray.h>

struct RTCRayN;

float& RTCRayN_org_x(RTCRayN* ray, unsigned int N, unsigned int i);
float& RTCRayN_org_y(RTCRayN* ray, unsigned int N, unsigned int i);
float& RTCRayN_org_z(RTCRayN* ray, unsigned int N, unsigned int i);
float& RTCRayN_tnear(RTCRayN* ray, unsigned int N, unsigned int i);

float& RTCRayN_dir_x(RTCRayN* ray, unsigned int N, unsigned int i);
float& RTCRayN_dir_y(RTCRayN* ray, unsigned int N, unsigned int i);
float& RTCRayN_dir_z(RTCRayN* ray, unsigned int N, unsigned int i);
float& RTCRayN_time (RTCRayN* ray, unsigned int N, unsigned int i);

float&        RTCRayN_tfar (RTCRayN* ray, unsigned int N, unsigned int i);
unsigned int& RTCRayN_mask (RTCRayN* ray, unsigned int N, unsigned int i);
unsigned int& RTCRayN_id   (RTCRayN* ray, unsigned int N, unsigned int i);
unsigned int& RTCRayN_flags(RTCRayN* ray, unsigned int N, unsigned int i);
\f[R]
.fi
.SS DESCRIPTION
.PP
When the ray packet size is not known at compile time (e.g.\ when Embree
returns a ray packet in the \f[C]RTCFilterFuncN\f[R] callback function),
Embree uses the \f[C]RTCRayN\f[R] type for ray packets.
These ray packets can only have sizes of 1, 4, 8, or 16.
No other packet size will be used.
.PP
You can either implement different special code paths for each of these
possible packet sizes and cast the ray to the appropriate ray packet
type, or implement one general code path that uses the
\f[C]RTCRayN_XXX\f[R] helper functions to access the ray packet
components.
.PP
These helper functions get a pointer to the ray packet (\f[C]ray\f[R]
argument), the packet size (\f[C]N\f[R] argument), and returns a
reference to a component (e.g.\ x-component of origin) of the the i-th
ray of the packet (\f[C]i\f[R] argument).
.SS EXIT STATUS
.SS SEE ALSO
.PP
[RTCHitN]
