1rtcAttachGeometryByID(3) Embree Ray Tracing Kernels 3 rtcAttachGeometryByID(3)
2
3
4
5   NAME
6              rtcAttachGeometryByID - attaches a geometry to the scene
7                using a specified geometry ID
8
9   SYNOPSIS
10              #include <embree3/rtcore.h>
11
12              void rtcAttachGeometryByID(
13                RTCScene scene,
14                RTCGeometry geometry,
15                unsigned int geomID
16              );
17
18   DESCRIPTION
19       The  rtcAttachGeometryByID function attaches a geometry (geometry argu‐
20       ment) to a scene (scene argument) and assigns a user provided  geometry
21       ID  (geomID  argument)  to that geometry.  All geometries attached to a
22       scene are defined to be included inside the scene.  A geometry can only
23       get  attached to a single scene at a given time.  However, it is possi‐
24       ble to detach and re-attach a  geometry  to  a  different  scene.   The
25       passed  user-defined  geometry ID is used to identify the geometry when
26       hit by a ray during ray queries.  Using this function, it  is  possible
27       to share the same IDs to refer to geometries inside the application and
28       Embree.
29
30       This function is thread-safe, thus multiple threads can  attach  geome‐
31       tries to a scene in parallel.
32
33       The  user-provided  geometry  ID must be unused in the scene, otherwise
34       the creation of the geometry will  fail.   Further,  the  user-provided
35       geometry  IDs  should be compact, as Embree internally creates a vector
36       which size is equal to the largest geometry  ID  used.   Creating  very
37       large  geometry IDs for small scenes would thus cause a memory consump‐
38       tion and performance overhead.
39
40   EXIT STATUS
41       On failure an error code is set that can  be  queried  using  rtcGetDe‐
42       viceError.
43
44   SEE ALSO
45       [rtcAttachGeometry]
46
47
48
49                                                      rtcAttachGeometryByID(3)
Impressum