POLYLINE SET 3 WITH DATA(3P+) — Kubota Pacfic Computer Inc. (29 February 1991)
NAME
POLYLINE SET 3 WITH DATA − create a 3D polyline set structure element that includes colour and shading data
SYNOPSIS
C Syntax
void
ppolyline_set3_data ( vflag, colour_type, npl, vdata )
Pintvflag;data per vertex flag
Pintcolour_type;colour type
Pintnpl;number of polylines in the set
Pline_vdata_list3∗vdata; per line vertex data list
Required PHIGS Operating States
(PHOP, ∗, STOP, ∗)
DESCRIPTION
Purpose
POLYLINE SET 3 WITH DATA creates a 3D polyline set primitive with colour and shading data.
A 3D polyline with data primitive is a set of connected lines in a 3D space defined by a series of Modelling Coordinate points. The element can optionally specify colour information for each vertex of the primitive.
C Input Parameters
vflagThe data per vertex flag specifies the available data for each vertex of the primitive.
0PVERT_COORDCoordinates Specified
1PVERT_COORD_COLOURCoordinates and Colours Specified
colour_type
The colour type for specified vertex colours.
0PINDIRECTColour Index Specified
1PMODEL_RGBRed, Green, and Blue
2PMODEL_CIELUVCIE Colour Model
3PMODEL_HSVHue, Saturation, and Value
4PMODEL_HLSHue, Lightness, and Saturation
nplThe number of polylines in the set.
vdataA pointer to an array of npl Pline_vdata_list3 structures that specifies the list of vertices and optionally associated colour information. Pline_vdata_list3 is defined in phigs.h as follows:
typedef struct {
Pintnum_vertices;/∗ number of vertices ∗/
Pline_vdata_arr3vertex_data;/∗ line vertex data ∗/
} Pline_vdata_list3;
Pline_vdata_arr3 is defined in phigs.h as follows:
typedef union {
Ppoint3∗points;/∗ array of points ∗/
Pptco3∗ptcolrs;/∗ array of points with colours ∗/
/∗ implementation-dependent data ∗/
}Pline_vdata_arr3;
Ppoint3 is defined in phigs.h as follows:
typedef struct {
Pfloatx;/∗ x coordinate ∗/
Pfloaty;/∗ y coordinate ∗/
Pfloatz;/∗ z coordinate ∗/
} Ppoint3;
Pptco3 is defined in phigs.h as follows:
typedef struct {
Ppoint3point;/∗ point coordinates ∗/
Pcovalcolr;/∗ colour ∗/
} Pptco3;
Ppoint3 is defined above. Pcoval is defined in phigs.h as follows:
typedef union {
Pintind;/∗ index in workstation colour bundle table ∗/
Pcolr_repdirect;/∗ direct colour components ∗/
} Pcoval;
When colour_model is PINDIRECT, ind is used; otherwise, direct is used.
Pcolr_rep is defined in phigs.h as follows:
typedef union {
Prgbrgb;/∗ Red Green Blue colour specification ∗/
Pcieluvcieluv;/∗ CIE L∗U∗V∗ colour specification ∗/
Phlshls;/∗ Hue Lightness Saturation colour specification ∗/
Phsvhsv;/∗ Hue Saturation Value colour specification ∗/
Pdataunsupp;/∗ Colour in unsupported colour model ∗/
} Pcolr_rep;
Prgb is defined in phigs.h as follows:
typedef struct {
Pfloatred;/∗ red, hue, etc ∗/
Pfloatgreen;/∗ green, saturation, lightness, etc ∗/
Pfloatblue;/∗ blue, value, saturation, etc ∗/
} Prgb;
Pcieluv is defined in phigs.h as follows:
typedef struct {
Pfloatcieluv_x;/∗ x coefficient ∗/
Pfloatcieluv_y;/∗ y coefficient ∗/
Pfloatcieluv_y_lum; /∗ y luminance ∗/
} Pcieluv;
Phls is defined in phigs.h as follows:
typedef struct {
Pfloathue;/∗ hue ∗/
Pfloatlightness;/∗ lightness ∗/
Pfloatsatur;/∗ saturation ∗/
} Phls;
Phsv is defined in phigs.h as follows:
typedef struct {
Pfloathue;/∗ hue ∗/
Pfloatsatur;/∗ saturation ∗/
Pfloatvalue;/∗ value ∗/
} Phsv;
Pdata is defined in phigs.h as follows:
typedef struct {
size_tsize;/∗ size of data ∗/
char∗data/∗ pointer to data ∗/
} Pdata;
Execution
Depending on the edit mode, a POLYLINE SET 3 WITH DATA element is inserted into the open structure after the element pointer, or replaces the element pointed to by the element pointer. In either case, the element pointer is updated to point to the newly created POLYLINE SET 3 WITH DATA element.
When the structure is traversed, POLYLINE SET 3 WITH DATA generates a set of unconnected polylines defined by a set of points. Each point sequence in the set generates connected line segments. Colour information for shading the line segments can be specified with each point as part of the primitive definition.
POLYLINE SET 3 WITH DATA elements containing less than two points can be created, but are treated in a workstation-dependent fashion.
Attributes Applied
The attributes listed below are used to display the POLYLINE SET 3 WITH DATA primitive when the structure is traversed. The Aspect Source Flags (ASFs) tell where to access the output display attributes. These attributes can come directly from the traversal state list, or they can be accessed indirectly, using the appropriate index in the traversal state list and the corresponding bundled representation in the PHIGS workstation state list.
polyline colourpolyline colour index ASF
linewidth scale factorlinewidth scale factor ASF
linetypelinetype ASF
polyline shading methodpolyline shading method ASF
polyline index
depth cue index
name set
ERRORS
005Ignoring function, function requires state (PHOP, ∗, STOP, ∗)
SEE ALSO
INQUIRE POLYLINE FACILITIES PLUS (3P+)
POLYLINE 3 (3P)
September 02, 1992