RTCHitN.3embree3 1.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  1. .TH "RTCHitN" "3" "" "" "Embree Ray Tracing Kernels 3"
  2. .SS NAME
  3. .IP
  4. .nf
  5. \f[C]
  6. RTCHitN\ \-\ hit\ packet\ of\ runtime\ size
  7. \f[]
  8. .fi
  9. .SS SYNOPSIS
  10. .IP
  11. .nf
  12. \f[C]
  13. #include\ <embree3/rtcore.h>
  14. struct\ HitN;
  15. float&\ RTCHitN_Ng_x(RTCHitN*\ hit,\ unsigned\ int\ N,\ unsigned\ int\ i);
  16. float&\ RTCHitN_Ng_y(RTCHitN*\ hit,\ unsigned\ int\ N,\ unsigned\ int\ i);
  17. float&\ RTCHitN_Ng_z(RTCHitN*\ hit,\ unsigned\ int\ N,\ unsigned\ int\ i);
  18. float&\ RTCHitN_u(RTCHitN*\ hit,\ unsigned\ int\ N,\ unsigned\ int\ i);
  19. float&\ RTCHitN_v(RTCHitN*\ hit,\ unsigned\ int\ N,\ unsigned\ int\ i);
  20. unsigned&\ RTCHitN_primID(RTCHitN*\ hit,\ unsigned\ int\ N,\ unsigned\ int\ i);
  21. unsigned&\ RTCHitN_geomID(RTCHitN*\ hit,\ unsigned\ int\ N,\ unsigned\ int\ i);
  22. unsigned&\ RTCHitN_instID(RTCHitN*\ hit,\ unsigned\ int\ N,\ unsigned\ int\ i,\ unsigned\ int\ l);
  23. \f[]
  24. .fi
  25. .SS DESCRIPTION
  26. .PP
  27. When the hit packet size is not known at compile time (e.g.
  28. when Embree returns a hit packet in the \f[C]RTCFilterFuncN\f[] callback
  29. function), Embree uses the \f[C]RTCHitN\f[] type for hit packets.
  30. These hit packets can only have sizes of 1, 4, 8, or 16.
  31. No other packet size will be used.
  32. .PP
  33. You can either implement different special code paths for each of these
  34. possible packet sizes and cast the hit to the appropriate hit packet
  35. type, or implement one general code path that uses the
  36. \f[C]RTCHitN_XXX\f[] helper functions to access hit packet components.
  37. .PP
  38. These helper functions get a pointer to the hit packet (\f[C]hit\f[]
  39. argument), the packet size (\f[C]N\f[] argument), and returns a
  40. reference to a component (e.g.
  41. x component of \f[C]Ng\f[]) of the the i\-th hit of the packet
  42. (\f[C]i\f[] argument).
  43. .SS EXIT STATUS
  44. .SS SEE ALSO
  45. .PP
  46. [RTCRayN]