Syntax
[C/C++:]
void gDrawCylinder(float xp, float yp, float zp, float radius,  ...);
[F90:]
subroutine gDrawCylinder(xp, yp, zp, radius, gHeight, gURot, gVRot, gWRot, gVVec, gAbs, gUComp, gVComp)
real, intent(in) :: xp,yp,zp,radius
real, optional, intent(in) :: gHeight
real, optional, intent(in) :: gURot, gVRot, gWRot
type (GPOINT3), optional, intent(in) :: gVVec
integer, optional, intent(in) :: gAbs
integer, optional, intent(in) :: gUComp, gVComp
Arguments
xp, yp, zp
Origin (bottom, centre) of cylinder
radius
Radius of cylinder
Optional Args
gHeight
Optional cylinder height (default 1.0)
gURot ,gVRot, gWRot
Optional rotations about local axes (default 0.0,0.0,0.0)
gVVec
Optional height vector
gAbs
Optional height vector direction flag
|
= GABSOLUTE, |
Absolute height vector |
|
= GRELATIVE, |
Relative height vector |
gUComp ,gVComp
Optional object complexity (default 10 x 10)
Description
The routine gDrawCylinder() draws a 'solid' cylinder primitive constructed of outward facing facets according to the specified complexity. The cylinder is centred at the origin (
xp,
yp,
zp), with the defined
radius and a default unit height extending in a positive direction along the local V (vertical) axes.
An alternative height/orientation can be specified using either a height dimension (in
gHeight) and up to three local axes rotations (
gURot,
gVRot,
gWRot ) or an absolute/relative vector,
gVVec from the base of the object. In the latter case a local rotation about the object's vertical axis can also be added in
gVRot.
The arguments
gUComp and
gVComp define the object's complexity in its U (circumference) and V (height) axes respectively. These values determine the number of divisions (facets) in either direction and in the case of the circumferential value, the objects smoothness. Setting
gUComp to 6 will define a 6 sided cylinder for example.
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
gDrawCylinder UsagegDrawFacet