Mesh.Sphere Method
Uses a left-handed coordinate system to create a mesh that contains a sphere.
Namespace: Microsoft.WindowsMobile.DirectX.Direct3D
Assembly: Microsoft.WindowsMobile.DirectX (in microsoft.windowsmobile.directx.dll)
Syntax
'Declaration
Public Shared Function Sphere ( _
device As Device, _
radius As Single, _
slices As Integer, _
stacks As Integer _
) As Mesh
'Usage
Dim device As Device
Dim radius As Single
Dim slices As Integer
Dim stacks As Integer
Dim returnValue As Mesh
returnValue = Mesh.Sphere(device, radius, slices, stacks)
public static Mesh Sphere (
Device device,
float radius,
int slices,
int stacks
)
public:
static Mesh^ Sphere (
Device^ device,
float radius,
int slices,
int stacks
)
public static Mesh Sphere (
Device device,
float radius,
int slices,
int stacks
)
public static function Sphere (
device : Device,
radius : float,
slices : int,
stacks : int
) : Mesh
Parameters
- device
A Device object that represents the device associated with the created sphere mesh.
- radius
Radius of the sphere. This value should be greater than or equal to 0.0f.
- slices
Number of slices around the main axis.
- stacks
Number of stacks along the main axis.
Return Value
A Mesh object that represents the sphere 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 created sphere is centered at the origin, and its axis is aligned with the z-axis.
.NET Framework Security
- Full trust for the immediate caller. This member cannot be used by partially trusted code. For more information, see .
Platforms
Windows CE, Windows Mobile for Pocket PC, Windows Mobile for Smartphone
The .NET Framework does not support all versions of every platform. For a list of the supported versions, see System Requirements.
Version Information
.NET Compact Framework
Supported in: 2.0
See Also
Reference
Mesh Class
Mesh Members
Microsoft.WindowsMobile.DirectX.Direct3D Namespace