GET STROKE 3(3P) — SUNPHIGS LIBRARY
NAME
GET STROKE 3 − retrieve the STROKE measure from the PHIGS current event report
SYNOPSIS
C Syntax
void
pgetstroke3 ( stroke )
Pstroke3∗stroke;OUT stroke data
FORTRAN Syntax
SUBROUTINE pgtsk3 ( N, VIEWI, NP, PXA, PYA, PZA )
INTEGERNmaximum number of points
INTEGERVIEWIOUT view index
INTEGERNPOUT number of points
REALPXA(N), PYA(N), PZA(N) OUT points in stroke in world coordinates
Required PHIGS Operating States
(PHOP, WSOP, ∗, ∗)
DESCRIPTION
Purpose
Use GET STROKE 3 to retrieve the measure (logical input value) of the STROKE device from the current event report in the PHIGS state list.
A STROKE device measure consists of a list of World Coordinate (WC) points and a view index. The points correspond to positions on the workstation selected by the operator. The view index is the index of the view used to transform these positions from Device Coordinates (DC) to World Coordinates.
C Output Parameters
strokeA pointer to a Pstroke3 structure in which to store the STROKE measure. Pstroke3 is defined in phigs.h as follows:
typedef struct {
Pintview_index;
Pintn_points;
Ppoint3∗points;
} Pstroke3;
view index is the view index used to transform the DC positions to WC points.
n_points is the number of points in points.
points is the array of Ppoint3 structures specifying the points in World Coordinates. This array must be allocated by the calling program and the array pointer assigned to this field before calling this function. The array must be at least as large as the buffer of the STROKE device that generated the event. This buffer size is set when the device is initialized. Ppoint is defined in phigs.h as follows:
typedef struct {
Pfloatx;/∗ x coordinate ∗/
Pfloaty;/∗ y coordinate ∗/
Pfloatz;/∗ z coordinate ∗/
} Ppoint;
FORTRAN Input Parameter
NPThe maximum number of points to store in PXA, PYA and PZA.
FORTRAN Output Parameters
VIEWI
The view index used to transform the DC positions to WC points.
NPThe number of points in the measure.
PXA, PYA, PZA
The arrays in which to store the points in World Coordinates. The arrays must be at least as large as NP.
Execution
GET STROKE 3 retrieves the STROKE measure from the current event report in the PHIGS state list.
When an input device that is set to EVENT mode is triggered by the operator, an event report is added to the input event queue. The event report contains the identity and current measure of the device. AWAIT EVENT moves the measure of the oldest event in the input queue to the current event report in the PHIGS state list. If the event was a STROKE event, GET STROKE 3 is used to retrieve the measure from the current event report.
See INITIALIZE STROKE 3 for a description of the available STROKE devices and how their measure values are determined.
ERRORS
003Ignoring function, function requires state (PHOP, WSOP, ∗, ∗)
259Ignoring function, the input device class of the current input report does not match the class being requested
SEE ALSO
INITIALIZE STROKE 3 (3P)
AWAIT EVENT (3P)
GET STROKE (3P)
Sun Release 4.0 — Last change: 12 July 1989