CreateCylinder()

Syntax

Result = CreateCylinder(#Mesh, Radius, Length [, Tessellation, CloseTop, VerticalShift])
Description
Create a new cylinder.

Parameters

#Mesh The number to identify the new mesh. #PB_Any can be used to auto-generate this number.
Radius Radius, in world unit, of the cylinder.
Length (optional) Length, in world unit, of the cylinder.
Tessellation (optional) Tessellation factor to create the cylinder. The minimum value is 2. The higher the factor is and the more precise the cylinder will be, but it will also affect the rendering speed if a too high factor is specified. Default value is 8.
CloseTop (optional) Specify if the cylinder should be closed on top and bottom, or if it should be left open (like a pipe). Set it to 1 to create a closed cylinder or to 0 else. Default value is 1.
VerticalShift (optional) The shift, in world unit, to apply between the bottom and the top of the cylinder. Default value is 0.

Return value

Returns nonzero if the mesh was created successfully and zero if there was an error. If #PB_Any was used as the #Mesh parameter then the new generated number is returned on success.

See Also

FreeMesh(), CreateSphere(), CreateMesh(), CreateCube(), CreatePlane(), CreateLine3D()

Supported OS

All

<- CreateCube() - Mesh Index - CreateLine3D() ->