1rtcCommitScene(3) Embree Ray Tracing Kernels 3 rtcCommitScene(3)
2
3
4
5 NAME
6 rtcCommitScene - commits scene changes
7
8 SYNOPSIS
9 #include <embree3/rtcore.h>
10
11 void rtcCommitScene(RTCScene scene);
12
13 DESCRIPTION
14 The rtcCommitScene function commits all changes for the specified scene
15 (scene argument). This internally triggers building of a spatial ac‐
16 celeration structure for the scene using all available worker threads.
17 Ray queries can be performed only after committing all scene changes.
18
19 If the application uses TBB 2019 Update 9 or later for parallelization
20 of rendering, lazy scene construction during rendering is supported by
21 rtcCommitScene. Therefore rtcCommitScene can get called from multiple
22 TBB worker threads concurrently for the same scene. The rtcCommitScene
23 function will then internally isolate the scene construction using a
24 tbb::isolated_task_group. The alternative approach of using rtcJoin‐
25 CommitScene which uses an tbb:task_arena internally, is not recommended
26 due to it’s high runtime overhead.
27
28 If scene geometries get modified or attached or detached, the rtcCom‐
29 mitScene call must be invoked before performing any further ray queries
30 for the scene; otherwise the effect of the ray query is undefined. The
31 modification of a geometry, committing the scene, and tracing of rays
32 must always happen sequentially, and never at the same time. Any API
33 call that sets a property of the scene or geometries contained in the
34 scene count as scene modification, e.g. including setting of intersec‐
35 tion filter functions.
36
37 The kind of acceleration structure built can be influenced using scene
38 flags (see rtcSetSceneFlags), and the quality can be specified using
39 the rtcSetSceneBuildQuality function.
40
41 Embree silently ignores primitives during spatial acceleration struc‐
42 ture construction that would cause numerical issues, e.g. primitives
43 containing NaNs, INFs, or values greater than 1.844E18f (as no reason‐
44 able calculations can be performed with such values without causing
45 overflows).
46
47 EXIT STATUS
48 On failure an error code is set that can be queried using rtcGetDe‐
49 viceError.
50
51 SEE ALSO
52 [rtcJoinCommitScene]
53
54
55
56 rtcCommitScene(3)