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