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

NAME

6       vpGetMaterial - get material properties
7

SYNOPSIS

9       #include <volpack.h>
10
11       vpResult
12       vpGetMaterial(vpc,  material,  property,  surface_side,  r_ptr,  g_ptr,
13               b_ptr)
14           vpContext *vpc;
15           int material;
16           int property;
17           int surface_side;
18           double *r_ptr, *g_ptr, *b_ptr;
19

ARGUMENTS

21       vpc    VolPack context from vpCreateContext.
22
23       material
24              A constant specifying a  particular  material  number  (VP_MATE‐
25              RIAL0, VP_MATERIAL1, ..., VP_MATERIAL5).
26
27       property
28              A constant specifying one material property (VP_AMBIENT, VP_DIF‐
29              FUSE, VP_SPECULAR or VP_SHINYNESS).
30
31       surface_side
32              A constant specifying one side of the material surface (VP_EXTE‐
33              RIOR or VP_INTERIOR).
34
35       r_ptr, g_ptr, b_ptr
36              Locations  to  store  the RGB components of the color associated
37              with the property.  For VP_SHINYNESS, g_ptr and  b_ptr  are  not
38              used.
39

DESCRIPTION

41       vpGetMaterial  is  used  to get the properties of a material type.  The
42       arguments are exactly analogous to vpSetMaterial except that  the  sur‐
43       face_side  argument may not be VP_BOTH_SIDES, and the final three argu‐
44       ments are pointers to locations for storing the material properties.
45

ERRORS

47       The normal return value is VP_OK.  The following  error  return  values
48       are possible:
49
50       VPERROR_BAD_VALUE
51              The material number is invalid.
52
53       VPERROR_BAD_OPTION
54              Either the surface_side or property arguments are invalid.
55

SEE ALSO

57       VolPack(3), vpCreateContext(3), vpSetMaterial(3)
58
59
60
61VolPack                                                       vpGetMaterial(3)
Impressum