1rtcInitPointQueryContext(3E)mbree Ray Tracing Kernelsr3tcInitPointQueryContext(3)
2
3
4
5   NAME
6              rtcInitPointQueryContext - initializes the context information (e.g.
7                stack of (multilevel-)instance transformations) for point queries
8
9   SYNOPSIS
10              #include <embree3/rtcore.h>
11
12              struct RTC_ALIGN(16) RTCPointQueryContext
13              {
14                // accumulated 4x4 column major matrices from world to instance space.
15                float world2inst[RTC_MAX_INSTANCE_LEVEL_COUNT][16];
16
17                // accumulated 4x4 column major matrices from instance to world space.
18                float inst2world[RTC_MAX_INSTANCE_LEVEL_COUNT][16];
19
20                // instance ids.
21                unsigned int instID[RTC_MAX_INSTANCE_LEVEL_COUNT];
22
23                // number of instances currently on the stack.
24                unsigned int instStackSize;
25              };
26
27              void rtcInitPointQueryContext(
28                struct RTCPointQueryContext* context
29              );
30
31   DESCRIPTION
32       A  stack  (RTCPointQueryContext type) which stores the IDs and instance
33       transformations during a BVH traversal for a point query.   The  trans‐
34       formations  are  assumed  to be affine transformations (3×3 matrix plus
35       translation) and therefore the last column is ignored (see  [RTC_GEOME‐
36       TRY_TYPE_INSTANCE] for details).
37
38       The  rtcInitPointContext  function  initializes  the context to default
39       values and should be called for initialization.
40
41       The context will be passed as an argument to the point  query  callback
42       function (see [rtcSetGeometryPointQueryFunction]) and should be used to
43       pass instance information down the instancing chain  for  user  defined
44       instancing  (see tutorial [ClosestPoint] for a reference implementation
45       of point queries with user defined instancing).
46
47       The context is an necessary argument to [rtcPointQuery] and Embree  in‐
48       ternally uses the topmost instance tranformation of the stack to trans‐
49       form the point query into instance space.
50
51   EXIT STATUS
52       No error code is set by this function.
53
54   SEE ALSO
55       [rtcPointQuery], [rtcSetGeometryPointQueryFunction]
56
57
58
59                                                   rtcInitPointQueryContext(3)
Impressum