1vpRamp(3)                  Library Functions Manual                  vpRamp(3)
2
3
4

NAME

6       vpRamp - initialize an array with a piecewise-linear ramp
7

SYNOPSIS

9       #include <volpack.h>
10
11       vpResult
12       vpRamp(array, stride, num_points, ramp_x, ramp_y)
13           float *array;
14           int stride;
15           int num_points;
16           int *ramp_x;
17           float *ramp_y;
18

ARGUMENTS

20       array  Output array.
21
22       stride Stride from one array element to the next, in bytes.
23
24       num_points
25              Number of entries in the input arrays (ramp_x and ramp_y).
26
27       ramp_x Input array containing indices into array.
28
29       ramp_y Input array containing values to store into array.
30

DESCRIPTION

32       vpRamp is a utility routine for initializing linear arrays of floating-
33       point numbers with piecewise-linear ramps.  A ramp is defined by a  set
34       of  (x, y) pairs.  The X coordinates are integers that index entries in
35       the array argument, and the Y coordinates are floating-point values  to
36       store  into  the  array.   Linearly-interpolated Y values are stored in
37       array elements with indexes in between two of the X values.
38
39       The values in ramp_x most be strictly increasing.  The stride  argument
40       may  be used to skip array elements or to initialize arrays with a non-
41       standard stride.  If the output array is a simple linear array of  type
42       float then the stride should be sizeof(float).
43
44       This  function  is  useful  for creating lookup tables used for opacity
45       transfer functions (see vpSetClassifierTable(3)) and shading  functions
46       (see vpSetLookupShader(3)).
47

ERRORS

49       The  normal return value is VP_OK.  The following error return value is
50       possible:
51
52       VPERROR_BAD_VALUE
53              The number of points is less than one or the X  values  are  not
54              strictly increasing.
55

SEE ALSO

57       VolPack(3)
58
59
60
61VolPack                                                              vpRamp(3)
Impressum