Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ psamplepick(3P) — PHIGS 1.1

Media Vault

Software Library

Restoration Projects

Artifacts Sought

SAMPLE PICK(3P)  —  SUNPHIGS LIBRARY

NAME

SAMPLE PICK − sample the current measure of a pick device

SYNOPSIS

C Syntax

void
psamplepick ( ws, dev, depth, pick )
Pintws;workstation identifier
Pintdev;pick device number
Pintdepth;max. depth of returned path
Ppick∗pick;OUT pick data

FORTRAN Syntax

SUBROUTINE psmpk ( WKID, PKDNR, IPPD, STAT, PPD, PP )
INTEGERWKIDworkstation identifier
INTEGERPKDNRpick device number
INTEGERIPPDdepth of pick path to return
INTEGERSTATOUT status (POK, PNPICK)
INTEGERPPDOUT depth of actual pick path
INTEGERPP(3, IPPD)OUT pick path

Required PHIGS Operating States

(PHOP, WSOP, ∗, ∗)

DESCRIPTION

Purpose

Use SAMPLE PICK to sample the current measure of the specified pick device without waiting for the device trigger to fire. The device must be in SAMPLE mode.  See SET PICK MODE and INITIALIZE PICK for more information. 

C Input Parameters

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

devThe device number of the pick device to be sampled.  See the Available Devices section of INITIALIZE PICK for a description of the available devices. 

depthThe maximum number of path elements to return. 

pickA pointer to a Ppick structure in which to store the PICK measure.  Ppick is defined in phigs.h as follows:

typedef struct {
Ppickstatusstatus;/∗ pick status ∗/
Ppickpathpick_path;/∗ pick path ∗/
} Ppick;

status contains the measure’s pick status.  Ppickstatus is defined in phigs.h as:

typedef enum {
PP_OK,
PP_NOPICK
} Ppickstatus;

pick_path contains the measure’s pick path.  This field is undefined if the status returned is PCH_NOPICK.  Ppickpath is defined in phigs.h as:

typedef struct {
Pintdepth;/∗ pick path depth ∗/
Ppickpathel∗pick_path;/∗ pick path list ∗/
} Ppickpath;

depth indicates the number of elements in the measure’s path.  This is the depth value contained in the measure of the current event report, and is not affected by the maximum depth to return parameter.  Thus the number of elements returned in pick_path may be less than depth. 

pick_path is the array of path elements defining the location of the picked primitive in the CSS.  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 of length maximum depth to return.  Ppickpathel is defined in phigs.h as:

typedef struct {
Pintstruct_id;/∗ structure identifier ∗/
Pintpick_id;/∗ pick identifier ∗/
Pintel_num;/∗ element number ∗/
} Ppickpathel;

struct_id, pick_id and el_num are the structure identifier, pick id and element number, respectively, of each element in the path. 

FORTRAN Input Parameters

WKIDThe workstation identifier of the workstation associated with the device. 

CHDNR
The device number of the PICK device.  See the Available Devices section of INITIALIZE PICK for a description of the available devices. 

IPPDThe maximum number of path elements to return. 

STATThe measure’s pick status.  Valid values as defined in phigs77.h are:

•  POK(OK)
•  PNPICK(NO PICK)

PPDThe number of elements in the measure’s path.  This value is undefined if the status returned is PNPICK.  This is the depth value contained in the measure and is not affected by the maximum depth to return parameter, PPD.  Thus the number of elements returned in PP may be less than PPD. 

PPAn array in which to store the measure’s pick path.  The contents of this array are undefined if the status returned is PNPICK.  This is the 2 dimensional array of path elements defining the location of the picked primitive in the CSS.  Each row of the array contains the structure identifier, pick id and element number, respectively, of each element in the path.  The array must be at least of dimension (3,IPPD). 

Execution

SAMPLE PICK samples the specified pick device. The device must be in SAMPLE mode.  See SET PICK MODE and INITIALIZE PICK 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 PICK is called, the current value of the measure process for the specified device is retrieved without waiting for the device’s trigger to fire. 

A PICK device measure consists of a status and a pick path.  Status indicates whether or not a pick by the operator was successfully resolved.  Pick path describes the location of the picked primitive, if any, in the Central Structure Store (CSS).  The pick filter of a PICK device controls which output primitives on the device’s workstation are pickable.  By default no output primitives are pickable.  See SET PICK FILTER for more information on the pick filter. 

ERRORS

054Ignoring function, the specified workstation is not open

060Ignoring function, specified workstation is not 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

SET PICK FILTER (3P)
SET PICK IDENTIFIER (3P)
SET PICK MODE (3P)
INITIALIZE PICK 3 (3P)
REQUEST PICK (3P)
GET PICK (3P)
INQUIRE PICK DEVICE STATE (3P)

Sun Release 4.0  —  Last change: 12 July 1989

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