Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ polyline_3(3P) — PHIGS 1.1

Media Vault

Software Library

Restoration Projects

Artifacts Sought

POLYLINE 3(3P)  —  SUNPHIGS LIBRARY

NAME

POLYLINE 3 − create structure element specifying 3D polyline

SYNOPSIS

C Syntax

void
ppolyline3 ( num_points, points )
Pintnum_points;number of points
Ppoint3∗points;array of points

FORTRAN Syntax

SUBROUTINE ppl3 ( N, PXA, PYA, PZA )
INTEGERNnumber of points
REALPXA(N), PYA(N), PZA(N) coordinates of points (MC)

Required PHIGS Operating States

(PHOP, ∗, STOP, ∗)

DESCRIPTION

Purpose

The POLYLINE 3 function places a structure element containing the full specification of a 3D polyline into the currently open structure, according to the current edit mode.  A 3D polyline primitive is a set of connected straight lines in 3D space defined by a series of Modelling Coordinate points. A polyline may be closed or intersect itself. 

If the current edit mode is INSERT, the POLYLINE 3 element is inserted into the open structure after the element pointed to by the element pointer. If the current edit mode is REPLACE, the POLYLINE 3 element replaces the element pointed to by the element pointer.  In either case, the element pointer is updated to point to the new POLYLINE 3 element. 

C Input Parameters

num_points
Specifies the number of points to be used to define the polyline. You must specify at least two points; a polyline structure element that has fewer than two points will be ignored when the structure is traversed.

pointsA pointer to a list num_points long of Ppoint3 structures containing the x, y, and z coordinates for each point.  The Ppoint3 structure is defined in phigs.h as follows:

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

FORTRAN Input Parameters

NThe number of points used to define the polyline.  You must specify at least two points; a polyline structure element that has fewer than two points will be ignored when the structure is traversed. 

PXAAn array of N real values containing the x coordinates of the polyline. 

PYAAn array of N real values containing the y coordinates of the polyline. 

PZAAn array of N real values containing the z coordinates of the polyline. 

Execution

When the structure is traversed, the polyline element draws straight lines between the points specified, beginning with the first point and ending with the last. The current values of the attributes listed below will be applied to the polyline when it is drawn. 

The coordinates used to specify the polyline primitive in this subroutine are Modelling Coordinates. These coordinates may be any coordinate units that are convenient to the application. At traversal, these coordinate values are transformed by the current Local and Global Modelling Transformations, the View Representation selected by the ‘current view index’, and the Workstation Transformation current on the workstation to which the structure is posted. 

Attributes Applied

The attributes listed below are used to display the POLYLINE 3 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, ∗)

SEE ALSO

INQUIRE POLYLINE FACILITIES (3P)
POLYLINE (3P)
POLYLINE SET 3 WITH DATA (3P+)

Sun Release 4.0  —  Last change: 1 August 1989

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