Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ pick_from_s(3G) — HP-UX ANSI C A.10.11

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

ele_control(3G)

inq_pick_path(3G)

inq_pick_path_depth(3G)

seg_control(3G)

set_pick_depth(3G)

set_pick_filter(3G)

set_pick_mode(3G)

set_pick_sense(3G)

set_pick_window(3G)

set_pick_traversal_control(3G)

set_traversal_depth(3G)

dl_control(3G)

pick_from_segment(3G)

NAME

pick_from_segment, pick_from_segment_on_device − initiate a pick from a segment

SYNOPSIS

C Syntax:

void pick_from_segment ( devdes, segno, found )
int fildes, segno;
int *found;
void pick_from_segment_on_device ( fildes, segno, found, devdes )
int fildes, segno, devdes;
int *found;

FORTRAN77 Syntax:

subroutine pick_from_segment ( devdes, segno, found )
integer*4 fildes, segno, found
subroutine pick_from_segment_on_device ( fildes, segno, found, devdes )
integer*4 fildes, segno, found, devdes

Pascal Syntax:

procedure pick_from_segment ( devdes, segno:integer;
var found:integer );
procedure pick_from_segment_on_device ( fildes, segno:integer;
var found:integer; devdes:integer );

DESCRIPTION

Input Parameters

fildes Integer file descriptor returned by gopen when an I/O path to a display list device was opened. 

segno Name of segment on the display list device (for pick_from_segment_on_device) or the graphics device (for pick_from_segment) from which to start the pick.

devdes The file descriptor returned by gopen when the I/O path to a graphics device was opened. 

Output Parameters

found Set to TRUE (1) if a primitive is found, otherwise is set to FALSE (0). 

Discussion

Pick_from_segment and pick_from_segment_on_device traverse the specified segment network of the specified display list device onto the specified destination device searching for hits on primitives. 

Pick_from_segment can be used with any opened graphics device; it searches the display list resident on the specified device looking for hits.  Pick_from_segment_on_device is used to pick from a segment on a device-independent display list using a separate device, as if the specified segment network actually existed as a display list on the specified graphics device and a pick_from_segment(3G) were executed.

A hit on a primitive occurs when a visible primitive intersects the pick aperture of the destination device (see set_pick_window(3G) and the Starbase function set_pick_depth(3G)). If a hit occurs on one or more primitives, found is set to TRUE (1).  Otherwise, found is set to FALSE (0).  A path to the picked primitive can be inquired using inq_pick_path(3G) on the destination device.

The number of primitives that can potentially be "hit" is equal to the number of primitives falling within the pick aperture.  The pick mode, as defined by set_pick_mode(3G) on the destination device, determines which hit primitive will be accepted. The default behavior is to accept the first primitive found that intersects the pick aperture.

Device coordinate (dc) primitives cannot generate a hit. 

If the specified segno does not exist on the display list device, an error is generated. 

Set_traversal_depth(3G) can be used to limit the traversal depth on the destination device.  The default maximum traversal depth limits traversal processing to 42 segment referencing elements (i.e., call_segment, execute_segment, cond_call_segment or cond_execute_segment). If traversal of one of these elements would exceed the maximum traversal depth, a warning is generated and the element is not traversed.

Segment network traversal can also be limited by pick traversal control elements (see set_pick_traversal_control(3G)), segment control (see seg_control(3G)), individual element control (see ele_control(3G)), and the pick filter (see set_pick_filter(3G) and set_pick_sense(3G)).

Like the display traversal process, the pick traversal process executes elements that may alter the state of Starbase and the graphics display device.  The current position (CP) is undefined after calling pick_from_segment.

ERRORS

1 Graphics device is not initialized for this operation. 

39 Specified segment does not exist. 

40 Fildes is not a display list device. 

1042 Warning: Traversal attempted beyond specified maximum traversal depth. 

HARDWARE DEPENDENCES

The HP 98736 and HP 98705 devices are capable of batched picking, which can increase picking throughput.  This will be enabled automatically if possible.  It can also be enabled through the use of dl_control(3G).

SEE ALSO

ele_control(3G), inq_pick_path(3G), inq_pick_path_depth(3G), seg_control(3G),
set_pick_depth(3G), set_pick_filter(3G), set_pick_mode(3G), set_pick_sense(3G),
set_pick_window(3G), set_pick_traversal_control(3G), set_traversal_depth(3G),
dl_control(3G).

Hewlett-Packard Company  —  HP-UX Release 9.0: August 1992

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