RTCHit.3embree3 1.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152
  1. .TH "RTCHit" "3" "" "" "Embree Ray Tracing Kernels 3"
  2. .SS NAME
  3. .IP
  4. .nf
  5. \f[C]
  6. RTCHit\ \-\ single\ hit\ structure
  7. \f[]
  8. .fi
  9. .SS SYNOPSIS
  10. .IP
  11. .nf
  12. \f[C]
  13. #include\ <embree3/rtcore.h>
  14. struct\ RTCHit
  15. {
  16. \ \ float\ Ng_x;\ \ \ \ \ \ \ \ \ \ //\ x\ coordinate\ of\ geometry\ normal
  17. \ \ float\ Ng_y;\ \ \ \ \ \ \ \ \ \ //\ y\ coordinate\ of\ geometry\ normal
  18. \ \ float\ Ng_z;\ \ \ \ \ \ \ \ \ \ //\ z\ coordinate\ of\ geometry\ normal
  19. \ \ float\ u;\ \ \ \ \ \ \ \ \ \ \ \ \ //\ barycentric\ u\ coordinate\ of\ hit
  20. \ \ float\ v;\ \ \ \ \ \ \ \ \ \ \ \ \ //\ barycentric\ v\ coordinate\ of\ hit
  21. \ \ unsigned\ int\ primID;\ //\ geometry\ ID
  22. \ \ unsigned\ int\ geomID;\ //\ primitive\ ID
  23. \ \ unsigned\ int\ instID[RTC_MAX_INSTANCE_LEVEL_COUNT];\ //\ instance\ ID
  24. };
  25. \f[]
  26. .fi
  27. .SS DESCRIPTION
  28. .PP
  29. The \f[C]RTCHit\f[] type defines the type of a ray/primitive
  30. intersection result.
  31. The hit contains the unnormalized geometric normal in object space at
  32. the hit location (\f[C]Ng_x\f[], \f[C]Ng_y\f[], \f[C]Ng_z\f[] members),
  33. the barycentric u/v coordinates of the hit (\f[C]u\f[] and \f[C]v\f[]
  34. members), as well as the primitive ID (\f[C]primID\f[] member), geometry
  35. ID (\f[C]geomID\f[] member), and instance ID (\f[C]instID\f[] member) of
  36. the hit.
  37. The parametric intersection distance is not stored inside the hit, but
  38. stored inside the \f[C]tfar\f[] member of the ray.
  39. .PP
  40. The \f[C]embree3/rtcore_ray.h\f[] header additionally defines the same
  41. hit structure in structure of array (SOA) layout for hit packets of size
  42. 4 (\f[C]RTCHit4\f[] type), size 8 (\f[C]RTCHit8\f[] type), and size 16
  43. (\f[C]RTCHit16\f[] type).
  44. The header additionally defines an \f[C]RTCHitNt\f[] template for hit
  45. packets of an arbitrary compile\-time size.
  46. .SS EXIT STATUS
  47. .SS SEE ALSO
  48. .PP
  49. [RTCRay]