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

bbox2 Subroutine

Purpose

Specifies the bounding box and minimum pixel radius.

Libraries

Graphics Library

C (libgl.a)

FORTRAN (libfgl.a)

C Syntax

void bbox2
(Screencoord xmin, Screencoord ymin,
Coord x1, Coord y1,
Coord x2, Coord y2)
void bbox2i
(Screencoord xmin, Screencoord ymin,
Icoord x1, Icoord y1,
Icoord x2, Icoord y2)
void bbox2s
(Screencoord xmin, Screencoord ymin,
Scoord x1, Scoord y1,
Scoord x2, Scoord y2)

FORTRAN Syntax

SUBROUTINE BBOX2(xmin, ymin, x1, y1, x2, y2)
INTEGER*4 xmin, ymin
REAL x1, y1, x2, y2
SUBROUTINE BBOX2I(xmin, ymin, x1, y1, x2, y2)
INTEGER*4 xmin, ymin, x1, y1, x2, y2
SUBROUTINE BBOX2S(xmin, ymin, x1, y1, x2, y2)
INTEGER*2 xmin, ymin, x1, y1, x2, y2
Note: For FORTRAN users, this subroutine accepts long integer parameters (INTEGER*4) when invoked from a FORTRAN program, although it accepts short integers when invoked from a C program. The C and FORTRAN syntax shown here reflect this difference. Also, the FORTRAN INTEGER*2 version, the BBOX2S subroutine, should not be called with integer constant parameters. For example, 2 is an integer constant; JJ is an integer variable. The XL FORTRAN compiler, invoked by the xlf command, stores all integer constants as long integers (INTEGER*4), not as short integers (INTEGER*2). Invoking the short version of this subroutine with an integer constant will result in unexpected behavior.

Description

The bbox2 subroutine controls the execution of routines in a GL object by performing the graphical functions known as culling and pruning.

The bbox2 subroutine calculates the bounding box, transforms it to screen coordinates, and compares it to the viewport. If the bounding box is completely outside the viewport, the routines between the call to the bbox2 subroutine and the end of the object are ignored.

If the bounding box is within the viewport, the system compares it with the minimum feature size. If the box is too small in both the x and y dimensions, the rest of the routines in the object are ignored.

Overuse of the bbox2 subroutine can impair performance, so it is best reserved for complicated object definitions.

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

Parameters

xmin Specifies the width, in pixels, of the smallest displayable feature.
ymin Specifies the height, in pixels, of the smallest displayable feature.
x1 Specifies the x coordinate of a corner of the bounding box.
y1 Specifies the y coordinate of a corner of the bounding box.
x2 Specifies the x coordinate of a corner of the bounding box. This corner must be diagonally opposite the corner (x1, y1).
y2 Specifies the y coordinate of a corner of the bounding box. This corner must be diagonally opposite the corner (x1, y1).

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

Creating an object with the makeobj subroutine.

AIX Graphics Library Overview, Creating Objects (Display Lists), and Using Viewports and Screenmasks.


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