Mesh.Torus Method
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)
Syntax
'Declaration
Public Shared Function Torus ( _
device As Device, _
innerRadius As Single, _
outerRadius As Single, _
sides As Integer, _
rings As Integer _
) As Mesh
'Usage
Dim device As Device
Dim innerRadius As Single
Dim outerRadius As Single
Dim sides As Integer
Dim rings As Integer
Dim returnValue As Mesh
returnValue = Mesh.Torus(device, innerRadius, outerRadius, sides, rings)
public static Mesh Torus (
Device device,
float innerRadius,
float outerRadius,
int sides,
int rings
)
public:
static Mesh^ Torus (
Device^ device,
float innerRadius,
float outerRadius,
int sides,
int rings
)
public static Mesh Torus (
Device device,
float innerRadius,
float outerRadius,
int sides,
int rings
)
public static function Torus (
device : Device,
innerRadius : float,
outerRadius : float,
sides : int,
rings : int
) : Mesh
Not applicable.
Parameters
- device
A Device object that represents the device associated with the torus mesh.
- innerRadius
Inner radius of the torus; should be greater than or equal to 0.0f.
- outerRadius
Outer radius of the torus; should be greater than or equal to 0.0f.
- sides
Number of sides in a cross section; must be greater than or equal to 3.
- rings
Number of rings in the torus; must be greater than or equal to 3.
Return Value
A Mesh object that represents the torus mesh.
Exceptions
Exception type | Condition |
---|---|
The method call is invalid. For example, a method's parameter may contain an invalid value. |
|
Direct3D could not allocate sufficient memory to complete the call. |
Remarks
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.
Platforms
Windows CE, Windows Mobile for Pocket PC, Windows Mobile for Smartphone
The Microsoft .NET Framework 3.0 is supported on Windows Vista, Microsoft Windows XP SP2, and Windows Server 2003 SP1.
Version Information
.NET Compact Framework
Supported in: 2.0
See Also
Reference
Mesh Class
Mesh Members
Microsoft.WindowsMobile.DirectX.Direct3D Namespace