Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ pinq_pred_light_source_rep(3g) — PHIGS 5.1

Media Vault

Software Library

Restoration Projects

Artifacts Sought

pinq_pred_light_source_rep(3g)  —  Subroutines

Name

pinq_pred_light_source_rep − Returns the light source type and data record. 

Operating States: PHOP, ∗, ∗, ∗
PHIGS PLUS function

Syntax

void pinq_pred_light_source_rep (
 
  Pint                 wstype,     /∗ (I) Workstation type ∗/
  Pint                 index,      /∗ (I) Predefined light source index ∗/
  Pint                ∗error_ind,  /∗ (O) Error indicator ∗/
  Plight_source_rep   ∗rep         /∗ (O) Light source representation ∗/
)

 
 

Data Structures

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 ∗/
    Pfloat     delta_y;    /∗ delta y ∗/
    Pfloat     delta_z;    /∗ delta z ∗/
} Pvec3;
typedef struct {
    Pfloat     x;    /∗ x coordinate ∗/
    Pfloat     y;    /∗ y coordinate ∗/
    Pfloat     z;    /∗ z coordinate ∗/
} Ppoint3;

Constants

Data Structure Constants     Constant              Description
---------------------------------------------------------------------------
Light source types           PLIGHT_SOURCE_AMB     Ambient lighting
                             PLIGHT_SOURCE_DIR     Infinite (directional)
                                                   lighting
                             PLIGHT_SOURCE_POS     Positional lighting
                             PLIGHT_SOURCE_SPOT    Spot lighting
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 Internatio-
                                                   nale de l’Eclairage
                             PCOLR_HSV             Direct specification of
                                                   hue, saturation, and
                                                   value
                             PCOLR_HLS             Direct specification of
                                                   hue, lightness, and
                                                   saturation
---------------------------------------------------------------------------

Description

pinq_pred_light_source_rep returns the light source type and the data record that describes the light source.  See the pset_light_source_rep function description in Part 1 for information about returned data record formats. 

See Also

pinq_light_source_facs
pinq_light_source_rep
pinq_list_light_source_inds
pset_light_source_rep
pset_light_source_st

Typewritten Software • bear@typewritten.org • Edmonds, WA 98026