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

gselect Subroutine

Purpose

Puts the system in selecting mode.

Libraries

Graphics Library

C (libgl.a)

FORTRAN (libfgl.a)

C Syntax

Int32 gselect(Int16 buffer[ ], Int32 numnames)

FORTRAN Syntax

SUBROUTINE GSELEC(buffer, numnames)
INTEGER*4 numnames
INTEGER*2 buffer(numnames)

Description

The gselect subroutine puts the system in selecting mode. In this mode, the system notes when a drawing routine intersects the selecting volume and writes the contents of the name stack to the specified buffer.

If you push a name onto the name stack just before you call each drawing routine, you can record which drawing routines intersected the selecting region. Use the current viewing matrix to define the selecting region.

The gselect and pick subroutines differ only in the manner in which the pick or select volume is specified. The pick subroutine uses a volume (default 10x10 pixels) centered on the current cursor location, while the gselect subroutine uses the unit cube (1x1x1) in modeling coordinates, thus employing the current viewing matrix in determining the selecting volume.

Nothing is drawn to the screen when the system is in selecting mode. Instead, drawing commands are piped to the select mechanism and used to determine the pick or select region hits.

With one exception, all drawing routines cause hits, including clear, points, lines, polygons, arcs, circles, curves, patches, and NURBS. The charstr subroutine does not cause a hit, although cmov and cmov2 do cause hits.

To end selecting mode, call the endselect subroutine.

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

Parameters

buffer Specifies the buffer into which the system is to save the contents of the name stack.
numnames Specifies the maximum number of names to be saved.

Example

The example C language program select1.c uses the gselect subroutine to enter selecting 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 picking mode with the endpick subroutine.

Turning off selecting mode with the endselect 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.

Setting the dimensions of the picking region with the picksize 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, Picking and Selecting Overview, and Working with Coordinate Systems.


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