Jump to content United States-English
HP.com Home Products and Services Support and Drivers Solutions How to Buy
» Contact HP
More options
HP.com home
Starbase Display List Programmer's Manual: HP 9000 Series 700 Computers > Chapter 9 Picking

The Pick Path

» 

Technical documentation

» Feedback
Content starts here

 » Table of Contents

 » Glossary

 » Index

To uniquely identify the picked element in a segment network, it is necessary to return a collection of information known as a pick path. Each of the n items of the pick path contains three pieces of information describing where in a particular segment the picked element occurred:

  • The segment name,

  • The closest display list label preceding the picked element in the segment, and

  • The offset from the display list label to the picked element in the segment.

Each three-item entry, or triple, in the pick path represents one level in the segment network. There are two categories of triples in a pick path:

  • All triples of the pick path except the last one indicate which "calling" element[24] in the segment was traversed to ultimately get to the picked element. That is, sequentially following the segment numbers in a pick path tells you which segments called which other segments on its way to the picked primitive — it traces a path to the picked element.

  • The last triple in the pick path specifies the element containing the picked primitive.

The pick_from_segment call initiates the picking operation for a specified segment network. The syntax is:

  • pick_from_segment(〈fildes〉, 〈segno〉, 〈found〉);

where:

  • segno〉 is the number of the segment to be traversed during the pick traversal.

  • found〉 is a boolean value that is returned from pick_from_segment. If the return value is FALSE, no primitives were hit; if TRUE, a primitive was hit.

The specified segment network is traversed searching for any pickable primitives that intersect the pick aperture. A hit occurs when any pickable primitive intersects the pick aperture.

When a hit occurs, the entire pick path can be obtained from inq_pick_path and inq_pick_path_depth. Their syntax:

  • inq_pick_path(〈fildes〉, 〈path〉);

    • and

  • inq_pick_path_depth(〈fildes〉, 〈depth〉);

where:

  • path〉 is an n×3 integer array, each of whose rows contains one triple describing part of the pathway from the traversed segment (specified in pick_from_segment) to the primitive element that was hit.

  • depth〉 is an integer whose return value specifies how many levels of hierarchy were traversed to locate the pick path; i.e., how many rows in the 〈path〉 array.

The path array's three columns are defined as follows:

Column 1:

The number of the the segment that that part of the pick path traverses.

Column 2:

The number of the closest display list label occurring prior to:

  • the "calling element" (for all triples except the last), or

  • the element that drew the picked primitive (for the last triple).

If the segment had no prior labels, the value zero is used, indicating the null element at the beginning of the segment.

Column 3:

The offset from the label specified in Column 2 to the element containing the picked primitive. This value is always positive.



[24] A "calling" element may be any one of call_segment, cond_call_segment, execute_segment, cond_execute_segment.

Printable version
Privacy statement Using this site means you accept its terms Feedback to webmaster
© 1995 Hewlett-Packard Development Company, L.P.