Mesh.Cylinder Method |
Language: |
Uses a left-handed coordinate system to create a mesh that contains a cylinder.
Visual Basic Public Shared Function Cylinder( _
ByVal device As Device, _
ByVal radius1 As Single, _
ByVal radius2 As Single, _
ByVal length As Single, _
ByVal slices As Integer, _
ByVal stacks As Integer, _
ByRef adjacency As GraphicsStream _
) As MeshC# public static Mesh Cylinder(
Device device,
float radius1,
float radius2,
float length,
int slices,
int stacks,
out GraphicsStream adjacency
);C++ public:
static Mesh^ Cylinder(
Device^ device,
float radius1,
float radius2,
float length,
int slices,
int stacks,
[Out] GraphicsStream^% adjacency
);JScript public static function Cylinder(
device : Device,
radius1 : float,
radius2 : float,
length : float,
slices : int,
stacks : int,
adjacency : GraphicsStream
) : Mesh;
device Microsoft.DirectX.Direct3D.Device
A Device object that represents the device associated with the created cylinder mesh.radius1 System.Single
Radius at the negative Z end. Value should be greater than or equal to 0.0f.radius2 System.Single
Radius at the positive Z end. Value should be greater than or equal to 0.0f.length System.Single
Length of the cylinder along the z-axis.slices System.Int32
Number of slices around the main axis.stacks System.Int32
Number of stacks along the main axis.adjacency Microsoft.DirectX.GraphicsStream
A GraphicsStream object containing three Int32 values per face that specify the three neighbors for each face in the mesh.
Microsoft.DirectX.Direct3D.Mesh
A Mesh object that represents the cylinder mesh.
The created cylinder is centered at the origin, and its axis is aligned with the z-axis.
Exceptions
InvalidCallException The method call is invalid. For example, a method's parameter might contain an invalid value. InvalidDataException The data is invalid. OutOfMemoryException Microsoft Direct3D could not allocate sufficient memory to complete the call.
Send comments about this topic to Microsoft. © Microsoft Corporation. All rights reserved.
Feedback? Please provide us with your comments on this topic.
For more help, visit the DirectX Developer Center