1RTC_GEOMETRY_TYPE_GRID(3)Embree Ray Tracing Kernels 3RTC_GEOMETRY_TYPE_GRID(3)
2
3
4
5   NAME
6              RTC_GEOMETRY_TYPE_GRID - grid geometry type
7
8   SYNOPSIS
9              #include <embree3/rtcore.h>
10
11              RTCGeometry geometry =
12                rtcNewGeometry(device, RTC_GEOMETRY_TYPE_GRID);
13
14   DESCRIPTION
15       Grid  meshes  are created by passing RTC_GEOMETRY_TYPE_GRID to the rtc‐
16       NewGeometry function call, and contain an  array  of  grid  primitives.
17       This  array of grids can be specified by setting up a grid buffer (with
18       RTC_BUFFER_TYPE_GRID type and RTC_FORMAT_GRID format) and the grid mesh
19       vertices by setting a vertex buffer (RTC_BUFFER_TYPE_VERTEX type).  See
20       rtcSetGeometryBuffer and rtcSetSharedGeometryBuffer for more details on
21       how  to set buffers.  The number of grid primitives in the grid mesh is
22       inferred from the size of the grid buffer.
23
24       The vertex buffer contains an array of single precision x, y, z  float‐
25       ing  point  coordinates  (RTC_FORMAT_FLOAT3  format), and the number of
26       vertices is inferred from the size of that buffer.
27
28       Each grid in the grid buffer is of the type RTCGrid:
29
30              struct RTCGrid
31              {
32                unsigned int startVertexID;
33                unsigned int stride;
34                unsigned short width,height;
35              };
36
37       The RTCGrid structure describes a 2D grid of vertices (with respect  to
38       the  vertex  buffer  of  the  grid mesh).  The width and height members
39       specify the number of vertices in u and v direction, e.g.  setting both
40       width  and  height to 3 sets up a 3×3 vertex grid.  The maximum allowed
41       width and height is 32767.  The startVertexID specifies the ID  of  the
42       top-left  vertex  in the vertex grid, while the stride parameter speci‐
43       fies a stride (in number of vertices) used to step to the next row.
44
45       A vertex grid of dimensions width and height is treated as a  (width-1)
46       x  (height-1) grid of quads (triangle-pairs), with the same shared edge
47       handling as for regular quad meshes.  However, the u/v coordinates have
48       the  uniform  range  [0..1] for an entire vertex grid.  The u direction
49       follows the width of the grid while the v direction the height.
50
51       For multi-segment motion blur, the number of time steps must  be  first
52       specified  using  the  rtcSetGeometryTimeStepCount call.  Then a vertex
53       buffer for each time step can be set using different buffer slots,  and
54       all these buffers must have the same stride and size.
55
56   EXIT STATUS
57       On  failure  NULL  is  returned  and  an  error code is set that can be
58       queried using rtcGetDeviceError.
59
60   SEE ALSO
61       [rtcNewGeometry]
62
63
64
65                                                     RTC_GEOMETRY_TYPE_GRID(3)
Impressum