|
| 1 | +.TH "RTCRay" "3" "" "" "Embree Ray Tracing Kernels 3" |
| 2 | +.SS NAME |
| 3 | +.IP |
| 4 | +.nf |
| 5 | +\f[C] |
| 6 | +RTCRay\ \-\ single\ ray\ structure |
| 7 | +\f[] |
| 8 | +.fi |
| 9 | +.SS SYNOPSIS |
| 10 | +.IP |
| 11 | +.nf |
| 12 | +\f[C] |
| 13 | +#include\ <embree3/rtcore_ray.h> |
| 14 | + |
| 15 | +struct\ RTC_ALIGN(16)\ RTCRay |
| 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 |
| 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\ time;\ \ \ \ \ \ \ \ \ //\ time\ of\ this\ ray\ for\ motion\ blur |
| 26 | + |
| 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 |
| 31 | +}; |
| 32 | +\f[] |
| 33 | +.fi |
| 34 | +.SS DESCRIPTION |
| 35 | +.PP |
| 36 | +The \f[C]RTCRay\f[] structure defines the ray layout for a single ray. |
| 37 | +The ray contains the origin (\f[C]org_x\f[], \f[C]org_y\f[], |
| 38 | +\f[C]org_z\f[] members), direction vector (\f[C]dir_x\f[], |
| 39 | +\f[C]dir_y\f[], \f[C]dir_z\f[] members), and ray segment (\f[C]tnear\f[] |
| 40 | +and \f[C]tfar\f[] members). |
| 41 | +The ray direction does not have to be normalized, and only the parameter |
| 42 | +range specified by the \f[C]tnear\f[]/\f[C]tfar\f[] interval is |
| 43 | +considered valid. |
| 44 | +.PP |
| 45 | +The ray segment must be in the range [0, ∞], thus ranges that start |
| 46 | +behind the ray origin are not allowed, but ranges can reach to infinity. |
| 47 | +For rays inside a ray stream, \f[C]tfar\f[] < \f[C]tnear\f[] identifies |
| 48 | +an inactive ray. |
| 49 | +.PP |
| 50 | +The ray further contains a motion blur time in the range [0, 1] |
| 51 | +(\f[C]time\f[] member), a ray mask (\f[C]mask\f[] member), a ray ID |
| 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. |
| 58 | +.PP |
| 59 | +The \f[C]embree3/rtcore_ray.h\f[] header additionally defines the same |
| 60 | +ray structure in structure of array (SOA) layout for API functions |
| 61 | +accepting ray packets of size 4 (\f[C]RTCRay4\f[] type), size 8 |
| 62 | +(\f[C]RTCRay8\f[] type), and size 16 (\f[C]RTCRay16\f[] type). |
| 63 | +The header additionally defines an \f[C]RTCRayNt\f[] template for ray |
| 64 | +packets of an arbitrary compile\-time size. |
| 65 | +.SS EXIT STATUS |
| 66 | +.SS SEE ALSO |
| 67 | +.PP |
| 68 | +[RTCHit] |
0 commit comments