1rtcInterpolate(3)        Embree Ray Tracing Kernels 3        rtcInterpolate(3)
2
3
4
5   NAME
6              rtcInterpolate - interpolates vertex attributes
7
8   SYNOPSIS
9              #include <embree3/rtcore.h>
10
11              struct RTCInterpolateArguments
12              {
13                RTCGeometry geometry;
14                unsigned int primID;
15                float u;
16                float v;
17                enum RTCBufferType bufferType;
18                unsigned int bufferSlot;
19                float* P;
20                float* dPdu;
21                float* dPdv;
22                float* ddPdudu;
23                float* ddPdvdv;
24                float* ddPdudv;
25                unsigned int valueCount;
26              };
27
28              void rtcInterpolate(
29                const struct RTCInterpolateArguments* args
30              );
31
32   DESCRIPTION
33       The  rtcInterpolate function smoothly interpolates per-vertex data over
34       the geometry.  This interpolation is  supported  for  triangle  meshes,
35       quad  meshes, curve geometries, and subdivision geometries.  Apart from
36       interpolating the vertex attribute itself, it is also possible  to  get
37       the  first and second order derivatives of that value.  This interpola‐
38       tion ignores displacements of subdivision surfaces and always  interpo‐
39       lates the underlying base surface.
40
41       The  rtcInterpolate  call  gets  passed  a number of arguments inside a
42       structure of type RTCInterpolateArguments.  For some geometry (geometry
43       parameter)  this  function  smoothly  interpolates  the per-vertex data
44       stored inside the specified geometry buffer (bufferType and  bufferSlot
45       parameters)  to  the u/v location (u and v parameters) of the primitive
46       (primID parameter).  The number of floating point values to interpolate
47       and  store  to the destination arrays can be specified using the value‐
48       Count parameter.  As interpolation buffer, one can specify vertex  buf‐
49       fers  (RTC_BUFFER_TYPE_VERTEX)  and  vertex attribute buffers (RTC_BUF‐
50       FER_TYPE_VERTEX_ATTRIBUTE) as well.
51
52       The rtcInterpolate call stores valueCount number of interpolated float‐
53       ing point values to the memory location pointed to by P.  One can avoid
54       storing the interpolated value by setting P to NULL.
55
56       The first order derivative of the interpolation by u and v  are  stored
57       at  the  dPdu  and  dPdv memory locations.  One can avoid storing first
58       order derivatives by setting both dPdu and dPdv to NULL.
59
60       The second order derivatives are stored at the  ddPdudu,  ddPdvdv,  and
61       ddPdudv  memory  locations.  One can avoid storing second order deriva‐
62       tives by setting these three pointers to NULL.
63
64       To use rtcInterpolate for a geometry, all changes to that geometry must
65       be properly committed using rtcCommitGeometry.
66
67       All  input buffers and output arrays must be padded to 16 bytes, as the
68       implementation uses 16-byte SSE instructions to  read  and  write  into
69       these buffers.
70
71       See tutorial [Interpolation] for an example of using the rtcInterpolate
72       function.
73
74   EXIT STATUS
75       For performance reasons this function does not  do  any  error  checks,
76       thus will not set any error flags on failure.
77
78   SEE ALSO
79       [rtcInterpolateN]
80
81
82
83                                                             rtcInterpolate(3)
Impressum