rtcSetSceneProgressMonitorFunction.3embree3 1.9 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364
  1. .TH "rtcSetSceneProgressMonitorFunction" "3" "" "" "Embree Ray Tracing Kernels 3"
  2. .SS NAME
  3. .IP
  4. .nf
  5. \f[C]
  6. rtcSetSceneProgressMonitorFunction\ \-\ registers\ a\ callback
  7. \ \ to\ track\ build\ progress
  8. \f[]
  9. .fi
  10. .SS SYNOPSIS
  11. .IP
  12. .nf
  13. \f[C]
  14. #include\ <embree3/rtcore.h>
  15. typedef\ bool\ (*RTCProgressMonitorFunction)(
  16. \ \ void*\ ptr,
  17. \ \ double\ n
  18. );
  19. void\ rtcSetSceneProgressMonitorFunction(
  20. \ \ RTCScene\ scene,
  21. \ \ RTCProgressMonitorFunction\ progress,
  22. \ \ void*\ userPtr
  23. );
  24. \f[]
  25. .fi
  26. .SS DESCRIPTION
  27. .PP
  28. Embree supports a progress monitor callback mechanism that can be used
  29. to report progress of hierarchy build operations and to cancel build
  30. operations.
  31. .PP
  32. The \f[C]rtcSetSceneProgressMonitorFunction\f[] registers a progress
  33. monitor callback function (\f[C]progress\f[] argument) with payload
  34. (\f[C]userPtr\f[] argument) for the specified scene (\f[C]scene\f[]
  35. argument).
  36. .PP
  37. Only a single callback function can be registered per scene, and further
  38. invocations overwrite the previously set callback function.
  39. Passing \f[C]NULL\f[] as function pointer disables the registered
  40. callback function.
  41. .PP
  42. Once registered, Embree will invoke the callback function multiple times
  43. during hierarchy build operations of the scene, by passing the payload
  44. as set at registration time (\f[C]userPtr\f[] argument), and a double in
  45. the range [0, 1] which estimates the progress of the operation
  46. (\f[C]n\f[] argument).
  47. The callback function might be called from multiple threads
  48. concurrently.
  49. .PP
  50. When returning \f[C]true\f[] from the callback function, Embree will
  51. continue the build operation normally.
  52. When returning \f[C]false\f[], Embree will cancel the build operation
  53. with the \f[C]RTC_ERROR_CANCELLED\f[] error code.
  54. Issuing multiple cancel requests for the same build operation is
  55. allowed.
  56. .SS EXIT STATUS
  57. .PP
  58. On failure an error code is set that can be queried using
  59. \f[C]rtcGetDeviceError\f[].
  60. .SS SEE ALSO
  61. .PP
  62. [rtcNewScene]