1RTC_GEOMETRY_TYPE_USER(3)Embree Ray Tracing Kernels 3RTC_GEOMETRY_TYPE_USER(3)
2
3
4
5   NAME
6              RTC_GEOMETRY_TYPE_USER - user geometry type
7
8   SYNOPSIS
9              #include <embree3/rtcore.h>
10
11              RTCGeometry geometry =
12                rtcNewGeometry(device, RTC_GEOMETRY_TYPE_USER);
13
14   DESCRIPTION
15       User-defined  geometries  contain  a number of user-defined primitives,
16       just like triangle meshes contain multiple triangles.  The shape of the
17       user-defined  primitives is specified through registered callback func‐
18       tions, which enable extending Embree with  arbitrary  types  of  primi‐
19       tives.
20
21       User-defined  geometries  are created by passing RTC_GEOMETRY_TYPE_USER
22       to the rtcNewGeometry function call.  One has  to  set  the  number  of
23       primitives  (see rtcSetGeometryUserPrimitiveCount), a user data pointer
24       (see rtcSetGeometryUserData), a bounding function closure (see  rtcSet‐
25       GeometryBoundsFunction), as well as user-defined intersect (see rtcSet‐
26       GeometryIntersectFunction) and  occluded  (see  rtcSetGeometryOccluded‐
27       Function)  callback  functions.  The bounding function is used to query
28       the bounds of all time steps of a user primitive, while  the  intersect
29       and  occluded  callback functions are called to intersect the primitive
30       with a ray.  The user data pointer is passed to each  callback  invoca‐
31       tion  and  can  be used to point to the application's representation of
32       the user geometry.
33
34       The creation of a user geometry typically looks the following:
35
36              RTCGeometry geometry = rtcNewGeometry(device, RTC_GEOMETRY_TYPE_USER);
37              rtcSetGeometryUserPrimitiveCount(geometry, numPrimitives);
38              rtcSetGeometryUserData(geometry, userGeometryRepresentation);
39              rtcSetGeometryBoundsFunction(geometry, boundsFunction);
40              rtcSetGeometryIntersectFunction(geometry, intersectFunction);
41              rtcSetGeometryOccludedFunction(geometry, occludedFunction);
42
43       Please have a look at the rtcSetGeometryBoundsFunction, rtcSetGeometry‐
44       IntersectFunction,  and rtcSetGeometryOccludedFunction functions on the
45       implementation of the callback functions.
46
47       See tutorial  [User  Geometry]  for  an  example  of  how  to  use  the
48       user-defined geometries.
49
50   EXIT STATUS
51       On  failure  NULL  is  returned  and  an  error code is set that can be
52       queried using rtcGetDeviceError.
53
54   SEE ALSO
55       [rtcNewGeometry],   [rtcSetGeometryUserPrimitiveCount],   [rtcSetGeome‐
56       tryUserData], [rtcSetGeometryBoundsFunction], [rtcSetGeometryIntersect‐
57       Function], [rtcSetGeometryOccludedFunction]
58
59
60
61                                                     RTC_GEOMETRY_TYPE_USER(3)
Impressum