CylinderMesh
Class representing a cylindrical PrimitiveMesh.
Class representing a cylindrical PrimitiveMesh.
Class representing a cylindrical PrimitiveMesh. This class can be used to create cones by setting either the CylinderMesh.TopRadius or CylinderMesh.BottomRadius properties to 0.0.
Declarations checked against C# SDK 1.0.0. Expand a name to see declarations and documentation.
Constructors1
CylinderMeshConstructor
public CylinderMesh();Properties7
BottomRadiusProperty
public float BottomRadius { get; set; }Bottom radius of the cylinder. If set to 0.0, the bottom faces will not be generated, resulting in a conic shape. See also CylinderMesh.CapBottom.
CapBottomProperty
public bool CapBottom { get; set; }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 CylinderMesh.BottomRadius.
Note: If CylinderMesh.BottomRadius is 0.0, cap generation is always skipped even if CylinderMesh.CapBottom is true.
CapTopProperty
public bool CapTop { get; set; }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 CylinderMesh.TopRadius.
Note: If CylinderMesh.TopRadius is 0.0, cap generation is always skipped even if CylinderMesh.CapTop is true.
HeightProperty
public float Height { get; set; }Full height of the cylinder.
RadialSegmentsProperty
public int RadialSegments { get; set; }Number of radial segments on the cylinder. Higher values result in a more detailed cylinder/cone at the cost of performance.
RingsProperty
public int Rings { get; set; }Number of edge rings along the height of the cylinder. Changing CylinderMesh.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, CylinderMesh.Rings should be kept to its default value.
TopRadiusProperty
public float TopRadius { get; set; }Top radius of the cylinder. If set to 0.0, the top faces will not be generated, resulting in a conic shape. See also CylinderMesh.CapTop.
Methods14
GetBottomRadiusfloat
public float GetBottomRadius();floatGetHeightfloat
public float GetHeight();floatGetRadialSegmentsint
public int GetRadialSegments();intGetRingsint
public int GetRings();intGetTopRadiusfloat
public float GetTopRadius();floatIsCapBottombool
public bool IsCapBottom();boolIsCapTopbool
public bool IsCapTop();boolSetBottomRadiusvoid
public void SetBottomRadius(float radius);| Name | Type | Default |
|---|---|---|
radius | float | — |
SetCapBottomvoid
public void SetCapBottom(bool capBottom);| Name | Type | Default |
|---|---|---|
capBottom | bool | — |
SetCapTopvoid
public void SetCapTop(bool capTop);| Name | Type | Default |
|---|---|---|
capTop | bool | — |
SetHeightvoid
public void SetHeight(float height);| Name | Type | Default |
|---|---|---|
height | float | — |
SetRadialSegmentsvoid
public void SetRadialSegments(int segments);| Name | Type | Default |
|---|---|---|
segments | int | — |
SetRingsvoid
public void SetRings(int rings);| Name | Type | Default |
|---|---|---|
rings | int | — |
SetTopRadiusvoid
public void SetTopRadius(float radius);| Name | Type | Default |
|---|---|---|
radius | float | — |