.\" Automatically generated by Pandoc 2.5
.\"
.TH "RTCHit" "3" "" "" "Embree Ray Tracing Kernels 3"
.hy
.SS NAME
.IP
.nf
\f[C]
RTCHit \- single hit structure
\f[R]
.fi
.SS SYNOPSIS
.IP
.nf
\f[C]
#include <embree3/rtcore.h>

struct RTCHit
{
  float Ng_x;                                        // x coordinate of geometry normal
  float Ng_y;                                        // y coordinate of geometry normal
  float Ng_z;                                        // z coordinate of geometry normal

  float u;                                           // barycentric u coordinate of hit
  float v;                                           // barycentric v coordinate of hit

  unsigned int primID;                               // geometry ID
  unsigned int geomID;                               // primitive ID
  unsigned int instID[RTC_MAX_INSTANCE_LEVEL_COUNT]; // instance ID
};
\f[R]
.fi
.SS DESCRIPTION
.PP
The \f[C]RTCHit\f[R] type defines the type of a ray/primitive
intersection result.
The hit contains the unnormalized geometric normal in object space at
the hit location (\f[C]Ng_x\f[R], \f[C]Ng_y\f[R], \f[C]Ng_z\f[R]
members), the barycentric u/v coordinates of the hit (\f[C]u\f[R] and
\f[C]v\f[R] members), as well as the primitive ID (\f[C]primID\f[R]
member), geometry ID (\f[C]geomID\f[R] member), and instance ID stack
(\f[C]instID\f[R] member) of the hit.
The parametric intersection distance is not stored inside the hit, but
stored inside the \f[C]tfar\f[R] member of the ray.
.PP
The \f[C]embree3/rtcore_ray.h\f[R] header additionally defines the same
hit structure in structure of array (SOA) layout for hit packets of size
4 (\f[C]RTCHit4\f[R] type), size 8 (\f[C]RTCHit8\f[R] type), and size 16
(\f[C]RTCHit16\f[R] type).
The header additionally defines an \f[C]RTCHitNt\f[R] template for hit
packets of an arbitrary compile\-time size.
.SS EXIT STATUS
.SS SEE ALSO
.PP
[RTCRay], [Multi\-Level Instancing]
