1rtcInitPointQueryInstanceSEtmabcrke(e3)Ray Tracing KerrtnceIlnsit3PointQueryInstanceStack(3)
2
3
4
5 NAME
6 rtcInitPointQueryInstanceStack - initializes the stack of (multilevel-)instance
7 information for point queries
8
9 SYNOPSIS
10 #include <embree3/rtcore.h>
11
12 struct RTC_ALIGN(16) RTCPointQueryInstanceStack
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 size;
25 };
26
27 void rtcInitPointQueryInstanceStack(
28 struct RTCPointQueryInstanceStack* instStack
29 );
30
31 DESCRIPTION
32 A stack (RTCPointQueryInstanceStack type) which stores the IDs and
33 instance transformations during a BVH traversal for a point query.
34
35 The rtcInitPointQueryStack function initializes the stack to default
36 values and should be called for initialization.
37
38 The stack will be passed as an argument to the point query callback
39 function (see [rtcSetGeometryPointQueryFunction]) and should be used to
40 pass instance information down the instancing chain for user defined
41 instancing (see tutorial [ClosestPoint] for a reference implementation
42 of point queries with user defined instancing).
43
44 The stack is an necessary argument to [rtcPointQuery] and Embree inter‐
45 nally uses the topmost instance tranformation of the stack to transform
46 the point query into instance space.
47
48 EXIT STATUS
49 No error code is set by this function.
50
51 SEE ALSO
52 [rtcPointQuery], [rtcSetGeometryPointQueryFunction]
53
54
55
56 rtcInitPointQueryInstanceStack(3)