void pinit_pick3 (ws_id, pick_dev, init_status, init_pick, pet, echo_volume, pick_data_rec, order)
Pint ws_id, Pint pick_dev, Pin_status init_status, const Ppick_path *init_pick, Pint pet, const Plimit3 *echo_volume, const Ppick_data3 *pick_data_rec, Ppath_order order
typedef enum {
PIN_STATUS_NONE,
PIN_STATUS_OK,
PIN_STATUS_NO_IN
} Pin_status;
typedef struct {
Pint depth; /* pick path depth */
Ppick_path_elem *path_list; /* pick path list */
} Ppick_path;
typedef struct {
Pfloat x_min; /* minimum x */
Pfloat x_max; /* maximum x */
Pfloat y_min; /* minimum y */
Pfloat y_max; /* maximum y */
Pfloat z_min; /* minimum z */
Pfloat z_max; /* maximum z */
} Plimit3;
typedef struct {
union Ppick3_pets {
struct Ppick3_pet_r1 {
int impl_dep;
} pet_r1;
int impl_dep;
} pets;
} Ppick_data3;
typedef enum {
PORDER_TOP_FIRST,
PORDER_BOTTOM_FIRST
} Ppath_order;
typedef struct {
Pint struct_id; /* structure identifier */
Pint pick_id; /* pick identifier */
Pint elem_pos; /* element position */
} Ppick_path_elem;
typedef enum {
PPR_OFF,
PPR_ON
} Ppr_switch;
The pick aperture is centred on the graphics cursor and follows its movement. When the pick input device (the mouse for example) is validated, the primitive (or part of it) contained in the pick aperture is selected.
Device number 1 is available and is associated with the mouse.
Echo type number 1 displays an X cursor.
Initial pick path and data record parameters are unused.
Example:
/* Sample program for initialization of a pick device */
#include <phigs.h>
main()
{
Pint ws_id,pick_dev,pet,error,update_state;
Pin_status status;
Ppick_path init_path;
Ppick_data pick_data_rec;
Ppath_order order;
Plimit3 echo_volume,req_view,cur_win,req_win;
/* Open PHIGS session */
popen_phigs (PDEF_ERR_FILE,PDEF_MEM_SIZE);
/* Open workstation */
ws_id = 1;
popen_ws (ws_id,"GPHIGS.OUT",8887);
/* Get back the DC of the workstation */
pinq_ws_tran3(ws_id,&error,&update_state,&req_win,
&cur_win,&req_view,&echo_volume);
/* Initialize pick device number 1 with echo type number 1 */
pick_dev = 1;
pet=1;
init_path.depth = 0;
order = PORDER_TOP_FIRST;
status = PIN_STATUS_NONE;
pinit_pick3(ws_id,pick_dev,status,&init_path,
pet,&echo_volume,&pick_data_rec,order);
/* Close workstation */
pclose_ws(ws_id);
/* Close PHIGS session */
pclose_phigs();
}