1rtcSetGeometryBoundsFunctiEomnb(r3e)e Ray Tracing KernretlcsSe4tGeometryBoundsFunction(3)
2
3
4
5   NAME
6              rtcSetGeometryBoundsFunction - sets a callback to query the
7                bounding box of user-defined primitives
8
9   SYNOPSIS
10              #include <embree4/rtcore.h>
11
12              struct RTCBoundsFunctionArguments
13              {
14                void* geometryUserPtr;
15                unsigned int primID;
16                unsigned int timeStep;
17                struct RTCBounds* bounds_o;
18              };
19
20              typedef void (*RTCBoundsFunction)(
21                const struct RTCBoundsFunctionArguments* args
22              );
23
24              void rtcSetGeometryBoundsFunction(
25                RTCGeometry geometry,
26                RTCBoundsFunction bounds,
27                void* userPtr
28              );
29
30   DESCRIPTION
31       The  rtcSetGeometryBoundsFunction  function  registers  a  bounding box
32       callback function (bounds argument) with payload (userPtr argument) for
33       the specified user geometry (geometry argument).
34
35       Only  a  single  callback  function can be registered per geometry, and
36       further invocations overwrite the  previously  set  callback  function.
37       Passing NULL as function pointer disables the registered callback func‐
38       tion.
39
40       In SYCL mode the BVH construction is done on the host  and  the  passed
41       function pointer must be a host-side function pointer.
42
43       The  registered  bounding box callback function is invoked to calculate
44       axis-aligned bounding boxes of the primitives of the user-defined geom‐
45       etry  during spatial acceleration structure construction.  The bounding
46       box callback of RTCBoundsFunction type is invoked with a pointer  to  a
47       structure of type RTCBoundsFunctionArguments which contains various ar‐
48       guments, such as: the user data of the geometry  (geometryUserPtr  mem‐
49       ber),  the ID of the primitive to calculate the bounds for (primID mem‐
50       ber), the time step at which to calculate the bounds (timeStep member),
51       and  a  memory location to write the calculated bound to (bounds_o mem‐
52       ber).
53
54       In a typical usage scenario one would store a pointer to  the  internal
55       representation  of the user geometry object using rtcSetGeometryUserDa‐
56       ta.  The callback function can then read that pointer from  the  geome‐
57       tryUserPtr field and calculate the proper bounding box for the request‐
58       ed primitive and time, and store that bounding box to  the  destination
59       structure (bounds_o member).
60
61   EXIT STATUS
62       On  failure  an  error  code is set that can be queried using rtcGetDe‐
63       viceError.
64
65   SEE ALSO
66       [RTC_GEOMETRY_TYPE_USER]
67
68
69
70                                               rtcSetGeometryBoundsFunction(3)
Impressum