Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ pgetpick(3P) — PHIGS 1.1

Media Vault

Software Library

Restoration Projects

Artifacts Sought

GET PICK(3P)  —  SUNPHIGS LIBRARY

NAME

GET PICK − retrieve the PICK measure from the PHIGS current event report

SYNOPSIS

C Syntax

void
pgetpick ( depth, pick )
Pintdepth;depth of pick path to return
Ppick∗pick;OUT pick

FORTRAN Syntax

SUBROUTINE pgtpk ( IPPD, STAT, PPD, PP )
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 GET PICK to retrieve the measure (logical input value) of the PICK device from the current event report in the PHIGS state list. 

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. 

C Input Parameter

depthThe maximum number of path elements to return.  This may be more or less than the actual path depth in the current event report. 

C Output Parameters

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;

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

typedef enum {
PP_OK,
PP_NOPICK
} Ppickstatus;

The 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;

The 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 it is not affected by the maximum depth to return parameter.  Thus, the number of elements returned in pick_path may be less than depth. 

The 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;

The 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 Parameter

IPPDThe maximum number of path elements to return.  This may be more or less than the actual path depth in the current event report. 

FORTRAN Output Parameters

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 of the current event report, 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

The GET PICK function retrieves the measure of a PICK device from the current event report in the PHIGS state list.  If NO PICK is returned as the status, pick path is undefined.  If OK is returned as the status, pick path contains the portion of the measure’s pick path requested, as specified by maximum depth to return.  The path will be in either top-first or bottom-first order depending upon the value specified when the device was initialized. 

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 PICK event, GET PICK is used to retrieve the measure from the current event report. 

See INITIALIZE PICK 3 for a description of the available PICK 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 PICK (3P)
INITIALIZE PICK 3 (3P)
AWAIT EVENT (3P)

Sun Release 4.0  —  Last change: 1 August 1989

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