1rtcForwardIntersect1/Ex(3)Embree Ray Tracing Kernels 4rtcForwardIntersect1/Ex(3)
2
3
4
5   NAME
6              rtcForwardIntersect1/Ex - forwards a single ray to new scene
7                from user geometry callback
8
9   SYNOPSIS
10              #include <embree4/rtcore.h>
11
12              void rtcForwardIntersect1(
13                const struct RTCIntersectFunctionNArguments* args,
14                RTCScene scene,
15                struct RTCRay* ray,
16                unsigned int instID
17              );
18
19              void rtcForwardIntersect1Ex(
20                const struct RTCIntersectFunctionNArguments* args,
21                RTCScene scene,
22                struct RTCRay* ray,
23                unsigned int instID,
24                unsigned int instPrimID,
25              );
26
27   DESCRIPTION
28       The  rtcForwardIntersect1  and rtcForwardIntersect1Ex functions forward
29       the traversal of a transformed ray (ray argument) into a  scene  (scene
30       argument) from a user geometry callback.  The function can only get in‐
31       voked from a user geometry callback for a ray traversal initiated  with
32       the  rtcIntersect1  function.   The callback arguments structure of the
33       callback invokation has to get passed to the ray forwarding (args argu‐
34       ment).  The user geometry callback should instantly terminate after in‐
35       voking the rtcForwardIntersect1/Ex function.
36
37       Only the ray origin and ray direction members of the ray  argument  are
38       used  for  forwarding, all additional ray properties are inherited from
39       the initial ray traversal invokation of rtcIntersect1.
40
41       The implementation of  the  rtcForwardIntersect1  function  recursively
42       continues  the  ray  traversal  into the specified scene and pushes the
43       provided instance ID (instID argument) to the instance ID  stack.   Hit
44       information  is updated into the ray hit structure passed to the origi‐
45       nal rtcIntersect1 invokation.
46
47       This function can get used to implement user defined  instancing  using
48       user  geometries, e.g. by transforming the ray in a special way, and/or
49       selecting between different scenes to instantiate.
50
51       For user defined instance arrays,  the  rtcForwardIntersect1Ex  variant
52       has  an  additional instPrimID argument which is pushed to the instance
53       primitive ID stack.  Instance primitive IDs identify which instance  of
54       an instance array was hit.
55
56       When  using  Embree  on  the  CPU  it is possible to recursively invoke
57       rtcIntersect1 directly from a user geometry  callback.   However,  when
58       SYCL  is  used, recursively tracing rays is not directly supported, and
59       the rtcForwardIntersect1/Ex functions must be used.
60
61       The ray structure must be aligned to 16 bytes.
62
63   EXIT STATUS
64       For performance reasons this function does not  do  any  error  checks,
65       thus will not set any error flags on failure.
66
67   SEE ALSO
68       [rtcIntersect1], [RTCRay]
69
70
71
72                                                    rtcForwardIntersect1/Ex(3)
Impressum