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 get attached to multiplee scene. The geome‐
21 try ID is unique for the scene, and is used to identify the geometry
22 when hit by a ray during ray queries.
23
24 This function is thread-safe, thus multiple threads can attach geome‐
25 tries to a scene in parallel.
26
27 The geometry IDs are assigned sequentially, starting from 0, as long as
28 no geometry got detached. If geometries got detached, the implementa‐
29 tion will reuse IDs in an implementation dependent way. Consequently
30 sequential assignment is no longer guaranteed, but a compact range of
31 IDs.
32
33 These rules allow the application to manage a dynamic array to effi‐
34 ciently map from geometry IDs to its own geometry representation. Al‐
35 ternatively, the application can also use per-geometry user data to map
36 to its geometry representation. See rtcSetGeometryUserData and rtcGet‐
37 GeometryUserData for more information.
38
39 EXIT STATUS
40 On failure an error code is set that can be queried using rtcGetDe‐
41 viceError.
42
43 SEE ALSO
44 [rtcSetGeometryUserData], [rtcGetGeometryUserData]
45
46
47
48 rtcAttachGeometry(3)