Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ pset_refl_rep(3g) — PHIGS 5.1

Media Vault

Software Library

Restoration Projects

Artifacts Sought

pset_refl_rep(3g)  —  Subroutines

Name

pset_refl_rep − Associates the reflectance index with the specified parameters. 

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

Syntax

void pset_refl_rep (
  Pint              wsid,    /∗ (I) Workstation identifier ∗/
  Pint              index,   /∗ (I) Reflectance index  ∗/
  const Prefl_rep  ∗rep      /∗ (I) Reflectance representation ∗/
)

Data Structures

typedef struct {
    Pint          refl_model;   /∗ reflectance model ∗/
    Prefl_prop    refl_prop;    /∗ reflectance property data ∗/
} 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 color ∗/
                Pfloat    spec_exp;    /∗ specular exponent ∗/
            } simple_refl;
            Pdata      unsupp;  /∗ unsupported reflectance property data ∗/
        } data;
    } Prefl_prop;
        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;

Constants

Data Structure Constants  Constant                      Description
---------------------------------------------------------------------------
Reflectance models        PREFL_MODEL_NO_REFL           Digital PHIGS per-
                                                        forms no reflec-
                                                        tance calculation.
                          PREFL_MODEL_AMB_REFL          Digital PHIGS pro-
                                                        duces ambient re
                                                        reflectance
                                                        effects.
                          PREFL_MODEL_AMB_DIFF_REFL     Digital PHIGS pro-
                                                        duces ambient and
                                                        diffuse reflectance
                                                        effects.
                          PREFL_MODEL_AMB_DIFF_SPEC     Digital PHIGS pro-
                          _REFL                         duces ambient,
                                                        diffuse, and
                                                        specular reflec-
                                                        tance effects.
Reflectance property      PREFL_PROPS_SIMPLE_REFL       Simple reflectance.
type
Color types               PCOLR_INDIRECT                Indirect (indexed)
                                                        color.
                          PCOLR_RGB                     Direct specifica-
                                                        tion of red, green,
                                                        and blue.
                          PCOLR_CIELUV                  Direct specifica-
                                                        tion in the format
                                                        of the Commission
                                                        Internationale de
                                                        l’Eclairage.
                          PCOLR_HSV                     Direct specifica-
                                                        tion of hue,
                                                        saturation, and
                                                        value.
                          PCOLR_HLS                     Direct specifica-
                                                        tion of hue,
                                                        lightness, and
                                                        saturation.
---------------------------------------------------------------------------

Description

pset_refl_rep associates the reflectance index with the specified parameters.  The reflectance bundle table has predefined entries taken from the workstation description table. You can set any entry, including the predefined entries, with this function. 

During structure traversal, Digital PHIGS uses the current reflectance index and current back reflectance index entries in the PHIGS traversal state list to select entries in the reflectance bundle table.  If the entry corresponding to either of these indexes is undefined, Digital PHIGS uses the entry corresponding to index 1. 

Digital PHIGS Version 4.1 does not support this function.

See Also

pset_back_refl_model
pset_back_refl_props
pset_refl_ind
pset_refl_model
pset_refl_props
pinq_pred_refl_rep
pinq_refl_facs
pinq_refl_rep

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