Museum

Home

Lab Overview

Retrotechnology Articles

⇒ Online Manual

Media Vault

Software Library

Restoration Projects

Artifacts Sought

SAMPLE STROKE 3(3P)  —  Kubota Pacfic Computer Inc. (29 February 1991)

NAME

SAMPLE STROKE 3 − sample the current measure of a stroke device

SYNOPSIS

C Syntax

void
psample_stroke3 ( ws, dev, view_ind, stroke )
Pintws;workstation identifier
Pintdev;stroke device number
Pint∗view_ind;OUT view index
Ppoint_list3∗stroke;OUT stroke data

Required PHIGS Operating States

(PHOP, WSOP, ∗, ∗)

DESCRIPTION

Purpose

Use SAMPLE STROKE 3 to sample the current measure of the specified stroke device without waiting for input from the operator. The device must be in SAMPLE mode.  See SET STROKE MODE and INITIALIZE STROKE 3 for more information. 

C Input Parameters

wsWorkstation identifier. An integer specifying the workstation with which the specified stroke device is associated. 

devThe device number of the stroke device to be sampled.  See the Available Devices section of INITIALIZE STROKE 3 for a description of the available devices. 

C Output Parameters

view_ind
The view index used to transform the Device Coordinate (DC) positions to World Coordinate (WC) points. 

strokePpoint_list3 is defined in phigs.h as follows:

typedef struct {
Pintnum_points;
Ppoint3∗points;
} Ppoint_list3;

num_points is the number of points in points. 

points is the array of Ppoint3 structures specifying the points in WC.  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.  This buffer size is set when the device is initialized.  Ppoint3 is defined in phigs.h as follows:

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

Execution

SAMPLE STROKE 3 samples the specified stroke device. The device must be in SAMPLE mode.  See SET STROKE MODE and INITIALIZE STROKE 3 for more information. 

When a device is set to SAMPLE mode, a measure process is created for the device and the device is activated. When SAMPLE STROKE 3 is called, the current value of the measure process for the specified device is retrieved without waiting for further input from the operator. 

A STROKE device measure consists of a list of 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 DC to WC.  See INITIALIZE STROKE 3 and SET VIEW TRANSFORMATION INPUT PRIORITY for a description of how this view representation is determined.  The workstation transformation is used to map the DC position to a Normalized Projection Coordinate (NPC) position. 

Note: The 2D and 3D stroke measure processes are the same except that the 2D process discards the z coordinate. The 2D version of this function, SAMPLE STROKE, can be used if the value of the z coordinate is not needed. 

ERRORS

003Ignoring function, function requires state (PHOP, WSOP, ∗, ∗)

054Ignoring function, the specified workstation is not open

061Ignoring function, specified workstation is neither of category INPUT nor of category OUTIN

250Ignoring function, the specified device is not available on the specified workstation

252Ignoring function, the function requires the input device to be in SAMPLE mode

SEE ALSO

INITIALIZE STROKE 3 (3P)
SET STROKE MODE (3P)
REQUEST STROKE 3 (3P)
GET STROKE 3 (3P)
INQUIRE STROKE DEVICE STATE 3 (3P)
SET VIEW TRANSFORMATION INPUT PRIORITY (3P)
SAMPLE STROKE (3P)

September 02, 1992

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