Table of Contents

Class CylinderMesh

Namespace
Godot
Assembly
GodotSharp.dll

Class representing a cylindrical PrimitiveMesh. This class can be used to create cones by setting either the TopRadius or BottomRadius properties to 0.0.

public class CylinderMesh : PrimitiveMesh, IDisposable
Inheritance
CylinderMesh
Implements
Inherited Members

Constructors

CylinderMesh()

public CylinderMesh()

Properties

BottomRadius

Bottom radius of the cylinder. If set to 0.0, the bottom faces will not be generated, resulting in a conic shape. See also CapBottom.

public float BottomRadius { get; set; }

Property Value

float

CapBottom

If true, generates a cap at the bottom of the cylinder. This can be set to false to speed up generation and rendering when the cap is never seen by the camera. See also BottomRadius.

Note: If BottomRadius is 0.0, cap generation is always skipped even if CapBottom is true.

public bool CapBottom { get; set; }

Property Value

bool

CapTop

If true, generates a cap at the top of the cylinder. This can be set to false to speed up generation and rendering when the cap is never seen by the camera. See also TopRadius.

Note: If TopRadius is 0.0, cap generation is always skipped even if CapTop is true.

public bool CapTop { get; set; }

Property Value

bool

Height

Full height of the cylinder.

public float Height { get; set; }

Property Value

float

RadialSegments

Number of radial segments on the cylinder. Higher values result in a more detailed cylinder/cone at the cost of performance.

public int RadialSegments { get; set; }

Property Value

int

Rings

Number of edge rings along the height of the cylinder. Changing Rings does not have any visual impact unless a shader or procedural mesh tool is used to alter the vertex data. Higher values result in more subdivisions, which can be used to create smoother-looking effects with shaders or procedural mesh tools (at the cost of performance). When not altering the vertex data using a shader or procedural mesh tool, Rings should be kept to its default value.

public int Rings { get; set; }

Property Value

int

TopRadius

Top radius of the cylinder. If set to 0.0, the top faces will not be generated, resulting in a conic shape. See also CapTop.

public float TopRadius { get; set; }

Property Value

float

Methods

HasGodotClassMethod(in godot_string_name)

Check if the type contains a method with the given name. This method is used by Godot to check if a method exists before invoking it. Do not call or override this method.

protected override bool HasGodotClassMethod(in godot_string_name method)

Parameters

method godot_string_name

Name of the method to check for.

Returns

bool

HasGodotClassSignal(in godot_string_name)

Check if the type contains a signal with the given name. This method is used by Godot to check if a signal exists before raising it. Do not call or override this method.

protected override bool HasGodotClassSignal(in godot_string_name signal)

Parameters

signal godot_string_name

Name of the signal to check for.

Returns

bool

InvokeGodotClassMethod(in godot_string_name, NativeVariantPtrArgs, out godot_variant)

Invokes the method with the given name, using the given arguments. This method is used by Godot to invoke methods from the engine side. Do not call or override this method.

protected override bool InvokeGodotClassMethod(in godot_string_name method, NativeVariantPtrArgs args, out godot_variant ret)

Parameters

method godot_string_name

Name of the method to invoke.

args NativeVariantPtrArgs

Arguments to use with the invoked method.

ret godot_variant

Value returned by the invoked method.

Returns

bool