[ Next Article | Previous Article | Book Contents | Library Home | Legal | Search ]
OpenGL 1.2 for AIX: Reference Manual

gluPartialDisk Subroutine

Purpose

Draws an arc of a disk.

Library

OpenGL C bindings library: libGL.a

C Syntax

void gluPartialDisk(GLUquadricObj *quad, 
   GLdouble inner, 
   GLdouble outer, 
   GLint slices, 
   GLint loops, 
   GLdouble start, 
   GLdouble sweep)

Description

The gluPartialDisk subroutine renders a partial disk on the z=0 (zero) plane. A partial disk is similar to a full disk, except that only a subset of the disk consisting of start through start plus sweep is included. For the purposes of this subroutine, 0 degrees is along the +y axis, 90 degrees is along the +x axis, 180 degrees is along the -y axis, and 270 degrees is along the -x axis.

The partial disk has a radius defined by the outer parameter and contains a concentric circular hole with a radius defined by the inner parameter. If the value of InnerRadius is 0, no hole is generated. The partial disk is subdivided around the z axis into slices and rings (as specified by the slices and loops parameters, respectively).

With regard to orientation, the +z side of the partial disk is considered to be outside. (See the gluQuadricOrientation subroutine for details on specifying quadrics orientation.) This means that if the orientation is set to GLU_OUTSIDE, any normals generated point along the +z axis. Otherwise, they point along the -z axis.

If texturing is turned on with the gluQuadricTexture subroutine, texture coordinates are generated linearly such that the value at (r, 0, 0) (where r=outer) is (1, 0.5).

Under the same definition, the following values also apply:

Coordinates Value
(0, r, 0) (0.5, 1)
(-r, 0, 0) (0, 0.5)
(0, -r, 0) (0.5, 0)

Parameters

quad Specifies a quadrics object created with the gluNewQuadric subroutine.
inner Specifies the inner radius of the partial disk. (This value can be 0.)
outer Specifies the outer radius of the partial disk.
slices Specifies the number of desired subdivisions around the z axis.
loops Specifies the number of concentric rings around the origin into which the partial disk is subdivided.
start Specifies the start angle (in degrees) of the disk portion.
sweep Specifies the sweep angle (in degrees) of the disk portion.

Files

/usr/include/GL/gl.h Contains C language constraints, variable type definitions, and ANSI function prototypes for OpenGL.

Related Information

The gluCylinder subroutine, gluDisk subroutine, gluNewQuadric subroutine, gluQuadricOrientation subroutine, gluQuadricTexture subroutine, gluSphere subroutine.

OpenGL Overview.


[ Next Article | Previous Article | Book Contents | Library Home | Legal | Search ]