mirror of
https://github.com/Ryujinx/Opentk.git
synced 2024-12-26 06:05:37 +00:00
134 lines
5.8 KiB
XML
134 lines
5.8 KiB
XML
|
<?xml version="1.0" encoding="UTF-8"?>
|
||
|
<!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook MathML Module V1.1b1//EN"
|
||
|
"http://www.oasis-open.org/docbook/xml/mathml/1.1CR1/dbmathml.dtd">
|
||
|
<refentry id="gluSphere">
|
||
|
<refmeta>
|
||
|
<refmetainfo>
|
||
|
<copyright>
|
||
|
<year>1991-2006</year>
|
||
|
<holder>Silicon Graphics, Inc.</holder>
|
||
|
</copyright>
|
||
|
</refmetainfo>
|
||
|
<refentrytitle>gluSphere</refentrytitle>
|
||
|
<manvolnum>3G</manvolnum>
|
||
|
</refmeta>
|
||
|
<refnamediv>
|
||
|
<refname>gluSphere</refname>
|
||
|
<refpurpose>draw a sphere</refpurpose>
|
||
|
</refnamediv>
|
||
|
<refsynopsisdiv><title>C Specification</title>
|
||
|
<funcsynopsis>
|
||
|
<funcprototype>
|
||
|
<funcdef>void <function>gluSphere</function></funcdef>
|
||
|
<paramdef>GLUquadric* <parameter>quad</parameter></paramdef>
|
||
|
<paramdef>GLdouble <parameter>radius</parameter></paramdef>
|
||
|
<paramdef>GLint <parameter>slices</parameter></paramdef>
|
||
|
<paramdef>GLint <parameter>stacks</parameter></paramdef>
|
||
|
</funcprototype>
|
||
|
</funcsynopsis>
|
||
|
</refsynopsisdiv>
|
||
|
<!-- eqn: ignoring delim $$ -->
|
||
|
<refsect1 id="parameters"><title>Parameters</title>
|
||
|
<variablelist>
|
||
|
<varlistentry>
|
||
|
<term><parameter>quad</parameter></term>
|
||
|
<listitem>
|
||
|
<para>
|
||
|
Specifies the quadrics object (created with <citerefentry><refentrytitle>gluNewQuadric</refentrytitle></citerefentry>).
|
||
|
</para>
|
||
|
</listitem>
|
||
|
</varlistentry>
|
||
|
<varlistentry>
|
||
|
<term><parameter>radius</parameter></term>
|
||
|
<listitem>
|
||
|
<para>
|
||
|
Specifies the radius of the sphere.
|
||
|
</para>
|
||
|
</listitem>
|
||
|
</varlistentry>
|
||
|
<varlistentry>
|
||
|
<term><parameter>slices</parameter></term>
|
||
|
<listitem>
|
||
|
<para>
|
||
|
Specifies the number of subdivisions around the <emphasis>z</emphasis> axis
|
||
|
(similar to lines of longitude).
|
||
|
</para>
|
||
|
</listitem>
|
||
|
</varlistentry>
|
||
|
<varlistentry>
|
||
|
<term><parameter>stacks</parameter></term>
|
||
|
<listitem>
|
||
|
<para>
|
||
|
Specifies the number of subdivisions along the <emphasis>z</emphasis> axis
|
||
|
(similar to lines of
|
||
|
latitude).
|
||
|
</para>
|
||
|
</listitem>
|
||
|
</varlistentry>
|
||
|
</variablelist>
|
||
|
</refsect1>
|
||
|
<refsect1 id="description"><title>Description</title>
|
||
|
<para>
|
||
|
<function>gluSphere</function> draws a sphere of the given radius centered around the origin. The
|
||
|
sphere is subdivided around the <emphasis>z</emphasis> axis into slices and along the
|
||
|
<emphasis>z</emphasis> axis
|
||
|
into stacks (similar to lines of longitude and latitude).
|
||
|
</para>
|
||
|
<para>
|
||
|
If the orientation is set to <constant>GLU_OUTSIDE</constant>
|
||
|
(with <citerefentry><refentrytitle>gluQuadricOrientation</refentrytitle></citerefentry>), then any normals generated
|
||
|
point away from the center of the sphere.
|
||
|
Otherwise, they point toward the center of the sphere.
|
||
|
</para>
|
||
|
<para>
|
||
|
If texturing is turned on (with <citerefentry><refentrytitle>gluQuadricTexture</refentrytitle></citerefentry>), then texture
|
||
|
coordinates are
|
||
|
generated so that <emphasis>t</emphasis> ranges from 0.0 at
|
||
|
<inlineequation><mml:math>
|
||
|
<!-- eqn: z = -radius:-->
|
||
|
<mml:mrow>
|
||
|
<mml:mi mathvariant="italic">z</mml:mi>
|
||
|
<mml:mo>=</mml:mo>
|
||
|
<mml:mrow>
|
||
|
<mml:mo>-</mml:mo>
|
||
|
<mml:mi mathvariant="italic">radius</mml:mi>
|
||
|
</mml:mrow>
|
||
|
</mml:mrow>
|
||
|
</mml:math></inlineequation>
|
||
|
to 1.0 at
|
||
|
<inlineequation><mml:math>
|
||
|
<!-- eqn: z = radius:-->
|
||
|
<mml:mrow>
|
||
|
<mml:mi mathvariant="italic">z</mml:mi>
|
||
|
<mml:mo>=</mml:mo>
|
||
|
<mml:mi mathvariant="italic">radius</mml:mi>
|
||
|
</mml:mrow>
|
||
|
</mml:math></inlineequation>
|
||
|
(<emphasis>t</emphasis> increases linearly along longitudinal
|
||
|
lines),
|
||
|
and <emphasis>s</emphasis> ranges from 0.0 at the +<emphasis>y</emphasis> axis, to 0.25 at the
|
||
|
+<emphasis>x</emphasis> axis,
|
||
|
to 0.5 at the \-<emphasis>y</emphasis> axis, to 0.75 at the \-<emphasis>x</emphasis> axis, and back to 1.0
|
||
|
at the +<emphasis>y</emphasis> axis.
|
||
|
</para>
|
||
|
</refsect1>
|
||
|
<refsect1 id="seealso"><title>See Also</title>
|
||
|
<para>
|
||
|
<citerefentry><refentrytitle>gluCylinder</refentrytitle></citerefentry>,
|
||
|
<citerefentry><refentrytitle>gluDisk</refentrytitle></citerefentry>,
|
||
|
<citerefentry><refentrytitle>gluNewQuadric</refentrytitle></citerefentry>,
|
||
|
<citerefentry><refentrytitle>gluPartialDisk</refentrytitle></citerefentry>,
|
||
|
<citerefentry><refentrytitle>gluQuadricOrientation</refentrytitle></citerefentry>,
|
||
|
<citerefentry><refentrytitle>gluQuadricTexture</refentrytitle></citerefentry>
|
||
|
</para>
|
||
|
</refsect1>
|
||
|
<refsect1 id="Copyright"><title>Copyright</title>
|
||
|
<para>
|
||
|
Copyright <trademark class="copyright"></trademark> 1991-2006
|
||
|
Silicon Graphics, Inc. This document is licensed under the SGI
|
||
|
Free Software B License. For details, see
|
||
|
<ulink url="http://oss.sgi.com/projects/FreeB/">http://oss.sgi.com/projects/FreeB/</ulink>.
|
||
|
</para>
|
||
|
</refsect1>
|
||
|
</refentry>
|