pquad_mesh3_data(3g) — Subroutines
Name
pquad_mesh3_data − Specifies the surface and interior attributes of a 3D quadrilateral mesh.
Operating States: PHOP, ∗, STOP, ∗
PHIGS PLUS function
Creates a structure element
Syntax
void pquad_mesh3_data (
Pint colr_type, /∗ (I) Color type ∗/
const Pfacet_array ∗facet_data, /∗ (I) Array of facet data ∗/
const Pedge_flag_array ∗edge_flags, /∗ (I) Array of edge flags ∗/
const Pvertex3_array ∗vertex_data /∗ (I) Array of vertex data ∗/
)
Data Structures
typedef struct {
Pint_size dims; /∗ facet array dimensions ∗/
Pint num_data_per_facet; /∗ number of data values per
facet ∗/
Pcolrv_ptr ∗facet_colrvs; /∗ array of facet colors ∗/
Pvec3 ∗facet_norms; /∗ array of facet normals ∗/
Pfloat ∗facet_data; /∗ list of facet data lists ∗/
} Pfacet_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;
typedef struct {
Pfloat delta_x; /∗ delta x value ∗/
Pfloat delta_y; /∗ delta y value ∗/
Pfloat delta_z; /∗ delta z value ∗/
} Pvec3;
typedef struct {
Pint_size dims; /∗ edge flag array dimensions ∗/
Pedge_flag_pair ∗edge_flags; /∗ array of edge flag pairs ∗/
} Pedge_flag_array;
typedef Pedge_flag Pedge_flag_pair[2];
typedef enum {
PEDGE_OFF, /∗ edges off ∗/
PEDGE_ON /∗ edges on ∗/
} Pedge_flag;
typedef struct {
Pint_size dims; /∗ dimensions of vertex array ∗/
Pint num_data_per_vertex; /∗ number of data values per
vertex ∗/
Ppoint3 ∗vertex_points; /∗ array of vertex points ∗/
Pcolrv_ptr vertex_colrvs; /∗ array of vertex colors ∗/
Pvec3 ∗vertex_norms; /∗ array of vertex normals ∗/
Pfloat ∗vertex_data; /∗ array of vertex data lists ∗/
} Pvertex3_array;
typedef struct {
Pfloat x; /∗ x coordinate ∗/
Pfloat y; /∗ y coordinate ∗/
Pfloat z; /∗ z coordinate ∗/
} Ppoint3;
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;
Constants
Defined Argument Constant Description
---------------------------------------------------------------------------
colr_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
pquad_mesh3_data specifies the surface and the interior attributes of a quadrilateral mesh. The quadrilateral mesh surface is composed of a point array. Digital PHIGS then connects the vertices to create a single facet.
If the data per facet flag indicates that you have specified a facet color, or if the data per vertex flag indicates that you have specified vertex colors, you must also have specified a color type.
The vertex data is a two-dimensional array (of mxn) where the data in each set of four neighboring array elements defines a quadrilateral, which need not be planar. Digital PHIGS uses a workstation-dependent method to render, decompose, or both, the quadrilateral mesh. Digital PHIGS considers a mesh with n < 2 or m < 2 degenerate, and treats it in an implementation-dependent manner.
During structure traversal, Digital PHIGS draws a three-dimensional mesh of (n--1) x (m--1) quadrilaterals, using the same set of attributes used for the fill area set 3 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 quadrilateral mesh 3 with data element.
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 facet_data or edge_flags arguments because that data is optional. Two-dimensional arrays must have row-major format.
See Also
padd_names_set
pfill_area_set3_data
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