Mesh.Torus Method

[This documentation is for preview only, and is subject to change in later releases. Blank topics are included as placeholders.]

Uses a left-handed coordinate system to create a mesh that contains a torus.

Namespace:  Microsoft.WindowsMobile.DirectX.Direct3D
Assembly:  Microsoft.WindowsMobile.DirectX (in Microsoft.WindowsMobile.DirectX.dll)

public static Mesh Torus(
	Device device,
	float innerRadius,
	float outerRadius,
	int sides,
	int rings
)

Parameters

device
Type: Microsoft.WindowsMobile.DirectX.Direct3D.Device
A Device object that represents the device associated with the torus mesh.
innerRadius
Type: System.Single
Inner radius of the torus; should be greater than or equal to 0.0f.
outerRadius
Type: System.Single
Outer radius of the torus; should be greater than or equal to 0.0f.
sides
Type: System.Int32
Number of sides in a cross section; must be greater than or equal to 3.
rings
Type: System.Int32
Number of rings in the torus; must be greater than or equal to 3.

Return Value

Type: Microsoft.WindowsMobile.DirectX.Direct3D.Mesh
A Mesh object that represents the torus mesh.

ExceptionCondition
InvalidCallException

The method call is invalid. For example, a method's parameter may contain an invalid value.

OutOfMemoryException

Direct3D could not allocate sufficient memory to complete the call.

The Torus method draws a doughnut shape, centered at (0, 0, 0), whose axis is aligned with the z-axis. The inner radius of the torus is the radius of the cross section (the minor radius), and the outer radius of the torus is the radius of the central hole.

The mesh that this method returns can later be used by the application for drawing or manipulation.

Windows CE, Windows Mobile for Smartphone, Windows Mobile for Pocket PC

The .NET Framework and .NET Compact Framework do not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.

.NET Compact Framework

Supported in: 3.5, 2.0
Show: