Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ generalized_drawing_primitive_-4(3P) — PHIGS 1.1

Media Vault

Software Library

Restoration Projects

Artifacts Sought

GENERALIZED DRAWING PRIMITIVE -4(3P)  —  SUNPHIGS LIBRARY

NAME

GENERALIZED DRAWING PRIMITIVE -4 − create 2D GDP circular arc close

SYNOPSIS

C Syntax

void
pgdp ( num_points, points, gdp_id, gdp_data )
Pintnum_points;number of points
Ppoint∗points;array of points
Pintgdp_id;gdp function identifier
Pgdprec∗gdp_data;data record pointer

FORTRAN Syntax

SUBROUTINE pgdp ( N, PXA, PYA, PRIMID, LDR, DATREC )
INTEGERNnumber of points (>= 0)
REALPXA(∗), PYA(∗)coordinates of points (MC)
INTEGERPRIMIDGDP identifier
INTEGERLDRdimension of data record array
CHARACTER∗80DATREC(LDR) data record

Required PHIGS Operating States

(PHOP, ∗, STOP, ∗)

DESCRIPTION

Purpose

GENERALIZED DRAWING PRIMITIVE -4 creates the circular arc close GDP structure element. 

C Input Parameters

num_points
The number of points passed in the points parameter.

pointsA pointer to a list num_points long of Ppoint structures containing x and y values in Modelling Coordinates (MC).  Ppoint is defined in phigs.h as follows:

typedef struct {
Pfloatx;/∗ x coordinate ∗/
Pfloaty;/∗ y coordinate ∗/
} Ppoint;

gdp_id
The function identifier for this generalized drawing primitive is PUGDP_CIRC_ARC_CLOSE, which is defined in phigs.h to be -4. 

gdp_data
A pointer to a Pgdprec union, ugdp4_datarec, containing the information needed to perform the function specified by gdp_id.  Pugdp0004rec is defined in phigs.h as:

typedef struct {
Ppointcenter;/∗ center point ∗/
Pfloatradius;/∗ radius ∗/
Pfloatst_ang;/∗ start angle in radians ∗/
Pfloatend_ang;/∗ end angle in radians ∗/
Pintcls_type;/∗ close type ∗/
} Pugdp0004rec;           /∗ circle arc close ∗/

The center component specifies the center of the circular arc close.  It is a structure containing xand ycoordinates specified in MC.  The radius component specifies the radius of the circular arc close in MC.  The st_ang component specifies the start angle of the circular arc close in radians.  The end_ang component specifies the end angle of the circular arc close in radians.  The start and end angles are specified in a counter-clockwise direction with the MC positive xaxis as the origin.  The cls_type component is either PARC_CLOSE_PIE or PARC_CLOSE_CHORD.  If the close type is pie, the pie sector is defined by the circular arc, the center point, the starting point, and the ending point.  If the close type is chord, the segment is defined by the circular arc and the chord from starting point to the ending point. 

FORTRAN Input Parameters

NNumber of points passed in the PXA and PYA arrays. 

PXAAn array of N real values containing x coordinates in MC. 

PYAAn array of N real values containing y coordinates in MC. 

PRIMID
The function identifier for this generalized drawing primitive is PUGDPCIRCARCCL, which is defined in phigs77.h to be -4. 

LDRThe dimension of DATREC (returned by the PACK DATA RECORD subroutine). 

DATREC
A  GDP data record packed by the PACK DATA RECORD subroutine containing the information needed to perform the function specified by PRIMID. 

The arguments passed to PACK DATA RECORD when PRIMID = PUGDPCIRCARCCL should be as follows:

ILThe number of integers = 1. 

IAContains the arc close type, which is either 0 (PARCCLPIE) or 1 (PARCCLCHORD). 

RLThe number of real values = 5. 

RAContains array of RL real values.  Element 1 is the xcoordinate of the center of the circular arc in MC.  Element 2 is the ycoordinate of the center of the circular arc in MC.  Element 3 is the radius of the circular arc in MC.  Element 4 is the start angle of the circular arc in radians.  Element 5 is the end angle of the circular arc in radians. 

SLThe number of strings = 0. 

Execution

A circular arc close is a planar area defined by a center point, a radius, and a start and end angle.  The Circle Local Coordinate (CLC) system is located at the center point in MC on the z = 0 plane. The horizontal and vertical axes of CLC are parallel to the xand yaxes of the MC.  The current values of all fill area set attributes will be applied to the circular arc close when it is drawn.  The circular arc close is rendered according to the current curve approximation criteria. 

The center point and radius are specified in MC.  The start and end angles are specified in radians in counter-clockwise direction with the CLC positive xaxis as the origin.  At traversal, the circular arc close in MC is 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.  A circular arc close greater than 360 degrees is drawn as a filled circle. 

The array of points passed to this subroutine in addition to the GDP data record is not used by the circular arc close GDP. 

Attributes Applied

The attributes listed below are used to display the GENERALIZED DRAWING PRIMITIVE -4 structure element. 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. 

interior colourinterior colour index ASF
back interior colourback interior colour ASF
interior styleinterior style ASF
back interior styleback interior style ASF
interior style indexinterior style index ASF
back interior style indexback interior style index ASF
interior shading methodinterior shading method ASF
back interior shading methodback interior shading method ASF
interior reflectance equation interior reflectance equation ASF
back interior reflectance equationback interior reflectance equation ASF
area propertiesarea properties ASF
back area propertiesback area properties ASF
interior index
edge colouredge colour index ASF
edge flagedge flag ASF
edgetypeedgetype ASF
edgewidth scale factoredgewidth scale factor ASF
edge index
face distinguishing mode
face culling mode
depth cue index
light source state
name set

ERRORS

005Ignoring function, function requires state (PHOP, ∗, STOP, ∗)

SEE ALSO

GENERALIZED DRAWING PRIMITIVE (3P)
SET CURVE APPROXIMATION CRITERIA (3P+)
See Interior Attributes in Index
See Edge Attributes in Index

Sun Release 4.0  —  Last change: 27 July 1989

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