Syntax
[C/C++:]
void gDrawCube(float xp, float yp, float zp, float dim, ...);
[F90:]
subroutine gDrawCube(xp, yp, zp, dim ,gURot, gVRot, gWRot)
real, intent(in) :: xp,yp,zp,dim
real,optional, intent(in) :: gURot, gVRot, gWRot
integer, optional, intent(in) :: gUComp, gVComp, gWComp
Arguments
xp, yp, zp
Origin (bottom, left, back corner) of cube
dim
Cube dimension
Optional Args
gURot ,gVRot, gWRot
Optional rotations about local axes (default 0.0,0.0,0.0)
gUComp ,gVComp, gWComp
Optional object complexity (default 1 x 1 x 1)
Description
The routine gDrawCube() draws a 'solid' cube primitive of the specified dimension by generating six equally sized facets for each face. The box is positioned at the specified origin (
xp,
yp,
zp) extending in a positive direction along each of its three local axes.
The arguments
gURot,
gVRot,
gWRot specify optional rotations about the object's local axes system.
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 cube 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
gDrawCube UsagegDrawFacet