3
3
.IP
4
4
.nf
5
5
\f[ C ]
6
- RTCRay\ \- \ type \ of \ single\ ray
6
+ RTCRay\ \- \ single\ ray\ structure
7
7
\f[ ]
8
8
.fi
9
9
.SS SYNOPSIS
@@ -12,35 +12,22 @@ RTCRay\ \-\ type\ of\ single\ ray
12
12
\f[ C ]
13
13
#include\ <embree3/rtcore_ray.h>
14
14
15
- struct\ RTCORE_ALIGN (16)\ RTCRay
15
+ struct\ RTC_ALIGN (16)\ RTCRay
16
16
{
17
- \ \ float\ org_x;\ \ \ \ \ \ \ \ //!< \ x\ coordinate\ of\ ray\ origin
18
- \ \ float\ org_y;\ \ \ \ \ \ \ \ //!< \ y\ coordinate\ of\ ray\ origin
19
- \ \ float\ org_z;\ \ \ \ \ \ \ \ //!< \ z\ coordinate\ of\ ray\ origin
20
- \ \ float\ tnear;\ \ \ \ \ \ \ \ //!< \ Start \ of\ ray\ segment
17
+ \ \ float\ org_x;\ \ \ \ \ \ \ \ //\ x\ coordinate\ of\ ray\ origin
18
+ \ \ float\ org_y;\ \ \ \ \ \ \ \ //\ y\ coordinate\ of\ ray\ origin
19
+ \ \ float\ org_z;\ \ \ \ \ \ \ \ //\ z\ coordinate\ of\ ray\ origin
20
+ \ \ float\ tnear;\ \ \ \ \ \ \ \ //\ start \ of\ ray\ segment
21
21
22
- \ \ float\ dir_x;\ \ \ \ \ \ \ \ //!< \ x\ coordinate\ of\ ray\ direction
23
- \ \ float\ dir_y;\ \ \ \ \ \ \ \ //!< \ y\ coordinate\ of\ ray\ direction
24
- \ \ float\ dir_z;\ \ \ \ \ \ \ \ //!< \ z\ coordinate\ of\ ray\ direction
25
- \ \ float\ tfar ;\ \ \ \ \ \ \ \ \ //!< \ End \ of\ ray \ segment \ (set \ to \ hit \ distance)
22
+ \ \ float\ dir_x;\ \ \ \ \ \ \ \ //\ x\ coordinate\ of\ ray\ direction
23
+ \ \ float\ dir_y;\ \ \ \ \ \ \ \ //\ y\ coordinate\ of\ ray\ direction
24
+ \ \ float\ dir_z;\ \ \ \ \ \ \ \ //\ z\ coordinate\ of\ ray\ direction
25
+ \ \ float\ time ;\ \ \ \ \ \ \ \ \ //\ time \ of\ this \ ray \ for \ motion \ blur
26
26
27
- \ \ float\ time;\ \ \ \ \ \ \ \ \ \ //!<\ Time\ of\ this\ ray\ for\ motion\ blur
28
- \ \ unsigned\ mask;\ \ \ \ \ \ \ //!<\ Used\ to\ mask\ out\ objects\ during\ traversal
29
-
30
- \ \ unsigned\ int\ id;\ \ \ \ //!<\ ray\ ID
31
- \ \ unsigned\ int\ flags;\ //!<\ ray\ flags
32
- \ \
33
- \ \ /*\ hit\ data\ */
34
- \ \ float\ Ng_x;\ \ \ \ \ \ \ \ \ //!<\ x\ coordinate\ of\ geometry\ normal
35
- \ \ float\ Ng_y;\ \ \ \ \ \ \ \ \ //!<\ y\ coordinate\ of\ geometry\ normal
36
- \ \ float\ Ng_z;\ \ \ \ \ \ \ \ \ //!<\ z\ coordinate\ of\ geometry\ normal
37
- \ \ \
38
- \ \ float\ u;\ \ \ \ \ \ \ \ \ \ \ //!<\ Barycentric\ u\ coordinate\ of\ hit
39
- \ \ float\ v;\ \ \ \ \ \ \ \ \ \ \ //!<\ Barycentric\ v\ coordinate\ of\ hit
40
-
41
- \ \ unsigned\ primID;\ \ \ //!<\ primitive\ ID\ of\ hit\ primitive
42
- \ \ unsigned\ geomID;\ \ \ //!<\ geometry\ ID\ of\ hit\ geometry
43
- \ \ unsigned\ instID;\ \ \ //!<\ instance\ ID\ of\ hit\ instance
27
+ \ \ float\ tfar;\ \ \ \ \ \ \ \ \ //\ end\ of\ ray\ segment\ (set\ to\ hit\ distance)
28
+ \ \ unsigned\ int\ mask;\ \ //\ ray\ mask
29
+ \ \ unsigned\ int\ id;\ \ \ \ //\ ray\ ID
30
+ \ \ unsigned\ int\ flags;\ //\ ray\ flags
44
31
};
45
32
\f[ ]
46
33
.fi
@@ -52,22 +39,29 @@ The ray contains the origin (\f[C]org_x\f[], \f[C]org_y\f[],
52
39
\f[ C ] dir_y\f[ ] , \f[ C ] dir_z\f[ ] members), and ray segment (\f[ C ] tnear\f[ ]
53
40
and \f[ C ] tfar\f[ ] members).
54
41
The ray direction does not have to be normalized, and only the parameter
55
- range specified by the tnear/tfar interval is considered valid.
42
+ range specified by the \f[ C ] tnear\f[ ] /\f[ C ] tfar\f[ ] interval is
43
+ considered valid.
56
44
.PP
57
- The ray segment has to be in the range [0, ∞], thus ranges that start
45
+ The ray segment must be in the range [0, ∞], thus ranges that start
58
46
behind the ray origin are not allowed, but ranges can reach to infinity.
59
- For rays inside a ray stream, tfar>tnear identifies inactive rays.
47
+ For rays inside a ray stream, \f[ C ] tfar\f[ ] < \f[ C ] tnear\f[ ] identifies
48
+ an inactive ray.
60
49
.PP
61
50
The ray further contains a motion blur time in the range [0, 1]
62
51
(\f[ C ] time\f[ ] member), a ray mask (\f[ C ] mask\f[ ] member), a ray ID
63
- (\f[ C ] id\f[ ] member), and some ray flags (\f[ C ] flags\f[ ] member).
52
+ (\f[ C ] id\f[ ] member), and ray flags (\f[ C ] flags\f[ ] member).
53
+ The ray mask can be used to mask out some geometries for some rays (see
54
+ \f[ C ] rtcSetGeometryMask\f[ ] for more details).
55
+ The ray ID can be used to identify a ray inside a callback function,
56
+ even if the order of rays inside a ray packet or stream has changed.
57
+ The ray flags are reserved.
64
58
.PP
65
59
The \f[ C ] embree3/rtcore_ray.h\f[ ] header additionally defines the same
66
- ray structure in structure of array layout (SOA) for API functions
60
+ ray structure in structure of array (SOA) layout for API functions
67
61
accepting ray packets of size 4 (\f[ C ] RTCRay4\f[ ] type), size 8
68
62
(\f[ C ] RTCRay8\f[ ] type), and size 16 (\f[ C ] RTCRay16\f[ ] type).
69
- The header additionally defines an \f[ C ] RTCRayNt\f[ ] template to
70
- generate ray packets of an arbitrary compile time size.
63
+ The header additionally defines an \f[ C ] RTCRayNt\f[ ] template for ray
64
+ packets of an arbitrary compile\- time size.
71
65
.SS EXIT STATUS
72
66
.SS SEE ALSO
73
67
.PP
0 commit comments