GXDrawTorus

Syntax

#include <revolution/gx.h>

void GXDrawTorus(
    f32         rc,
    u8          numc,
    u8          numt );

Arguments

rc The radius of the circle to rotate.
numc The number of divisions of the circle to rotate
numt The number of divisions of the circle by axial rotation

Return Values

None.

Description

This function renders a unit torus. The torus is made by revolving a circle of radius rc about an axis. The distance from the axis is defined as 1.0 - rc, so the torus will fit inside a unit sphere. The number of divisions in the initial circle is numc. The number of divisions in the revolution about the axis is specified by numt.

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.

GXDrawTorus(0.375, 12, 16);

The above example renders a torus centered about the origin. The Z axis is the axis of revolution.

See Also

None.

Revision History

2006/03/01 Initial version.


CONFIDENTIAL