void pset_refl_rep(
Pint ws_id, /* workstation identifier */ Pint index, /* reflectance index */ const Prefl_rep *rep /* reflectance representation */
)
typedef struct {
Pint refl_model; /* reflectance models */
Prefl_prop refl_prop; /* reflectance properties */
} Prefl_rep;
typedef struct {
Pint type; /* reflectance property type */
union Prefl_prop_data {
struct Prefl_prop_simple_refl {
Pfloat amb_coeff; /* ambient reflection coefficient */
Pfloat diff_coeff; /* diffuse reflection coefficient */
Pfloat spec_coeff; /* specular reflection coefficient */
Pgcolr spec_colr; /* specular colour */
Pfloat spec_exp; /* specular exponent */
} simple_refl;
} data;
} Prefl_prop;
typedef struct {
Pint colr_type; /* colour type */
Pcolrv colr_value; /* colour value */
} Pgcolr;
typedef union {
Pint colr_ind; /* colour index */
Pcolr_rep colr_rep; /* colour representation */
} Pcolrv;
typedef union {
Prgb rgb; /* red green blue colour specification */
Pcieluv cieluv; /* CIE L*u*v* colour specification */
Phls hls; /* hue lightness saturation colour specification */
Phsv hsv; /* hue saturation value colour specification */
} Pcolr_rep;
The rep values are placed in the reflectance bundle table at index in the workstation state list.
The reflectance bundle table is initialized from the ws_id workstation description table
The defined values for reflectance model are:
PREFL_MODEL_NO_REFL no reflectance calculation performed
PREFL_MODEL_AMB_REFL ambient reflectance effects produced
PREFL_MODEL_AMB_DIFF_REFL ambient and diffuse reflectance effects produced
PREFL_MODEL_AMB_DIFF_SPEC_REFL ambient, diffuse, and specular reflectance effects produced
During structure traversal, the current reflectance index and current back reflectance index in the traversal state list are used to select entries in the reflectance bundle table of a workstation. Depending on the current facet distinguishing mode , the front and back reflectance index attributes are used when displaying respective portions of area defining output primitives. If the entry corresponding to either of these indices is not defined, the entry corresponding to an index of 1 is used.
set reflectance index, set individual asf, set reflectance model, set reflectance properties, inquire reflectance representation, inquire reflectance facilities, inquire predefined reflectance representation, inquire workstation state table length plus