Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ pcell_array3_plus(3g) — PHIGS 5.1

Media Vault

Software Library

Restoration Projects

Artifacts Sought

pcell_array3_plus(3g)  —  Subroutines

Name

pcell_array3_plus − Divides a designated parallelogram into cells, and displays each cell in a specified color. 

 
Operating States: PHOP, ∗, STOP, ∗
PHIGS PLUS function
Creates a structure element

Syntax

void pcell_array3_plus (
  const Pparal         ∗paral,    /∗ (I) Cell parallelogram P, Q, R ∗/
  const Ppat_rep_plus  ∗pat       /∗ (I) Pattern color array ∗/
)

Data Structures

typedef struct {
    Ppoint3    p;    /∗ point p ∗/
    Ppoint3    q;    /∗ point q ∗/
    Ppoint3    r;    /∗ point r ∗/
} Pparal;
    typedef struct {
        Pfloat   x;    /∗ x coordinate ∗/
        Pfloat   y;    /∗ y coordinate ∗/
        Pfloat   z;    /∗ z coordinate ∗/
    } Ppoint3;
typedef struct {
    Pint           colr_type;    /∗ color type ∗/
    Pcolrv_array   colrs;        /∗ array of color values ∗/
} Ppat_rep_plus;
    typedef struct {
        Pint_size      dims;     /∗ color value array dimensions ∗/
        Pcolrv_ptr     colrs;    /∗ array of color values ∗/
    } Pcolrv_array;
        typedef struct {
            Pint       size_x;   /∗ x size ∗/
            Pint       size_y;   /∗ y size ∗/
        } Pint_size;
        typedef union {
            Pint           ∗colr_inds;  /∗ pointer to color indexes ∗/
            Pcolr_rep_ptr   colr_reps;  /∗ pointer to color
                                           representations ∗/
        } Pcolrv_ptr;
            typedef union {
                Prgb       ∗rgb;       /∗ pointer to RGB color values ∗/
                Pcieluv    ∗cieluv;    /∗ pointer to CIELUV color values ∗/
                Phls       ∗hls;       /∗ pointer to HLS color values ∗/
                Phsv       ∗hsv;       /∗ pointer to HSV color values ∗/
                Pdata      ∗unsupp;    /∗ pointer to unsupported color
                                          values ∗/
            } Pcolr_rep_ptr;
                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
---------------------------------------------------------------------------
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

pcell_array3_plus divides a designated parallelogram into cells and displays each cell in a specified color.  This function allows for more direct color specification than the standard primitive. 

Depending on the current edit mode, this function either inserts the new structure element directly after the element indicated by the pointer or replaces the element indicated by the pointer.  The pointer then points to the new cell array 3 plus element. 

You pass a three-dimensional array containing color index values as one argument to this function. Digital PHIGS maps the color index values to corresponding cells within a parallelogram-shaped area of the workstation surface. 

There is a one-to-one correspondence between the number of specified array columns and rows, and the number of columns and rows by which Digital PHIGS divides the cell array parallelogram. Each of the columns within the parallelogram is of equal width, and each of the rows within the parallelogram is of equal height.  Digital PHIGS maps the color index values from each specified color index array element to the corresponding cell, moving from the starting point towards the diagonal point along the x-axis. The grid defined by the three parallelogram vertices and the number of columns and rows is subject to all transformations. 

For more information on the initial color index values for a given workstation, see the Device Specifics Reference Manual for DEC GKS and DEC PHIGS. 

To alter the color associated with a certain index value, you can use the function pset_colr_rep. 

If Digital PHIGS is in immediate mode, it performs this function immediately, but the function does not create a structure element. 

Digital PHIGS Version 4.1 does not support this function.

See Also

padd_names_set
pcell_array
pcell_array3
pset_back_refl_model
pset_back_refl_props
pset_facet_cull_mode
pset_facet_disting_mode
pset_light_source_st
pset_refl_model
pset_refl_props

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