ptri_strip3_data(3g) — Subroutines
Name
ptri_strip3_data − Specifies the 3D form of a triangle strip 3 with data primitive.
Operating States: PHOP, ∗, STOP, ∗
PHIGS PLUS function
Creates a structure element
Syntax
void ptri_strip3_data (
Pint colr_type, /∗ (I) Color type ∗/
const Pfacet_list ∗facet_data, /∗ (I) List of facet data ∗/
const Pedge_flag_list ∗edge_flags, /∗ (I) List of edge flags ∗/
const Pvertex3_list ∗vertex_data /∗ (I) List of vertex data ∗/
)
Data Structures
typedef struct {
Pint num_facets; /∗ number of facets ∗/
Pint num_data_per_facet; /∗ number of data values per facet ∗/
Pcolrv_ptr facet_colrvs; /∗ list of facet color values ∗/
Pvec3 ∗facet_norms; /∗ list of facet normals ∗/
Pfloat ∗facet_data; /∗ list of facet data lists ∗/
} Pfacet_list;
typedef union {
Pint ∗colr_ind; /∗ pointer to color indices ∗/
Pcolr_rep_ptr colr_reps; /∗ pointer to color
representations ∗/
} Pcolrv_ptr;
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;
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_edges; /∗ number of edges in the list ∗/
Pedge_flag ∗edge_flags; /∗ list of edge flags ∗/
} Pedge_flag_list;
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;
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
ptri_strip3_data specifies the three-dimensional form of the surface and the interior attributes of a triangle strip with data primitive. The triangle strip 3 is a sequence of triangles, the edges of which are line segments forming the boundaries of all triangles in the strip. It generates a sequence of n triangles from n + 2 vertices.
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 triangle strip, which need not be planar. Digital PHIGS uses a workstation-dependent method to render, decompose, or both, the triangle strip. Digital PHIGS considers a triangle strip with n < 2 or m < 2 degenerate, and treats it in an implementation-dependent manner.
During structure traversal, Digital PHIGS draws a triangle strip using the same attribute set as that used by the fill area set with data primitive.
The strip is composed of n--2 triangles, where n is the number of vertices. The first triangle is formed from vertices <1,2,3>; the second triangle from vertices <2,3,4>; ... ; the n--2 triangle from vertices <n--2, n--1, n>. A strip with fewer than three vertices is considered degenerate and is treated in an implementation-dependent manner. If information per facet is present, there will be n--2 pieces of information.
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 strip 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.
If you do not supply a value for facet_data or edge_flags, Digital PHIGS will not supply facet or edge flag data.
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