Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ pplsd3(3P+) — PHIGS 1.1

Media Vault

Software Library

Restoration Projects

Artifacts Sought

POLYLINE SET 3 WITH DATA(3P+)  —  MISC. REFERENCE MANUAL PAGES

NAME

POLYLINE SET 3 WITH DATA − creates a 3D polyline set structure element that includes colour and shading data

SYNOPSIS

C Syntax

void
ppolylineset3data ( vflag, colour_model, npl, vdata )
Pintvflag;data per vertex flag
Pintcolour_model;colour model
Pintnpl;number of polylines in the set
Plinevdatalst3∗vdata;per line vertex data list

FORTRAN Syntax

SUBROUTINE pplsd3 ( VFLAG, COLMOD, NPL, PLARR, NV, COORDS, IVCOLR, VCOLR, IMPL )
INTEGERVFLAGdata per vertex flag
INTEGERCOLMODcolour model
INTEGERNPLnumber of point lists
INTEGERPLARR(NPL)array of end indices for point lists
INTEGERNVnumber of vertices
REALCOORDS(3,NV)array of vertex coordinates
INTEGERIVCOLR(NV)array of indirect vertex colours
REALVCOLR(3,NV)array of vertex colours
REALIMPL(∗)implementation defined vertex data

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 Modeling Coordinate points.  The element can optionally specify colour information for each vertex of the primitive. 

This is a SunPHIGS Extension function based on PHIGS+ and is not part of the PHIGS standard. 

C Input Parameters

All of the following data types are predefined in phigs.h. 

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_model
The colour model specifies the colour type for specified vertex colours.

0PINDIRECTColour Index Specified
1PRGBRed, Green, and Blue
2PCIECIE Colour Model
3PHSVHue, Saturation, and Value
4PHLSHue, Lightness, and Saturation

nplThe number of polylines in the set. 

vdataA pointer, to an array of npl Plinevdatalst3 structures, that specifies the list of vertices and optionally associated colour information. Plinevdatalst3 is defined as:

typedef struct {
Pintnumber;/∗ number of vertices ∗/
Plinevdataarr3vertexdata;/∗ line vertex data ∗/
} Plinevdatalst3;

Plinevdataarr3 is defined as:

typedef union {
Ppoint3∗points;/∗ array of points ∗/
Pptco3∗ptcolrs;/∗ array of points with colours ∗/
/∗ implementation dependent data ∗/
}Plinevdataarr3;

Ppoint3 is defined as:

typedef struct {
Pfloatx;/∗ x coordinate ∗/
Pfloaty;/∗ y coordinate ∗/
Pfloatz;/∗ z coordinate ∗/
} Ppoint3;

Pptco3 is defined as follows:

typedef struct {
Ppoint3point;/∗ point coordinates ∗/
Pcovalcolour;/∗ colour ∗/
} Pptco3;

Ppoint3 is defined above.  Pcoval is defined as follows:

typedef union {
Pintindex;/∗ index in workstation colour bundle table ∗/
Pcobundldirect;/∗ direct colour components ∗/
} Pcoval;

When colour_model is PINDIRECT, index is used; otherwise, direct is used. 

Pcobundl is defined as follows:

typedef struct {
Pfloatx;/∗ red, hue, etc ∗/
Pfloaty;/∗ green, saturation, lightness, etc ∗/
Pfloatz;/∗ blue, value, saturation, etc ∗/
} Pcobundl;

FORTRAN Input Parameters

All of the following data types are predefined in phigs77.h. 

VFLAG
The data per vertex flag indicates the information specified with each vertex of the primitive.  The possible values are:

0PVCOORCoordinates Only
1PVCLRCoordinates and Colours

COLMOD
The colour model.  If the data per vertex flag (VFLAG) indicates that a colour per vertex is specified, then COLMOD is set to one of the following:

0PINDIRColour Index Specified
1PRGBRed, Green, and Blue
2PCIECIE Colour Model
3PHSVHue, Saturation, and Value
4PHLSHue, Lightness, and Saturation

NPLThe number of point lists (polylines) in the polyline set. 

PLARR(NPL)
An array of integers containing the end indicies into the COORDS array for each point list in the polyline set. 

NVThe number of points used to define the polyline set. 

COORDS(3,NV)
An array of reals containing the x, y, and z coordinates of the polyline set. 

COORDS(1,v) = x Coordinate
COORDS(2,v) = y Coordinate
COORDS(3,v) = z Coordinate

IVCOLR(NV)
An array of integers containing an index into the workstation colour table for each vertex. This array is unused if VFLAG is set to PVCOOR or if COLMOD is greater than zero. 

VCOLR(3,NV)
An array of reals containing the colours for each vertex. This array is unused VFLAG is set to PVCOOR or COLMOD is equal to zero (PINDIR). 

VCOLR(1,v) = Red, Hue, etc.
VCOLR(2,v) = Green, Saturation, Lightness, etc.
VCOLR(3,v) = Blue, Value, Saturation, etc.

IMPL(∗)
This implementation defined data type is not currently used.

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 ignored during structure traversal. 

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 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,∗)

900Storage overflow has occurred in PHIGS

2004FORTRAN-specific binding error: ignoring function, input parameter size out of range

SEE ALSO

INTRO PHIGS+ (3P+)
INQUIRE EXTENDED POLYLINE FACILITIES (3P+)
POLYLINE 3 (3P)

Sun Release 4.0  —  Last change: 29 July 1989

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