 |
vllight, vlenable, vldisable
NAME
vllight, vlenable, vldisable - Define the
light sources and enable/disable them
SYNOPSIS
#include <parvox.h>
int vllight(int light_num, int parameter,
float n0, float n1, float n3)
int vlenable(int type)
int vldisable(int type)
DESCRIPTION
vllight()
sets the light source parameters. ParVox allows maximal 5 light sources
and they are numbered as VL_LIGHT0, VL_LIGHT1, VL_LIGHT2, VL_LIGHT3, an
VL_LIGHT4. light_num
can be one of the above five numbers. ParVox assumes all the
light sources are located in the infinite distace and all the lights are
white light. parameter
of a given light could be either VL_DIRECTION or VL_COLOR. If it
is VL_DIRECTION, (n0,
n1, n2)
is the direction vector of the selected light source in object coordinates.
If it is VL_COLOR, n0 is the
intensity of the light (in the range of 0 and 1); n1
and n2 are ignored.
vlenable() and vldisable() enables
or disables the lighting model if type
is VL_LIGHTING, or a particular light source if type
is one of the five light number VL_LIGHTi.
Lighting
model is only used for isosurface rendering. Each isourface is assigned
a default color and the lighting model based on the Blinn's equation is
used to create the shading. For direct volume rendering or slice
rendering, the voxel color is solely determined by the color map.
SEE ALSO
vlmaterial, vliso_shade
, vlgradient_shade
BACK TO INDEX
|
 |