pinq_light_source_rep(3g) — Subroutines
Name
pinq_light_source_rep − Returns light source type and data record.
Operating States: PHOP, WSOP, ∗, ∗
PHIGS PLUS function
Syntax
void pinq_light_source_rep (
Pint wsid, /∗ (I) Workstation identifier ∗/
Pint index, /∗ (I) Light table index ∗/
Pinq_type return_type, /∗ (I) Type of returned values ∗/
Pint ∗error_ind, /∗ (O) Error indicator ∗/
Plight_source_rep ∗rep /∗ (O) Light source representation ∗/
)
Data Structures
typedef enum {
PINQ_SET, /∗ Use the exact state list values. ∗/
PINQ_REALIZED /∗ Use the values approximated by the graphics
handler. ∗/
} Pinq_type;
typedef struct {
Pint type; /∗ light source type ∗/
union Plight_source_rep_data {
struct Plight_source_rep_amb {
Pgcolr colr; /∗ light source color ∗/
} amb;
struct Plight_source_rep_dir {
Pgcolr colr; /∗ light source color ∗/
Pvec3 dir; /∗ light source direction ∗/
} dir;
struct Plight_source_rep_pos {
Pgcolr colr; /∗ light source color ∗/
Ppoint3 pos; /∗ light source position ∗/
Pfloat c1; /∗ light source attenuation coefficient ∗/
Pfloat c2; /∗ light source attenuation coefficient ∗/
} pos;
struct Plight_source_rep_spot {
Pgcolr colr; /∗ light source color ∗/
Ppoint3 pos; /∗ light source position ∗/
Pvec3 dir; /∗ light source direction ∗/
Pfloat concent_exp; /∗ concentration exponent ∗/
Pfloat c1; /∗ light source attenuation
coefficient ∗/
Pfloat c2; /∗ light source attenuation
coefficient ∗/
Pfloat spread_angle; /∗ light source spread angle ∗/
} spot;
} data;
} Plight_source_rep;
typedef struct {
Pint colr_type; /∗ color type ∗/
Pcolrv colr_value; /∗ color value ∗/
} Pgcolr;
typedef union {
Pint colr_ind; /∗ color index ∗/
Pcolr_rep colr_rep; /∗ color representation ∗/
} Pcolrv;
typedef union {
Prgb rgb; /∗ red, green, and blue color
specification ∗/
Pcieluv cieluv; /∗ CIELUV color specification ∗/
Phls hls; /∗ hue, lightness, and saturation
color specification ∗/
Phsv hsv; /∗ hue, saturation, and value color
specification ∗/
Pdata unsupp; /∗ color in an unsupported color
model ∗/
int impl_dep; /∗ implementation-defined ∗/
} Pcolr_rep;
typedef struct {
Pfloat red; /∗ red intensity ∗/
Pfloat green; /∗ green intensity ∗/
Pfloat blue; /∗ blue intensity ∗/
} Prgb;
typedef struct {
Pfloat cieluv_x; /∗ x coefficient ∗/
Pfloat cieluv_y; /∗ y coefficient ∗/
Pfloat cieluv_y_lum; /∗ y luminance ∗/
} Pcieluv;
typedef struct {
Pfloat hue; /∗ hue ∗/
Pfloat lightness; /∗ lightness ∗/
Pfloat satur; /∗ saturation ∗/
} Phls;
typedef struct {
Pfloat hue; /∗ hue ∗/
Pfloat satur; /∗ saturation ∗/
Pfloat value; /∗ value ∗/
} Phsv;
typedef struct {
size_t size; /∗ size of data ∗/
void ∗data; /∗ pointer to the data ∗/
} Pdata;
typedef struct {
Pfloat delta_x; /∗ delta x value ∗/
Pfloat delta_y; /∗ delta y value ∗/
Pfloat delta_z; /∗ delta z value ∗/
} Pvec3;
typedef struct {
Pfloat x; /∗ x coordinate ∗/
Pfloat y; /∗ y coordinate ∗/
Pfloat z; /∗ z coordinate ∗/
} Ppoint3;
Constants
Data Structure Constant Description
Constants
---------------------------------------------------------------------------
Color types PCOLR_INDIRECT Indirect (indexed)
color
PCOLR_RGB Direct specification
of red, green, and
blue
PCOLR_CIELUV Direct specification
in the format of the
Commission Internationale
de l’Eclairage
PCOLR_HSV Direct specification
of hue, saturation,
and value
PCOLR_HLS Direct specification
of hue, lightness,
and saturation
Light source types PLIGHT_SOURCE_AMB Ambient lighting
PLIGHT_SOURCE_DIR Infinite (directional)
lighting
PLIGHT_SOURCE_POS Positional lighting
PLIGHT_SOURCE_SPOT Spot lighting
---------------------------------------------------------------------------
Description
pinq_light_source_rep queries the workstation state list and returns the light source type and a data record that describes the light source.
See Also
pinq_light_source_facs
pinq_list_light_source_inds
pinq_pred_light_source_rep
pset_light_source_rep
pset_light_source_st