1 <!DOCTYPE html PUBLIC
"-//W3C//DTD XHTML 1.0 Transitional//EN" "xhtml1-transitional.dtd">
2 <!-- saved from url=(0013)about:internet -->
3 <?xml-stylesheet type=
"text/xsl" href=
"mathml.xsl"?><html xmlns=
"http://www.w3.org/1999/xhtml" xmlns:
pref=
"http://www.w3.org/2002/Math/preference" pref:
renderer=
"mathplayer-dl"><head><meta http-equiv=
"Content-Type" content=
"text/html; charset=UTF-8" /><title>gluCylinder
</title><meta name=
"generator" content=
"DocBook XSL Stylesheets V1.73.2" /></head><body><div class=
"refentry" lang=
"en" xml:
lang=
"en"><a id=
"gluCylinder"></a><div class=
"titlepage"></div><div class=
"refnamediv"><h2>Name
</h2><p>gluCylinder — draw a cylinder
</p></div><div class=
"refsynopsisdiv"><h2>C Specification
</h2><div class=
"funcsynopsis"><table border=
"0" summary=
"Function synopsis" cellspacing=
"0" cellpadding=
"0"><tr><td><code class=
"funcdef">void
<b class=
"fsfunc">gluCylinder
</b>(
</code></td><td>GLUquadric*
</td><td><var class=
"pdparam">quad
</var>,
</td></tr><tr><td> </td><td>GLdouble
</td><td><var class=
"pdparam">base
</var>,
</td></tr><tr><td> </td><td>GLdouble
</td><td><var class=
"pdparam">top
</var>,
</td></tr><tr><td> </td><td>GLdouble
</td><td><var class=
"pdparam">height
</var>,
</td></tr><tr><td> </td><td>GLint
</td><td><var class=
"pdparam">slices
</var>,
</td></tr><tr><td> </td><td>GLint
</td><td><var class=
"pdparam">stacks
</var><code>)
</code>;
</td></tr></table></div></div><div class=
"refsect1" lang=
"en" xml:
lang=
"en"><a id=
"parameters"></a><h2>Parameters
</h2><div class=
"variablelist"><dl><dt><span class=
"term"><em class=
"parameter"><code>quad
</code></em></span></dt><dd><p>
4 Specifies the quadrics object (created with
<a class=
"citerefentry" href=
"gluNewQuadric.xml"><span class=
"citerefentry"><span class=
"refentrytitle">gluNewQuadric
</span></span></a>).
5 </p></dd><dt><span class=
"term"><em class=
"parameter"><code>base
</code></em></span></dt><dd><p>
6 Specifies the radius of the cylinder at
<span class=
"emphasis"><em>z
</em></span> =
0.
7 </p></dd><dt><span class=
"term"><em class=
"parameter"><code>top
</code></em></span></dt><dd><p>
8 Specifies the radius of the cylinder at
<span class=
"emphasis"><em>z
</em></span> =
<em class=
"parameter"><code>height
</code></em>.
9 </p></dd><dt><span class=
"term"><em class=
"parameter"><code>height
</code></em></span></dt><dd><p>
10 Specifies the height of the cylinder.
11 </p></dd><dt><span class=
"term"><em class=
"parameter"><code>slices
</code></em></span></dt><dd><p>
12 Specifies the number of subdivisions around the
<span class=
"emphasis"><em>z
</em></span> axis.
13 </p></dd><dt><span class=
"term"><em class=
"parameter"><code>stacks
</code></em></span></dt><dd><p>
14 Specifies the number of subdivisions along the
<span class=
"emphasis"><em>z
</em></span> axis.
15 </p></dd></dl></div></div><div class=
"refsect1" lang=
"en" xml:
lang=
"en"><a id=
"description"></a><h2>Description
</h2><p>
16 <code class=
"function">gluCylinder
</code> draws a cylinder oriented along the
<span class=
"emphasis"><em>z
</em></span> axis. The base of the cylinder
17 is placed at
<span class=
"emphasis"><em>z
</em></span> =
0 and the top at
18 <mml:math xmlns:
mml=
"http://www.w3.org/1998/Math/MathML" overflow=
"scroll">
21 <mml:mi mathvariant=
"italic">z
</mml:mi>
23 <mml:mi mathvariant=
"italic">height
</mml:mi>
27 a cylinder is subdivided around the
<span class=
"emphasis"><em>z
</em></span> axis into slices and along the
28 <span class=
"emphasis"><em>z
</em></span> axis into stacks.
30 Note that if
<em class=
"parameter"><code>top
</code></em> is set to
0.0, this routine generates a cone.
32 If the orientation is set to
<code class=
"constant">GLU_OUTSIDE
</code>
33 (with
<a class=
"citerefentry" href=
"gluQuadricOrientation.xml"><span class=
"citerefentry"><span class=
"refentrytitle">gluQuadricOrientation
</span></span></a>), then any generated normals
34 point away from the
<span class=
"emphasis"><em>z
</em></span> axis. Otherwise, they point toward the
35 <span class=
"emphasis"><em>z
</em></span> axis.
37 If texturing is turned on (with
<a class=
"citerefentry" href=
"gluQuadricTexture.xml"><span class=
"citerefentry"><span class=
"refentrytitle">gluQuadricTexture
</span></span></a>), then texture
38 coordinates are generated so that
<span class=
"emphasis"><em>t
</em></span> ranges linearly from
0.0
39 at
<span class=
"emphasis"><em>z
</em></span> =
0 to
1.0 at
<span class=
"emphasis"><em>z
</em></span> =
<em class=
"parameter"><code>height
</code></em>, and
<span class=
"emphasis"><em>s
</em></span>
40 ranges from
0.0 at the +
<span class=
"emphasis"><em>y
</em></span> axis, to
0.25 at the +
<span class=
"emphasis"><em>x
</em></span> axis,
41 to
0.5 at the -
<span class=
"emphasis"><em>y
</em></span> axis, to
0.75 at the \-
<span class=
"emphasis"><em>x
</em></span> axis,
42 and back to
1.0 at the +
<span class=
"emphasis"><em>y
</em></span> axis.
43 </p></div><div class=
"refsect1" lang=
"en" xml:
lang=
"en"><a id=
"seealso"></a><h2>See Also
</h2><p>
44 <a class=
"citerefentry" href=
"gluDisk.xml"><span class=
"citerefentry"><span class=
"refentrytitle">gluDisk
</span></span></a>,
45 <a class=
"citerefentry" href=
"gluNewQuadric.xml"><span class=
"citerefentry"><span class=
"refentrytitle">gluNewQuadric
</span></span></a>,
46 <a class=
"citerefentry" href=
"gluPartialDisk.xml"><span class=
"citerefentry"><span class=
"refentrytitle">gluPartialDisk
</span></span></a>,
47 <a class=
"citerefentry" href=
"gluQuadricTexture.xml"><span class=
"citerefentry"><span class=
"refentrytitle">gluQuadricTexture
</span></span></a>,
48 <a class=
"citerefentry" href=
"gluSphere.xml"><span class=
"citerefentry"><span class=
"refentrytitle">gluSphere
</span></span></a>
49 </p></div><div class=
"refsect1" lang=
"en" xml:
lang=
"en"><a id=
"Copyright"></a><h2>Copyright
</h2><p>
50 Copyright
<span class=
"trademark"></span>©
1991-
2006
51 Silicon Graphics, Inc. This document is licensed under the SGI
52 Free Software B License. For details, see
53 <a class=
"ulink" href=
"http://oss.sgi.com/projects/FreeB/" target=
"_top">http://oss.sgi.com/projects/FreeB/
</a>.
54 </p></div></div></body></html>