void pxpick_loc(
Pint ws_id, /* workstation identifier */ Pint pick_dev_num, /* pick device number */ Pint depth, /* pick path depth */ Ppoint *point, /* located point in DC */ Pin_status *status, /* returned status */ Ppick_path *pick_path, /* returned pick path */ Pint *view_index, /* returned view index */ Ppoint3 *point_wc /* returned picked point in WC */
)
typedef struct {
Pfloat x,y; /* coordinates */
} Ppoint;
typedef struct {
Pfloat x,y,z; /* coordinates */
} Ppoint3;
typedef enum {
PIN_STATUS_NONE,
PIN_STATUS_OK,
PIN_STATUS_NO_IN
} Pin_status;
typedef struct {
Pint depth;
Ppick_path_elem *path_list;
} Ppick_path;
typedef struct {
Pint struct_id;
Pint pick_id;
Pint elem_pos;
} Ppick_path_elem;
The returned point is the intersection between the picked object and the picking vector. This point is returned in WC using the standard locator routines. This means that view input priorities must be correctly set to get the point in the good view.
point.y = window.height - ev.xbutton.y ;
where window.height is the height in pixels of the X window and ev.xbutton.y is the Y position acquired with the event.
Sample pick, see psample_pick
Set pick filter, see pset_pick_filter
Sample locator, see psample_loc
Set view input priority, see pset_view_tran_in_pri
Pick without interaction (ext), see pxpick
Locator without interaction (ext), see pxlocator3