Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ pset_light_source_rep(3g) — PHIGS 5.1

Media Vault

Software Library

Restoration Projects

Artifacts Sought

pset_light_source_rep(3g)  —  Subroutines

Name

pset_light_source_rep − Defines the attributes of a light source. 

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

Syntax

void pset_light_source_rep (
  Pint                       wsid,     /∗ (I) Workstation identifier ∗/
  Pint                       index,    /∗ (I) Light table index ∗/
  const Plight_source_rep   ∗rep       /∗ (I) 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 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 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
                                                   Internationale de
                                                   l’Eclairage
                            PCOLR_HSV              Direct specification of
                                                   hue, saturation, and
                                                   value
                            PCOLR_HLS              Direct specification of
                                                   hue, lightness, and
                                                   saturation
---------------------------------------------------------------------------

 

Description

pset_light_source_rep creates or redefines an entry for the light source table by associating the light table index with the light source type and data record values in the light source table.  This table is in the workstation state list for the workstation specified by the workstation identifier. 

See Also

pinq_light_source_facs
pinq_light_source_rep
pinq_list_light_source_inds
pinq_pred_light_source_rep
pinq_ws_st_table_length_plus
pset_light_source_st
pset_refl_model
pset_refl_props

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