1RTC_GEOMETRY_TYPE_QUAD(3)Embree Ray Tracing Kernels 3RTC_GEOMETRY_TYPE_QUAD(3)
2
3
4
5   NAME
6              RTC_GEOMETRY_TYPE_QUAD - quad geometry type
7
8   SYNOPSIS
9              #include <embree3/rtcore.h>
10
11              RTCGeometry geometry =
12                rtcNewGeometry(device, RTC_GEOMETRY_TYPE_QUAD);
13
14   DESCRIPTION
15       Quad  meshes  are created by passing RTC_GEOMETRY_TYPE_QUAD to the rtc‐
16       NewGeometry function call.  The quad indices can be specified  by  set‐
17       ting an index buffer (RTC_BUFFER_TYPE_INDEX type) and the quad vertices
18       by setting a vertex buffer (RTC_BUFFER_TYPE_VERTEX type).  See  rtcSet‐
19       GeometryBuffer  and  rtcSetSharedGeometryBuffer for more details on how
20       to set buffers.  The index buffer contains an array of four 32-bit  in‐
21       dices  per quad (RTC_FORMAT_UINT4 format), and the number of primitives
22       is inferred from the size of that buffer.  The vertex  buffer  contains
23       an  array  of  single  precision  x,  y,  z  floating point coordinates
24       (RTC_FORMAT_FLOAT3 format), and the number of vertices is inferred from
25       the size of that buffer.  The vertex buffer can be at most 16 GB large.
26
27       A  quad  is  internally handled as a pair of two triangles v0,v1,v3 and
28       v2,v3,v1, with the u'/v' coordinates of the second  triangle  corrected
29       by  u = 1-u' and v = 1-v' to produce a quad parametrization where u and
30       v are in the range 0 to 1.  Thus the parametrization of a quad uses the
31       first  vertex  p0 as base point, and the vector p1 - p0 as u-direction,
32       and p3 - p0 as v-direction.  Thus vertex attributes t0,t1,t2,t3 can  be
33       bilinearly interpolated over the quadrilateral the following way:
34
35              t_uv = (1-v)((1-u)*t0 + u*t1) + v*((1-u)*t3 + u*t2)
36
37       Mixed  triangle/quad  meshes  are supported by encoding a triangle as a
38       quad, which can be achieved by replicating  the  last  triangle  vertex
39       (v0,v1,v2  ->  v0,v1,v2,v2).   This  way  the second triangle is a line
40       (which can never get hit), and the parametrization of the first  trian‐
41       gle is compatible with the standard triangle parametrization.
42
43       A  quad  whose vertices are laid out counter-clockwise has its geometry
44       normal pointing upwards outside the front face, like illustrated in the
45       following picture.
46
47       For  multi-segment  motion blur, the number of time steps must be first
48       specified using the rtcSetGeometryTimeStepCount call.   Then  a  vertex
49       buffer  for each time step can be set using different buffer slots, and
50       all these buffers must have the same stride and size.
51
52   EXIT STATUS
53       On failure NULL is returned and an  error  code  is  set  that  can  be
54       queried using rtcGetDeviceError.
55
56   SEE ALSO
57       [rtcNewGeometry]
58
59
60
61                                                     RTC_GEOMETRY_TYPE_QUAD(3)
Impressum