1RTCHitN(3)               Embree Ray Tracing Kernels 3               RTCHitN(3)
2
3
4
5   NAME
6              RTCHitN - hit packet of runtime size
7
8   SYNOPSIS
9              #include <embree3/rtcore.h>
10
11              struct HitN;
12
13              float& RTCHitN_Ng_x(RTCHitN* hit, unsigned int N, unsigned int i);
14              float& RTCHitN_Ng_y(RTCHitN* hit, unsigned int N, unsigned int i);
15              float& RTCHitN_Ng_z(RTCHitN* hit, unsigned int N, unsigned int i);
16
17              float& RTCHitN_u(RTCHitN* hit, unsigned int N, unsigned int i);
18              float& RTCHitN_v(RTCHitN* hit, unsigned int N, unsigned int i);
19
20              unsigned& RTCHitN_primID(RTCHitN* hit, unsigned int N, unsigned int i);
21              unsigned& RTCHitN_geomID(RTCHitN* hit, unsigned int N, unsigned int i);
22              unsigned& RTCHitN_instID(RTCHitN* hit, unsigned int N, unsigned int i, unsigned int l);
23
24   DESCRIPTION
25       When  the  hit  packet  size  is  not known at compile time (e.g.  when
26       Embree returns a hit packet in the RTCFilterFuncN  callback  function),
27       Embree  uses  the  RTCHitN type for hit packets.  These hit packets can
28       only have sizes of 1, 4, 8, or 16.  No other packet size will be used.
29
30       You can either implement different special code paths for each of these
31       possible  packet  sizes  and cast the hit to the appropriate hit packet
32       type, or implement one general code  path  that  uses  the  RTCHitN_XXX
33       helper functions to access hit packet components.
34
35       These  helper functions get a pointer to the hit packet (hit argument),
36       the packet size (N argument), and returns a reference  to  a  component
37       (e.g.   x  component  of Ng) of the the i-th hit of the packet (i argu‐
38       ment).
39
40   EXIT STATUS
41   SEE ALSO
42       [RTCRayN]
43
44
45
46                                                                    RTCHitN(3)
Impressum