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
38       behind  the  ray origin are not allowed, but ranges can reach to infin‐
39       ity.  For rays inside a ray stream, tfar < tnear identifies an inactive
40       ray.
41
42       The  ray  further contains a motion blur time in the range [0, 1] (time
43       member), a ray mask (mask member), a ray ID (id member), and ray  flags
44       (flags  member).   The ray mask can be used to mask out some geometries
45       for some rays (see rtcSetGeometryMask for more details).   The  ray  ID
46       can  be  used to identify a ray inside a callback function, even if the
47       order of rays inside a ray packet or stream has changed.  The ray flags
48       are reserved.
49
50       The  embree3/rtcore_ray.h  header  additionally  defines  the  same ray
51       structure in structure of array (SOA) layout for API functions  accept‐
52       ing  ray  packets  of size 4 (RTCRay4 type), size 8 (RTCRay8 type), and
53       size 16 (RTCRay16 type).  The header additionally defines  an  RTCRayNt
54       template for ray packets of an arbitrary compile-time size.
55
56   EXIT STATUS
57   SEE ALSO
58       [RTCHit]
59
60
61
62                                                                     RTCRay(3)
Impressum