[ Previous | Next | Contents | Glossary | Home | Search ]
GL3.2 for AIX: Graphics Library (GL) Technical Reference

endpick Subroutine

Purpose

Turns off picking mode.

Libraries

Graphics Library

C (libgl.a)

FORTRAN (libfgl.a)

C Syntax

Int32 endpick(Int16 buffer[ ])

FORTRAN Syntax

INTEGER*4 FUNCTION ENDPIC(buffer)
INTEGER*2 buffer(1)

Description

The endpick subroutine turns off picking mode and returns the number of hits.

When the system is in picking mode, and a subroutine draws in the picking region, the contents of the name stack are stored in a buffer, along with the number of names in the stack.

If a drawing primitive overlaps or intrudes upon the picking volume, a hit has occurred. The hit is recorded only if the name stack has been touched since the last hit. Any of the subroutines loadname, pushname, or popname touch the name stack. The first hit after picking begins is always recorded.

A hit is recorded by placing the depth of the name stack into the next vacant slot in the buffer, followed by the entire contents of the name stack. The bottom of the name stack is transferred to the buffer first, followed by the second from the bottom entry of the name stack, and so forth. In other words, from bottom to top is mapped to from left to right.

Note: This subroutine cannot be used to add to a display list.

Parameter

buffer Specifies a buffer in which to write the number of hits.

Return Value

The number of times the name stack was written to the buffer. If the returned function value is negative, then the buffer was too small to contain all the readings from the name stack. The absolute value is the number of stacks actually recorded.

Example

The example C language program pick1.c calls the endpick subroutine to turn off picking mode.

Implementation Specifics

This subroutine is part of GL in the AIXwindows Environment/6000 Version 1, Release 2 with AIXwindows/3D Feature.

Files

/usr/include/gl/gl.h Contains C language constant and variable type definitions for GL.
/usr/include/gl/fgl.h Contains FORTRAN constant and variable type definitions for GL.

Related Information

Turning off selecting mode with the endselect subroutine.

Putting the system in selecting mode with the gselect subroutine.

Initializing the name stack with the initnames subroutine.

Loading the name on top of the name stack with the loadname subroutine.

Putting the system in picking mode with the pick subroutine.

Popping a name off the name stack with the popname subroutine.

Pushing a new name onto the name stack with the pushname subroutine.

AIX Graphics Library Overview, Working with Coordinate Systems, and Picking and Selecting Overview.


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