[ Previous | Next | Contents | Glossary | Home | Search ]
The graPHIGS Programming Interface : Subroutine Reference

GPSMXP - Sample Extended Pick

GPSMXP (wsid, device, maxdepth, view, point, modelling, depth, pickpath)

Purpose

Use GPXMSP to immediately retrieve the current measure of the specified pick device. This subroutine can be used only for a pick device which provides the extended pick information. For a pick device which does not return the extended information, the Sample Pick (GPSMPK) subroutine should be used. The Inquire Pick Measure Type (GPQPKT) subroutine can be used to determine if the pick device provides the extended pick information.

The pick path information is returned in the order specified in the Initialize Pick (GPINPK) subroutine, that is, 1=TOP_FIRST or 2=BOTTOM_FIRST If GPINPK has not been called, the default value is 1=TOP_FIRST

Parameters

wsid -- specified by user, fullword integer

Workstation identifier.

device -- specified by user, fullword integer

Pick device number (>=1)

maxdepth -- specified by user, fullword integer

Length of pick path array provided by the application in which the graPHIGS API returns the pick information (>=0)

This value is specified as the size of the pick path array in terms of pick path entries.

view -- returned by the graPHIGS API, fullword integer

Index of the view which was used to render the instance of the primitive that was picked.

point -- returned by the graPHIGS API, 3 short floating-point numbers

Position of the center of the pick aperture in NPC when the pick was detected. For the typical physical input device that is used to drive the logical pick device (for example, tablet), only thex and y values are meaningful. The z value will always contain a constant (0)

modelling -- returned by the graPHIGS API, 16 short floating-point numbers

Composite modelling transformation that was used to transform the instance of the primitive that was picked.

depth -- returned by the graPHIGS API, fullword integer

Depth of the pick path returned in the pickpath parameter.

pickpath -- returned by the graPHIGS API, array of fullword integers

Pick path for picked primitive. List of pick path quadruples. Each quadraple represents a structure identifier, pick identifier, label and element number of the picked primitive or an execute type structure element of the pickpath Pick path data is returned in the order (1=TOP_FIRST, 2=BOTTOM_FIRST ) that was last set through an Initialize Pick (GPINPK) subroutine.

If the actual pick information is longer than the pick path array provided by the application, the overage is truncated. Pick path data is returned in the pickpath parameter in the following order: Entry 1, Entry 2, ...Entry N.

          ----------------------------------------------------------
 Entry 1  |  Structure ID 1  |    Pick ID 1     |     Label #1     |    Element #1    |
          |                  |                  |                  |                  |
 Entry 2  |  Structure ID 2  |    Pick ID 2     |     Label #2     |    Element #2    |
          |                  |                  |                  |                  |
   .      |        .         |        .         |        .         |        .         |
   .      |        .         |        .         |        .         |        .         |
   .      |        .         |        .         |        .         |        .         |
          |                  |                  |                  |                  |
 Entry N  |  Structure ID N  |    Pick ID N     |     Label #N     |    Element #N    |
          ----------------------------------------------------------
 

Error Codes

25
SPECIFIED WORKSTATION DOES NOT EXIST
164
PICK DEVICE DOES NOT PROVIDE EXTENDED INFORMATION
505
LENGTH OF RETURN ARRAY < ZERO

Related Subroutines

GPADCN
Add Class Name to Set
GPPKF
Set Pick Filter
GPPKID
Set Pick Identifier
GPPKMO
Set Pick Mode
GPQLI
Inquire List of Logical Input Devices
GPQPKT
Inquire Pick Measure Type
GPRCN
Remove Class Name from Set

RCP code

201335565 (X'0C00230D')


[ Previous | Next | Contents | Glossary | Home | Search ]