Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ pe_index_polygon_data(3g) — PHIGS 5.1

Media Vault

Software Library

Restoration Projects

Artifacts Sought

pe_index_polygon_data(3g)  —  Subroutines

Name

pe_index_polygon_data − Specifies facet, edge, and vertex data and values. 

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

Syntax

void pe_index_polygon_data (
  Pint               shpflag,          /∗ (I) Shape of the facet. ∗/
  Pint               fctflag,          /∗ (I) Per facet data flag. ∗/
  Pint               vrtflag,          /∗ (I) Per vertex data flag. ∗/
  Pint               edgflag,          /∗ (I) Per edge data flag. ∗/
  const Pedge_flag  ∗edgvis,           /∗ (I) Array of edge visibility
                                              flags for all edges. ∗/
  Pint               clr_type,         /∗ (I) Color type of the facet and
                                              vertex color values. ∗/
  Pint               num_vertices,     /∗ (I) Number of vertices. ∗/
  const Pvec3       ∗gnormals,         /∗ (I) Array of geometric normals of
                                              length num_bounds. ∗/
  const Pcolrv_ptr   facet_clr_val,    /∗ (I) Address of the array of facet
                                              color values of length
                                              num_bounds. ∗/
  const Ppoint3     ∗vertices,         /∗ (I) Array of vertices for all
                                              bounds of length
                                              num_vertices. ∗/
  const Pcolrv_ptr   vertex_clr_vals,  /∗ (I) Address of the array of
                                              vertex color values of
                                              length num_vertices. ∗/
  const Pvec3       ∗vnormals,         /∗ (I) Array of vertex normals
                                              of length num_vertices. ∗/
  Pint               num_bounds,       /∗ (I) Number of polygons in this
                                              primitive. ∗/
  const Pint        ∗bounds,           /∗ (I) Array of the number of
                                              vertices in each polygon
                                              of length num_bounds. ∗/
  const Pint        ∗indices           /∗ (I) Array of vertex indexes for
                                              all bounds of all polygons.
                                              The indexes are
                                              zero-based. ∗/
)

Data Structures

typedef enum {
    PEDGE_OFF,    /∗ edges off ∗/
    PEDGE_ON      /∗ edges on ∗/
} Pedge_flag;
typedef struct {
    Pfloat     delta_x;     /∗ delta x value ∗/
    Pfloat     delta_y;     /∗ delta y value ∗/
    Pfloat     delta_z;     /∗ delta z value ∗/
} Pvec3;
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;
typedef struct {
    Pfloat     x;     /∗ x coordinate ∗/
    Pfloat     y;     /∗ y coordinate ∗/
    Pfloat     z;     /∗ z coordinate ∗/
} Ppoint3;

Constants

Defined Argument    Constant            Description
---------------------------------------------------------------------------
shpflag             PSHAPE_COMPLEX      Some facets are self-intersecting.
                    PSHAPE_NONCONVEX    Some facets are concave, but no
                                        facets are self-intersecting.
                    PSHAPE_CONVEX       All facets are convex.
                    PSHAPE_UNKNOWN      Facet shape unknown.
fctflag             PFA_NONE            No data per fill area.
                    PFA_COLOUR          Facet color per fill area.
                    PFA_NORMAL          Geometric normal per fill area.
                    PFA_COLOURNORMAL    Facet color and geometric normal
                                        per fill area.
vrtflag             PVERT_NONE          No data per vertex.
                    PVERT_COLOUR        Color per vertex.
                    PVERT_NORMAL        Normal per vertex.
                    PVERT_COLOURNORMAL  Color and normal per vertex.
clr_type            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

pe_index_polygon_data specifies the following:

•Data per facet flag

•Data per edge flag

•Data per vertex flag

•Facet data

•Edge data

•Direct color model

•Vertex data

•Vertex indexes values

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 index polygons with data element. 

The geometric description of this primitive consists of a list of vertices and a list of index lists.  Each index list is a list of indexes into the vertex list, thereby implicitly defining a list of vertices (and optional per vertex data).  Each such vertex list defines a facet of the index polygons, which is rendered as a single fill area set.  However, the appearance of such a facet, which is self-intersecting, is indeterminate and device-dependent. 

If the data per vertex flag specifies coordinates and colors, or coordinates, colors, and normals, then a list of colors (one for each vertex) must be specified. 

If the data per vertex flag indicates that a color per vertex is specified, a direct color model value must also be specified for the output primitive. 

During structure traversal, Digital PHIGS draws a number of facets.  The facets can be noncoplanar.  Digital PHIGS renders each facet as a fill area set with data.  You specify the data for each vertex once only (in the vertex data list).  You select the vertices that define the boundary of each facet in the vertex index list.  Index 1 selects the first vertex in the list. 

The facets do not necessarily form a closed surface.  Even if a volume is implicitly specified, no additional effects are provided for rendering this type of primitive. 

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

See Also

padd_names_set
pinq_edge_facs
pinq_int_facs
premove_names_set
pset_back_int_colr
pset_back_int_shad_method
pset_back_int_style
pset_back_int_style_ind
pset_back_refl_model
pset_back_refl_props
pset_depth_cue_ind
pset_edge_colr
pset_edge_colr_ind
pset_edge_flag
pset_edge_ind
pset_edgetype
pset_edgewidth
pset_facet_cull_mode
pset_facet_disting_mode
pset_hlhsr_id
pset_indiv_asf
pset_int_colr
pset_int_colr_ind
pset_int_ind
pset_int_shad_method
pset_int_style
pset_int_style_ind
pset_light_source_st
pset_pick_id
pset_refl_model
pset_refl_props
pset_view_ind

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