GINO Graphics Suite - GINO v9.0  

gDrawBox

Syntax

[C/C++:]
void gDrawBox(float xp, float yp, float zp, ...);
[F90:]
subroutine gDrawBox(xp, yp, zp, gUDim, gVDim, gWDim, gURot, gVRot, gWRot, gUVec, gVVec, gWVec, gAbs, gUComp, gVComp, gWComp)

real, intent(in) :: xp,yp,zp

real, optional, intent(in) :: gUDim, gVDim, gWDim
real, optional, intent(in) :: gURot, gVRot, gWRot
type (GPOINT3), optional, intent(in) :: gUVec, gVVec, gWVec
integer, optional, intent(in) :: gAbs
integer, optional, intent(in) :: gUComp, gVComp, gWComp

Arguments

xp, yp, zp
Origin (bottom, left, back corner) of box

Optional Args

gUDim, gVDim, gWDim
Optional box dimensions (default 1.0,1.0,1.0)

gURot ,gVRot, gWRot
Optional rotations about local axes (default 0.0,0.0,0.0)

gUVec, gVVec, gWVec
Optional edge vectors

gAbs
Optional edge vector direction flag

= GABSOLUTE, Absolute edge vectors
= GRELATIVE, Relative edge vectors

gUComp ,gVComp, gWComp
Optional object complexity (default 1 x 1 x 1)

Description

The routine gDrawBox() draws a 'solid' box primitive of the specified dimensions by generating outward facing facets for each face. The box is positioned at the specified origin (xp, yp, zp), with a default unit dimension extending in a positive direction along each of its three local axes.

An alternative dimension/orientation can be specified using either a) up to three dimension values (gUDim, gVDim, gWDim) and up to three local axes rotations (gURot, gVRot, gWRot) or b) as three mutually perpendicular edge vectors (gUVec, gVVec, gWVec) which may be absolute or relative to the object's origin.

By default, each face is constructed from a single facet, but using the optional arguments gUComp, gVComp and/or gWComp the two faces in each of the three local axes may be sub-divided into multiple facets for greater accuracy of lighting and texturing. Thus if gUComp is set to 2, then the two faces along the X/U axes of the box will be divided into 2x2 (4) facets.

The facets are drawn in the current facet colour/material according to the current lighting/shading environment and subject to the current modelling/viewing transformations.

See Also

gDrawBox Usage
gDrawFacet