rtcAttachGeometry.3embree3 1.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556
  1. .TH "rtcAttachGeometry" "3" "" "" "Embree Ray Tracing Kernels 3"
  2. .SS NAME
  3. .IP
  4. .nf
  5. \f[C]
  6. rtcAttachGeometry\ \-\ attaches\ a\ geometry\ to\ the\ scene
  7. \f[]
  8. .fi
  9. .SS SYNOPSIS
  10. .IP
  11. .nf
  12. \f[C]
  13. #include\ <embree3/rtcore.h>
  14. unsigned\ int\ rtcAttachGeometry(
  15. \ \ RTCScene\ scene,
  16. \ \ RTCGeometry\ geometry
  17. );
  18. \f[]
  19. .fi
  20. .SS DESCRIPTION
  21. .PP
  22. The \f[C]rtcAttachGeometry\f[] function attaches a geometry
  23. (\f[C]geometry\f[] argument) to a scene (\f[C]scene\f[] argument) and
  24. assigns a geometry ID to that geometry.
  25. All geometries attached to a scene are defined to be included inside the
  26. scene.
  27. A geometry can only get attached to a single scene at a given time.
  28. However, it is possible to detach and re\-attach a geometry to a
  29. different scene.
  30. The geometry ID is unique for the scene, and is used to identify the
  31. geometry when hit by a ray during ray queries.
  32. .PP
  33. This function is thread\-safe, thus multiple threads can attach
  34. geometries to a scene in parallel.
  35. .PP
  36. The geometry IDs are assigned sequentially, starting from 0, as long as
  37. no geometry got detached.
  38. If geometries got detached, the implementation will reuse IDs in an
  39. implementation dependent way.
  40. Consequently sequential assignment is no longer guaranteed, but a
  41. compact range of IDs.
  42. .PP
  43. These rules allow the application to manage a dynamic array to
  44. efficiently map from geometry IDs to its own geometry representation.
  45. Alternatively, the application can also use per\-geometry user data to
  46. map to its geometry representation.
  47. See \f[C]rtcSetGeometryUserData\f[] and \f[C]rtcGetGeometryUserData\f[]
  48. for more information.
  49. .SS EXIT STATUS
  50. .PP
  51. On failure an error code is set that can be queried using
  52. \f[C]rtcGetDeviceError\f[].
  53. .SS SEE ALSO
  54. .PP
  55. [rtcSetGeometryUserData], [rtcGetGeometryUserData]