1rtcInitIntersectArguments(E3m)bree Ray Tracing Kernelsrt4cInitIntersectArguments(3)
2
3
4
5 NAME
6 rtcInitIntersectArguments - initializes the intersect arguments struct
7
8 SYNOPSIS
9 #include <embree4/rtcore.h>
10
11 enum RTCRayQueryFlags
12 {
13 RTC_RAY_QUERY_FLAG_NONE,
14 RTC_RAY_QUERY_FLAG_INCOHERENT,
15 RTC_RAY_QUERY_FLAG_COHERENT,
16 RTC_RAY_QUERY_FLAG_INVOKE_ARGUMENT_FILTER
17 };
18
19 struct RTCIntersectArguments
20 {
21 enum RTCRayQueryFlags flags;
22 enum RTCFeatureFlags feature_mask;
23 struct RTCRayQueryContext* context;
24 RTCFilterFunctionN filter;
25 RTCIntersectFunctionN intersect;
26 #if RTC_MIN_WIDTH
27 float minWidthDistanceFactor;
28 #endif
29 };
30
31 void rtcInitIntersectArguments(
32 struct RTCIntersectArguments* args
33 );
34
35 DESCRIPTION
36 The rtcInitIntersectArguments function initializes the optional argu‐
37 ment struct that can get passed to the rtcIntersect1/4/8/16 functions
38 to default values. The arguments struct needs to get used for more ad‐
39 vanced Embree features as described here.
40
41 The flags member can get used to enable special traversal mode. Using
42 the RTC_RAY_QUERY_FLAG_INCOHERENT flag uses an optimized traversal al‐
43 gorithm for incoherent rays (default), while RTC_RAY_QUERY_FLAG_COHER‐
44 ENT uses an optimized traversal algorithm for coherent rays (e.g. pri‐
45 mary camera rays).
46
47 The feature_mask member should get used in SYCL to just enable ray
48 tracing features required to render a given scene. Please see section
49 [RTCFeatureFlags] for a more detailed description.
50
51 The context member can get used to pass an optional intersection con‐
52 text. It is guaranteed that the pointer to the context passed to a ray
53 query is directly passed to all callback functions. This way it is
54 possible to attach arbitrary data to the end of the context, such as a
55 per-ray payload. Please note that the ray pointer is not guaranteed to
56 be passed to the callback functions, thus reading additional data from
57 the ray pointer passed to callbacks is not possible. See section
58 [rtcInitRayQueryContext] for more details.
59
60 The filter member specifies a filter function to invoke for each en‐
61 countered hit. The support for the argument filter function must be
62 enabled for a scene by using the RTC_SCENE_FLAG_FILTER_FUNCTION_IN_AR‐
63 GUMENTS scene flag. In case of instancing this feature has to get en‐
64 abled also for each instantiated scene.
65
66 The argument filter function is invoked for each geometry for which it
67 got explicitely enabled using the rtcSetGeometryEnableFilterFunction‐
68 FromArguments function. The invokation of the argument filter function
69 can also get enfored for each geometry using the RTC_RAY_QUERY_FLAG_IN‐
70 VOKE_ARGUMENT_FILTER ray query flag. This argument filter function is
71 invoked as a second filter stage after the per-geometry filter function
72 is invoked. Only rays that passed the first filter stage are valid in
73 this second filter stage. Having such a per ray-query filter function
74 can be useful to implement modifications of the behavior of the query,
75 such as collecting all hits or accumulating transparencies.
76
77 The intersect member specifies the user geometry callback to get in‐
78 voked for each user geometry encountered during traversal. The user
79 geometry callback specified this way has preference over the one speci‐
80 fied inside the geometry.
81
82 The minWidthDistanceFactor value controls the target size of the curve
83 radii when the min-width feature is enabled. Please see the [rtcSetGe‐
84 ometryMaxRadiusScale] function for more details on the min-width fea‐
85 ture.
86
87 EXIT STATUS
88 No error code is set by this function.
89
90 SEE ALSO
91 [rtcIntersect1], [rtcIntersect4/8/16], [RTCFeatureFlags], [rtcInitRay‐
92 QueryContext], [RTC_GEOMETRY_TYPE_USER], [rtcSetGeometryMaxRadiusScale]
93
94
95
96 rtcInitIntersectArguments(3)