Commit | Line | Data |
---|---|---|
7faf1d71 AW |
1 | <?xml version="1.0" encoding="UTF-8"?> |
2 | <!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook MathML Module V1.1b1//EN" | |
3 | "http://www.oasis-open.org/docbook/xml/mathml/1.1CR1/dbmathml.dtd"> | |
4 | <refentry id="gluCylinder"> | |
5 | <refmeta> | |
6 | <refmetainfo> | |
7 | <copyright> | |
8 | <year>1991-2006</year> | |
9 | <holder>Silicon Graphics, Inc.</holder> | |
10 | </copyright> | |
11 | </refmetainfo> | |
12 | <refentrytitle>gluCylinder</refentrytitle> | |
13 | <manvolnum>3G</manvolnum> | |
14 | </refmeta> | |
15 | <refnamediv> | |
16 | <refname>gluCylinder</refname> | |
17 | <refpurpose>draw a cylinder</refpurpose> | |
18 | </refnamediv> | |
19 | <refsynopsisdiv><title>C Specification</title> | |
20 | <funcsynopsis> | |
21 | <funcprototype> | |
22 | <funcdef>void <function>gluCylinder</function></funcdef> | |
23 | <paramdef>GLUquadric* <parameter>quad</parameter></paramdef> | |
24 | <paramdef>GLdouble <parameter>base</parameter></paramdef> | |
25 | <paramdef>GLdouble <parameter>top</parameter></paramdef> | |
26 | <paramdef>GLdouble <parameter>height</parameter></paramdef> | |
27 | <paramdef>GLint <parameter>slices</parameter></paramdef> | |
28 | <paramdef>GLint <parameter>stacks</parameter></paramdef> | |
29 | </funcprototype> | |
30 | </funcsynopsis> | |
31 | </refsynopsisdiv> | |
32 | <!-- eqn: ignoring delim $$ --> | |
33 | <refsect1 id="parameters"><title>Parameters</title> | |
34 | <variablelist> | |
35 | <varlistentry> | |
36 | <term><parameter>quad</parameter></term> | |
37 | <listitem> | |
38 | <para> | |
39 | Specifies the quadrics object (created with <citerefentry><refentrytitle>gluNewQuadric</refentrytitle></citerefentry>). | |
40 | </para> | |
41 | </listitem> | |
42 | </varlistentry> | |
43 | <varlistentry> | |
44 | <term><parameter>base</parameter></term> | |
45 | <listitem> | |
46 | <para> | |
47 | Specifies the radius of the cylinder at <emphasis>z</emphasis> = 0. | |
48 | </para> | |
49 | </listitem> | |
50 | </varlistentry> | |
51 | <varlistentry> | |
52 | <term><parameter>top</parameter></term> | |
53 | <listitem> | |
54 | <para> | |
55 | Specifies the radius of the cylinder at <emphasis>z</emphasis> = <parameter>height</parameter>. | |
56 | </para> | |
57 | </listitem> | |
58 | </varlistentry> | |
59 | <varlistentry> | |
60 | <term><parameter>height</parameter></term> | |
61 | <listitem> | |
62 | <para> | |
63 | Specifies the height of the cylinder. | |
64 | </para> | |
65 | </listitem> | |
66 | </varlistentry> | |
67 | <varlistentry> | |
68 | <term><parameter>slices</parameter></term> | |
69 | <listitem> | |
70 | <para> | |
71 | Specifies the number of subdivisions around the <emphasis>z</emphasis> axis. | |
72 | </para> | |
73 | </listitem> | |
74 | </varlistentry> | |
75 | <varlistentry> | |
76 | <term><parameter>stacks</parameter></term> | |
77 | <listitem> | |
78 | <para> | |
79 | Specifies the number of subdivisions along the <emphasis>z</emphasis> axis. | |
80 | </para> | |
81 | </listitem> | |
82 | </varlistentry> | |
83 | </variablelist> | |
84 | </refsect1> | |
85 | <refsect1 id="description"><title>Description</title> | |
86 | <para> | |
87 | <function>gluCylinder</function> draws a cylinder oriented along the <emphasis>z</emphasis> axis. The base of the cylinder | |
88 | is placed at <emphasis>z</emphasis> = 0 and the top at | |
89 | <inlineequation><mml:math> | |
90 | <!-- eqn: z = height:--> | |
91 | <mml:mrow> | |
92 | <mml:mi mathvariant="italic">z</mml:mi> | |
93 | <mml:mo>=</mml:mo> | |
94 | <mml:mi mathvariant="italic">height</mml:mi> | |
95 | </mml:mrow> | |
96 | </mml:math></inlineequation>. | |
97 | Like a sphere, | |
98 | a cylinder is subdivided around the <emphasis>z</emphasis> axis into slices and along the | |
99 | <emphasis>z</emphasis> axis into stacks. | |
100 | </para> | |
101 | <para> | |
102 | Note that if <parameter>top</parameter> is set to 0.0, this routine generates a cone. | |
103 | </para> | |
104 | <para> | |
105 | If the orientation is set to <constant>GLU_OUTSIDE</constant> | |
106 | (with <citerefentry><refentrytitle>gluQuadricOrientation</refentrytitle></citerefentry>), then any generated normals | |
107 | point away from the <emphasis>z</emphasis> axis. Otherwise, they point toward the | |
108 | <emphasis>z</emphasis> axis. | |
109 | </para> | |
110 | <para> | |
111 | If texturing is turned on (with <citerefentry><refentrytitle>gluQuadricTexture</refentrytitle></citerefentry>), then texture | |
112 | coordinates are generated so that <emphasis>t</emphasis> ranges linearly from 0.0 | |
113 | at <emphasis>z</emphasis> = 0 to 1.0 at <emphasis>z</emphasis> = <parameter>height</parameter>, and <emphasis>s</emphasis> | |
114 | ranges from 0.0 at the +<emphasis>y</emphasis> axis, to 0.25 at the +<emphasis>x</emphasis> axis, | |
115 | to 0.5 at the -<emphasis>y</emphasis> axis, to 0.75 at the \-<emphasis>x</emphasis> axis, | |
116 | and back to 1.0 at the +<emphasis>y</emphasis> axis. | |
117 | </para> | |
118 | </refsect1> | |
119 | <refsect1 id="seealso"><title>See Also</title> | |
120 | <para> | |
121 | <citerefentry><refentrytitle>gluDisk</refentrytitle></citerefentry>, | |
122 | <citerefentry><refentrytitle>gluNewQuadric</refentrytitle></citerefentry>, | |
123 | <citerefentry><refentrytitle>gluPartialDisk</refentrytitle></citerefentry>, | |
124 | <citerefentry><refentrytitle>gluQuadricTexture</refentrytitle></citerefentry>, | |
125 | <citerefentry><refentrytitle>gluSphere</refentrytitle></citerefentry> | |
126 | </para> | |
127 | </refsect1> | |
128 | <refsect1 id="Copyright"><title>Copyright</title> | |
129 | <para> | |
130 | Copyright <trademark class="copyright"></trademark> 1991-2006 | |
131 | Silicon Graphics, Inc. This document is licensed under the SGI | |
132 | Free Software B License. For details, see | |
133 | <ulink url="http://oss.sgi.com/projects/FreeB/">http://oss.sgi.com/projects/FreeB/</ulink>. | |
134 | </para> | |
135 | </refsect1> | |
136 | </refentry> |