GET LOCATOR(3P) — Kubota Pacfic Computer Inc. (29 February 1991)
NAME
GET LOCATOR − retrieve the 2D components of the LOCATOR event in the PHIGS current event report
SYNOPSIS
C Syntax
void
pget_loc ( view_ind, loc_pos )
Pint∗view_ind;OUT view index
Ppoint∗loc_pos;OUT locator position
Required PHIGS Operating States
(PHOP, WSOP, ∗, ∗)
DESCRIPTION
Purpose
GET LOCATOR retrieves the current event report from the PHIGS state list when the event report contains a Locator event. A LOCATOR event consists of a position and a view index. The position is the World Coordinate (WC) point corresponding to the position on the workstation selected by the operator. The view index is the index of the view representation used to transform the selected position from Normalized Projection Coordinates (NPC) to WC.
C Output Parameters
view_ind
PHIGS sets the variable pointed to by view_ind to the index of the view representation used to transform the NPC locator position to a WC position.
loc_pos
PHIGS sets the variable pointed to by loc_pos to the 2D world coordinate locator position corresponding to the device coordinate position selected by the operator. Ppoint is defined in phigs.h as follows:
typedef struct {
Pfloatx;/∗ x coordinate ∗/
Pfloaty;/∗ y coordinate ∗/
} Ppoint;
Execution
When an input device in 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 is a Locator event, GET LOCATOR or GET LOCATOR 3 is used to retrieve the contents of the event from the current event report.
The LOCATOR position is computed by mapping the DC workstation position selected by the operator to a WC point. The workstation transform is used to transform the DC position to a NPC position prior to transforming it to WC. See INITIALIZE LOCATOR and SET VIEW TRANSFORMATION INPUT PRIORITY for a description of how PHIGS determines the view representation to use to map the NPC position to WC.
See INITIALIZE LOCATOR for a description of the available LOCATOR 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 LOCATOR (3P)
AWAIT EVENT (3P)
GET LOCATOR 3 (3P)
SET VIEW TRANSFORMATION INPUT PRIORITY (3P)
September 02, 1992