Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ pe_hit_test(3g) — PHIGS 5.1

Media Vault

Software Library

Restoration Projects

Artifacts Sought

pe_hit_test(3g)  —  Subroutines

Name

pe_hit_test − Performs a pick operation on an output workstation when the application is using the X11[R] event queue. 

Operating States: PHOP, WSOP, ∗, ∗
Digital PHIGS extension function

Syntax

 

void pe_hit_test (
  Pint             wsid,       /∗ (I) Workstation identifier ∗/
  const Ppoint    ∗pick_pos,   /∗ (I) Pick position, in device
                                      coordinates ∗/
  Pfloat           distance,   /∗ (I) Pick aperture, in device
                                      coordinates ∗/
  Ppath_order      order,      /∗ (I) Pick path order ∗/
  const Pfilter   ∗filter,     /∗ (I) Pick filter ∗/
  Pin_status      ∗status,     /∗ (O) Pick status ∗/
  Ppick_path      ∗path        /∗ (O) Pick path ∗/
)

Data Structures

typedef struct {
    Pfloat     x;    /∗ x coordinate ∗/
    Pfloat     y;    /∗ y coordinate ∗/
} Ppoint;
typedef enum {
    PORDER_TOP_FIRST,       /∗ top first ∗/
    PORDER_BOTTOM_FIRST     /∗ bottom first ∗/
} Ppath_order;
typedef struct {
    Pint_list    incl_set;    /∗ inclusion set ∗/
    Pint_list    excl_set;    /∗ exclusion set ∗/
} Pfilter;
    typedef struct {
        Pint      num_ints;   /∗ number of Pints in the list ∗/
        Pint     ∗ints;       /∗ list of integers ∗/
    } Pint_list;
typedef enum {
    PIN_STATUS_NONE,    /∗ user performed a break action ∗/
    PIN_STATUS_OK,      /∗ user picked a primitive ∗/
    PIN_STATUS_NO_IN    /∗ user triggered the device, but did not make a
                           selection ∗/
} Pin_status;
typedef struct {
    Pint                depth;        /∗ pick path depth ∗/
    Ppick_path_elem    ∗path_list;    /∗ pick path list ∗/
} Ppick_path;
    typedef struct {
        Pint    struct_id;    /∗ structure identifier ∗/
        Pint    pick_id;      /∗ pick identifier ∗/
        Pint    elem_pos;     /∗ element position ∗/
    } Ppick_path_elem;

Description

pe_hit_test performs a pick operation on an output workstation when the application is using the X11[R] event queue (generally with workstation types 2n2 and 2n3, where n is either 3 or 4).  Using this function, the application can get X11 cursor events, transform them from X11 coordinates to device coordinates in Digital PHIGS, and then get a pick path back from Digital PHIGS. 

To transform X11 coordinates to Digital PHIGS device coordinates, you must do the following:

•Convert to floating point numbers. 

•The X11 origin is at the upper-left of the window, while the Digital PHIGS origin is at the lower-left of the window.  To change from X11 points to Digital PHIGS points, use the following equation:

y = y_max - y

See Also

pget_pick
preq_pick
psample_pick

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