1RTCRay(3)                Embree Ray Tracing Kernels 3                RTCRay(3)
2
3
4
5   NAME
6              RTCRay - single ray structure
7
8   SYNOPSIS
9              #include <embree3/rtcore_ray.h>
10
11              struct RTC_ALIGN(16) RTCRay
12              {
13                float org_x;        // x coordinate of ray origin
14                float org_y;        // y coordinate of ray origin
15                float org_z;        // z coordinate of ray origin
16                float tnear;        // start of ray segment
17
18                float dir_x;        // x coordinate of ray direction
19                float dir_y;        // y coordinate of ray direction
20                float dir_z;        // z coordinate of ray direction
21                float time;         // time of this ray for motion blur
22
23                float tfar;         // end of ray segment (set to hit distance)
24                unsigned int mask;  // ray mask
25                unsigned int id;    // ray ID
26                unsigned int flags; // ray flags
27              };
28
29   DESCRIPTION
30       The  RTCRay structure defines the ray layout for a single ray.  The ray
31       contains the origin (org_x, org_y,  org_z  members),  direction  vector
32       (dir_x,  dir_y,  dir_z  members),  and ray segment (tnear and tfar mem‐
33       bers).  The ray direction does not have to be normalized, and only  the
34       parameter  range  specified  by  the  tnear/tfar interval is considered
35       valid.
36
37       The ray segment must be in the range [0, ∞], thus ranges that start be‐
38       hind  the ray origin are not allowed, but ranges can reach to infinity.
39       For rays inside a ray stream, tfar < tnear identifies an inactive ray.
40
41       The ray further contains a motion blur time in the range  [0, 1]  (time
42       member),  a ray mask (mask member), a ray ID (id member), and ray flags
43       (flags member).  The ray mask can be used to mask out  some  geometries
44       for  some  rays  (see rtcSetGeometryMask for more details).  The ray ID
45       can be used to identify a ray inside a callback function, even  if  the
46       order of rays inside a ray packet or stream has changed.  The ray flags
47       are reserved.
48
49       The embree3/rtcore_ray.h  header  additionally  defines  the  same  ray
50       structure  in structure of array (SOA) layout for API functions accept‐
51       ing ray packets of size 4 (RTCRay4 type), size 8  (RTCRay8  type),  and
52       size  16  (RTCRay16 type).  The header additionally defines an RTCRayNt
53       template for ray packets of an arbitrary compile-time size.
54
55   EXIT STATUS
56   SEE ALSO
57       [RTCHit]
58
59
60
61                                                                     RTCRay(3)
Impressum