GSP
Quick Navigator

Search Site

Unix VPS
A - Starter
B - Basic
C - Preferred
D - Commercial
MPS - Dedicated
Previous VPSs
* Sign Up! *

Support
Contact Us
Online Help
Handbooks
Domain Status
Man Pages

FAQ
Virtual Servers
Pricing
Billing
Technical

Network
Facilities
Connectivity
Topology Map

Miscellaneous
Server Agreement
Year 2038
Credits
 

USA Flag

 

 

Man Pages
vpRamp(3) FreeBSD Library Functions Manual vpRamp(3)

vpRamp - initialize an array with a piecewise-linear ramp

#include <volpack.h>

vpResult

vpRamp(array, stride, num_points, ramp_x, ramp_y)

float *array;
int stride;
int num_points;
int *ramp_x;
float *ramp_y;

array
Output array.
stride
Stride from one array element to the next, in bytes.
num_points
Number of entries in the input arrays (ramp_x and ramp_y).
ramp_x
Input array containing indices into array.
ramp_y
Input array containing values to store into array.

vpRamp is a utility routine for initializing linear arrays of floating-point numbers with piecewise-linear ramps. A ramp is defined by a set of (x, y) pairs. The X coordinates are integers that index entries in the array argument, and the Y coordinates are floating-point values to store into the array. Linearly-interpolated Y values are stored in array elements with indexes in between two of the X values.

The values in ramp_x most be strictly increasing. The stride argument may be used to skip array elements or to initialize arrays with a non-standard stride. If the output array is a simple linear array of type float then the stride should be sizeof(float).

This function is useful for creating lookup tables used for opacity transfer functions (see vpSetClassifierTable(3)) and shading functions (see vpSetLookupShader(3)).

The normal return value is VP_OK. The following error return value is possible:
VPERROR_BAD_VALUE
The number of points is less than one or the X values are not strictly increasing.

VolPack(3)
VolPack

Search for    or go to Top of page |  Section 3 |  Main Index

Powered by GSP Visit the GSP FreeBSD Man Page Interface.
Output converted with ManDoc.