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
17<h2>C Specification</h2>
18
19<dl>
20<dd><PRE><CODE>#include &lt;revolution/gx.h&gt;</CODE></PRE></dd>
21<dd><pre><CODE>void GXDrawTorus(
22f32         rc,
23u8          numc,
24u8          numt );</CODE></pre></dd>
25</dl>
26<h2>Arguments</h2>
27<TABLE border="1" cellpadding="3" cellspacing="0.1">
28  <tr>
29<TD width="120" bgcolor="#ffffe8"><em><strong><CODE>rc</font></strong></em></TD>
30<TD width="520">The radius of the circle to rotate.</TD>
31    </tr>
32  <tr>
33<TD width="120" bgcolor="#ffffe8"><em><strong><CODE>numc</font></strong></em></TD>
34<TD width="520">The number of divisions of the circle to rotate</TD>
35    </tr>
36  <tr>
37<TD width="120" bgcolor="#ffffe8"><em><strong><CODE>numt</font></strong></em></TD>
38<TD width="520">The number of divisions of the circle by axial rotation</TD>
39    </tr>
40</TABLE>
41<h2>Return Values</h2>
42
43<p>None.</p>
44<h2>Description</h2>
45
46<p>This function draws a unit torus.&nbsp;The torus is made by revolving a circle of radius <code><em><strong>rc</strong></em></code> about an axis.&nbsp;The distance from the axis is defined as <em>1.0 - <code><strong>rc</strong></code></em>, so the torus will fit inside a unit sphere.&nbsp;The number of divisions in the initial circle is <code><em><strong>numc</strong></em></code>. &nbsp; The number of divisions in the revolution about the axis is specified by <code><em><strong>numt</strong></em></code>.
47</p>
48<P>By default, this function generates both position and normal information in 32-bit floating point. The function saves the current vertex descriptor and the vertex attribute format used before drawing (and restores them afterward), so as not to interfere with the application's state.&nbsp; An example usage is:<br>
49</P>
50<p><A href="GXDrawTorus.html">GXDrawTorus</a>(0.375, 12, 16);</code></p>
51
52<p>The model is drawn centered about the origin.&nbsp;The Z axis is the axis of revolution.
53</p>
54
55
56
57
58
59<h2>See Also</h2>
60<H2>Revision History</H2>
61<P>03/01/2006 Initial version.</P>
62</BODY>
63</HTML>