1<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
2<html>
3
4<head>
5<META http-equiv="Content-Type" content="text/html; charset=windows-1252">
6<META name="GENERATOR" content="Microsoft FrontPage 5.0">
7<META http-equiv="Content-Style-Type" content="text/css">
8<LINK rel="stylesheet" type="text/css" href="../../CSS/revolution.css">
9<title>GXDrawTorus</title>
10</head>
11
12<body>
13
14<h1 align="left">GXDrawTorus</h1>
15
16<h2>Syntax</h2>
17<dl><dd><pre class="construction">
18#include &lt;revolution/gx.h&gt;
19
20void GXDrawTorus(
21    f32         rc,
22    u8          numc,
23    u8          numt );
24</pre></dd></dl>
25
26<h2>Arguments</h2>
27<TABLE class="arguments" border="1" >
28  <tr>
29<TH>rc</TH>
30<TD>The radius of the circle to rotate.</TD>
31  </tr>
32  <tr>
33<TH>numc</TH>
34<TD>The number of divisions of the circle to rotate</TD>
35  </tr>
36  <tr>
37<TH>numt</TH>
38<TD>The number of divisions of the circle by axial rotation</TD>
39  </tr>
40</TABLE>
41
42<h2>Return Values</h2>
43<p>None.</p>
44
45<h2>Description</h2>
46<p>This function renders a unit torus.&nbsp;The torus is made by revolving a circle of radius <SPAN class="argument">rc</SPAN> about an axis.&nbsp;The distance from the axis is defined as <CODE>1.0 - </CODE><SPAN class="argument">rc</SPAN>, so the torus will fit inside a unit sphere.&nbsp;The number of divisions in the initial circle is <SPAN class="argument">numc</SPAN>. The number of divisions in the revolution about the axis is specified by <SPAN class="argument">numt</SPAN>.
47</p>
48<P>By default, this function generates both vertex coordinate information and normal information in 32-bit floating point. The function saves the current vertex descriptor and the vertex attribute format used before rendering (and restores them afterward), so as not to interfere with the application's state.
49</P>
50<DL><DD><code><A href="GXDrawTorus.html">GXDrawTorus</A>(0.375, 12, 16);</code></DD></DL>
51
52<p>The above example renders a torus centered about the origin. The Z axis is the axis of revolution.</p>
53
54<h2>See Also</h2>
55<p>None.</p>
56
57<H2>Revision History</H2>
58<P>
592006/03/01 Initial version.<br>
60</P>
61
62<hr><p>CONFIDENTIAL</p></body>
63</HTML>