Mesh.Cylinder 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 cylinder.
Namespace: Microsoft.WindowsMobile.DirectX.Direct3D
Assembly: Microsoft.WindowsMobile.DirectX (in Microsoft.WindowsMobile.DirectX.dll)
Syntax
'Declaration
Public Shared Function Cylinder ( _
device As Device, _
radius1 As Single, _
radius2 As Single, _
length As Single, _
slices As Integer, _
stacks As Integer _
) As Mesh
'Usage
Dim device As Device
Dim radius1 As Single
Dim radius2 As Single
Dim length As Single
Dim slices As Integer
Dim stacks As Integer
Dim returnValue As Mesh
returnValue = Mesh.Cylinder(device, _
radius1, radius2, length, slices, _
stacks)
public static Mesh Cylinder(
Device device,
float radius1,
float radius2,
float length,
int slices,
int stacks
)
public:
static Mesh^ Cylinder(
Device^ device,
float radius1,
float radius2,
float length,
int slices,
int stacks
)
static member Cylinder :
device:Device *
radius1:float32 *
radius2:float32 *
length:float32 *
slices:int *
stacks:int -> Mesh
Parameters
- device
Type: Microsoft.WindowsMobile.DirectX.Direct3D.Device
A Device object that represents the device associated with the created cylinder mesh.
- radius1
Type: System.Single
Radius at the negative Z end. Value should be greater than or equal to 0.0f.
- radius2
Type: System.Single
Radius at the positive Z end. Value should be greater than or equal to 0.0f.
- length
Type: System.Single
Length of the cylinder along the z-axis.
- slices
Type: System.Int32
Number of slices around the main axis.
- stacks
Type: System.Int32
Number of stacks along the main axis.
Return Value
Type: Microsoft.WindowsMobile.DirectX.Direct3D.Mesh
A Mesh object that represents the cylinder mesh.
Exceptions
Exception | Condition |
---|---|
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. |
Remarks
The created cylinder 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 Using Libraries from Partially Trusted Code.
Platforms
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.
Version Information
.NET Compact Framework
Supported in: 3.5, 2.0