Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ ptri_set3_data(3g) — PHIGS 5.1

Media Vault

Software Library

Restoration Projects

Artifacts Sought

ptri_set3_data(3g)  —  Subroutines

Name

ptri_set3_data − Specifies the 3D form of the triangle set with data primitive. 

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

Syntax

void ptri_set3_data (
  Pint                             colr_type,   /∗ (I) Color type ∗/
  const Ptri_set_data             ∗set_data,    /∗ (I) Triangle set data ∗/
  const Pedge_flag_triplet_list   ∗edge_flags,  /∗ (I) List of triangle
                                                       edge flag
                                                       triplets ∗/
  const Pvertex3_list             ∗vertex_list, /∗ (I) Vertex list ∗/
  const Pvertex_ind_triplet_list  ∗vertex_inds  /∗ (I) List of triangle
                                                       vertex indexes ∗/
)

Data Structures

typedef struct {
    Pint                num_sets;           /∗ number of triangle sets ∗/
    Pint                num_data_per_facet; /∗ number of data values per
                                               facet ∗/
    Pcolrv_ptr          facet_colrvs;       /∗ list of facet colors ∗/
    Pvec3              ∗facet_norms;        /∗ list of facet normals ∗/
    Pfloat             ∗facet_data;         /∗ list of facet data lists ∗/
} Ptri_set_data;
    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     delta_x;     /∗ delta x value ∗/
        Pfloat     delta_y;     /∗ delta y value ∗/
        Pfloat     delta_z;     /∗ delta z value ∗/
    } Pvec3;
typedef struct {
    Pint                  num_edge_flag_triplets;   /∗ number of edge flag
                                                       triplets ∗/
    Pedge_flag_triplet   ∗edge_flag_triplets;       /∗ list of edge flag
                                                       triplets ∗/
} Pedge_flag_triplet_list;
    typedef Pedge_flag  Pedge_flag_triplet[3];
        typedef enum {
            PEDGE_OFF,    /∗ edges off ∗/
            PEDGE_ON      /∗ edges on ∗/
        } Pedge_flag;
typedef struct {
    Pint         num_vertices;         /∗ number of vertices ∗/
    Pint         num_data_per_vertex;  /∗ number of data values per
                                          vertex ∗/
    Ppoint3     ∗vertex_points;        /∗ list of vertex points ∗/
    Pcolrv_ptr   vertex_colrvs;        /∗ list of vertex colors ∗/
    Pvec3       ∗vertex_norms;         /∗ list of vertex normals ∗/
    Pfloat      ∗vertex_data;          /∗ list of vertex data lists ∗/
} Pvertex3_list;
    typedef struct {
        Pfloat     x;    /∗ x coordinate ∗/
        Pfloat     y;    /∗ y coordinate ∗/
        Pfloat     z;    /∗ z coordinate ∗/
    } Ppoint3;
typedef struct {
    Pint                    num_vertex_ind_triplets;  /∗ number of vertex
                                                         index triplets ∗/
    Pvertex_ind_triplet    ∗vertex_ind_triplets;      /∗ list of vertex
                                                         index triplets ∗/
} Pvertex_ind_triplet_list;
    typedef Pint Pvertex_ind_triplet[3];

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

ptri_set3_data specifies the three-dimensional form of the triangle set with data primitive.  Depending on the 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 triangle set 3 with data element. 

You can supply data for the facet color, facet normal, and facet application-specific information for each facet (each fill area set).  If you specify information for one facet, it is required for all the facets. 

You supply the vertex coordinates for each vertex data, and can supply data for the vertex color, vertex normal, and vertex application-specific information for each vertex.  If you specify information for one vertex, it is required for all the vertices. 

If you specify facet or vertex colors, you must also specify a color type. 

When Digital PHIGS interprets this element, it generates a set of triangles.  An index value of 1 selects the first vertex in the vertex data list, a value of 2 selects the second vertex, and so on.  The function selects the vertices that define each fill area using a list of triples of indexes.  Each triple defines a triangle.  If a triangle set 3 with data element contains a list of vertex data with less than three elements, the function will not display a triangle. 

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

You can pass a null value for the set_data or edge_flags arguments because that data is optional. 

Digital PHIGS Version 4.1 does not support this function.

See Also

pfill_area_set3_data
pinq_edge_facs
pinq_int_facs
pset_back_int_colr
pset_back_int_shad_method
pset_back_int_style
pset_back_int_style_ind
pset_back_refl_model
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_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_refl_model
pset_refl_props
pset_rend_colr_model

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