1rtcAttachGeometry(3) Embree Ray Tracing Kernels 3 rtcAttachGeometry(3)
2
3
4
5 NAME
6 rtcAttachGeometry - attaches a geometry to the scene
7
8 SYNOPSIS
9 #include <embree3/rtcore.h>
10
11 unsigned int rtcAttachGeometry(
12 RTCScene scene,
13 RTCGeometry geometry
14 );
15
16 DESCRIPTION
17 The rtcAttachGeometry function attaches a geometry (geometry argument)
18 to a scene (scene argument) and assigns a geometry ID to that geometry.
19 All geometries attached to a scene are defined to be included inside
20 the scene. A geometry can only get attached to a single scene at a
21 given time. However, it is possible to detach and re-attach a geometry
22 to a different scene. The geometry ID is unique for the scene, and is
23 used to identify the geometry when hit by a ray during ray queries.
24
25 This function is thread-safe, thus multiple threads can attach geome‐
26 tries to a scene in parallel.
27
28 The geometry IDs are assigned sequentially, starting from 0, as long as
29 no geometry got detached. If geometries got detached, the implementa‐
30 tion will reuse IDs in an implementation dependent way. Consequently
31 sequential assignment is no longer guaranteed, but a compact range of
32 IDs.
33
34 These rules allow the application to manage a dynamic array to effi‐
35 ciently map from geometry IDs to its own geometry representation.
36 Alternatively, the application can also use per-geometry user data to
37 map to its geometry representation. See rtcSetGeometryUserData and
38 rtcGetGeometryUserData for more information.
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 [rtcSetGeometryUserData], [rtcGetGeometryUserData]
46
47
48
49 rtcAttachGeometry(3)