.\" Automatically generated by Pandoc 2.9.2.1
.\"
.TH "rtcInitRayQueryContext" "3" "" "" "Embree Ray Tracing Kernels 4"
.hy
.SS NAME
.IP
.nf
\f[C]
rtcInitRayQueryContext - initializes the ray query context
\f[R]
.fi
.SS SYNOPSIS
.IP
.nf
\f[C]
#include <embree4/rtcore.h>

struct RTCRayQueryContext
{
  #if RTC_MAX_INSTANCE_LEVEL_COUNT > 1
    unsigned int instStackSize;
  #endif
  
  unsigned int instID[RTC_MAX_INSTANCE_LEVEL_COUNT];
};

void rtcInitRayQueryContext(
  struct RTCRayQueryContext* context
);
\f[R]
.fi
.SS DESCRIPTION
.PP
The \f[C]rtcInitRayQueryContext\f[R] function initializes the
intersection context to default values and should be called to
initialize every ray query context.
.PP
It is guaranteed that the pointer to the ray query context
(\f[C]RTCRayQueryContext\f[R] type) is passed to the registered callback
functions.
This way it is possible to attach arbitrary data to the end of the ray
query context, such as a per-ray payload.
.PP
Inside the user geometry callback the ray query context can get used to
access the \f[C]instID\f[R] stack to know which instance the user
geometry object resides.
.PP
If not ray query context is specified when tracing a ray, a default
context is used.
.SS EXIT STATUS
.PP
No error code is set by this function.
.SS SEE ALSO
.PP
[rtcIntersect1], [rtcIntersect4/8/16], [rtcOccluded1],
[rtcOccluded4/8/16]
