Cylinder

Cylinder class

Parameterized Cylinder. It can also be used to represent the cone when one of radiusTop/radiusBottom is zero.

Methods

constructor

NameDescription
constructor()Initializes a new instance of the Cylinder class.

Result:


constructor_overload

NameDescription
constructor_overload(radius, height)Initializes a new instance of the Cylinder class.

Parameters:

NameTypeDescription
radiusNumberRadius of the top and bottom cap.
heightNumberHeight.

Result:


constructor_overload$2{#constructor_overload$2}

NameDescription
constructor_overload$2(radiusTop, radiusBottom, height)Initializes a new instance of the Cylinder class.

Parameters:

NameTypeDescription
radiusTopNumberRadius top.
radiusBottomNumberRadius bottom.
heightNumberHeight.

Result:


constructor_overload$3{#constructor_overload$3}

NameDescription
constructor_overload$3(radiusTop, radiusBottom, height, radialSegments, heightSegments, openEnded)Initializes a new instance of the Cylinder class.

Parameters:

NameTypeDescription
radiusTopNumberRadius of cylinder’s top cap.
radiusBottomNumberRadius of cylinder’s bottom cap.
heightNumberHeight of the cylinder.
radialSegmentsNumberRadial segments of both top and bottom circles..
heightSegmentsNumberHeight segments.
openEndedbooleanIf set to

Result:


constructor_overload$4{#constructor_overload$4}

NameDescription
constructor_overload$4(name, radiusTop, radiusBottom, height, radialSegments, heightSegments, openEnded, thetaStart, thetaLength)Initializes a new instance of the Cylinder class.

Parameters:

NameTypeDescription
nameStringThe name of this object
radiusTopNumberRadius of cylinder’s top cap.
radiusBottomNumberRadius of cylinder’s bottom cap.
heightNumberHeight of the cylinder.
radialSegmentsNumberRadial segments of both top and bottom circles..
heightSegmentsNumberHeight segments.
openEndedbooleanIf set to
thetaStartNumberTheta start.
thetaLengthNumberTheta length.

Result:


getOffsetBottom

NameDescription
getOffsetBottom()Gets or sets the vertices transformation offset of the bottom side.

Result:


setOffsetBottom

NameDescription
setOffsetBottom(value)Gets or sets the vertices transformation offset of the bottom side.

Result:


getOffsetTop

NameDescription
getOffsetTop()Gets or sets the vertices transformation offset of the top side.

Result:


setOffsetTop

NameDescription
setOffsetTop(value)Gets or sets the vertices transformation offset of the top side.

Result:


getGenerateFanCylinder

NameDescription
getGenerateFanCylinder()Gets or sets whether to generate the fan-style cylinder when the ThetaLength is less than 2PI, otherwise the model will not be cut.

Result:


setGenerateFanCylinder

NameDescription
setGenerateFanCylinder(value)Gets or sets whether to generate the fan-style cylinder when the ThetaLength is less than 2PI, otherwise the model will not be cut.

Result:


getShearBottom

NameDescription
getShearBottom()Gets or sets of the shear transform of the bottom side, vector stores the (x-axis, z-axis) shear value that measured in radian, default value is (0, 0)

Result:


setShearBottom

NameDescription
setShearBottom(value)Gets or sets of the shear transform of the bottom side, vector stores the (x-axis, z-axis) shear value that measured in radian, default value is (0, 0)

Result:


getShearTop

NameDescription
getShearTop()Gets or sets of the shear transform of the top side, vector stores the (x-axis, z-axis) shear value that measured in radian, default value is (0, 0)

Result:


setShearTop

NameDescription
setShearTop(value)Gets or sets of the shear transform of the top side, vector stores the (x-axis, z-axis) shear value that measured in radian, default value is (0, 0)

Result:


getRadiusTop

NameDescription
getRadiusTop()Gets or sets the radius of cylinder’s top cap. The radius of the top cap.

Result:


setRadiusTop

NameDescription
setRadiusTop(value)Gets or sets the radius of cylinder’s top cap. The radius of the top cap.

Result:


getRadiusBottom

NameDescription
getRadiusBottom()Gets or sets the radius of cylinder’s bottom cap. The radius of the bottom cap.

Result:


setRadiusBottom

NameDescription
setRadiusBottom(value)Gets or sets the radius of cylinder’s bottom cap. The radius of the bottom cap.

Result:


getHeight

NameDescription
getHeight()Gets or sets the height of the cylinder. The height.

Result:


setHeight

NameDescription
setHeight(value)Gets or sets the height of the cylinder. The height.

Result:


getRadialSegments

NameDescription
getRadialSegments()Gets or sets the radial segments. The radial segments.

Result:


setRadialSegments

NameDescription
setRadialSegments(value)Gets or sets the radial segments. The radial segments.

Result:


getHeightSegments

NameDescription
getHeightSegments()Gets or sets the height segments. The height segments.

Result:


setHeightSegments

NameDescription
setHeightSegments(value)Gets or sets the height segments. The height segments.

Result:


getOpenEnded

NameDescription
getOpenEnded()Gets or sets a value indicating whether this Cylinder open ended. The default value is false. true if open ended; otherwise, top/bottom caps exists.

Result:


setOpenEnded

NameDescription
setOpenEnded(value)Gets or sets a value indicating whether this Cylinder open ended. The default value is false. true if open ended; otherwise, top/bottom caps exists.

Result:


getThetaStart

NameDescription
getThetaStart()Gets or sets the theta start. The default value is 0. The theta start.

Result:


setThetaStart

NameDescription
setThetaStart(value)Gets or sets the theta start. The default value is 0. The theta start.

Result:


getThetaLength

NameDescription
getThetaLength()Gets or sets the length of the theta. The default value is 2π. The length of the theta.

Result:


setThetaLength

NameDescription
setThetaLength(value)Gets or sets the length of the theta. The default value is 2π. The length of the theta.

Result:


getCastShadows

NameDescription
getCastShadows()Gets or sets whether this geometry can cast shadow

Result:


setCastShadows

NameDescription
setCastShadows(value)Gets or sets whether this geometry can cast shadow

Result:


getReceiveShadows

NameDescription
getReceiveShadows()Gets or sets whether this geometry can receive shadow.

Result:


setReceiveShadows

NameDescription
setReceiveShadows(value)Gets or sets whether this geometry can receive shadow.

Result:


getParentNodes

NameDescription
getParentNodes()Gets all parent nodes, an entity can be attached to multiple parent nodes for geometry instancing The nodes.

Result:


getExcluded

NameDescription
getExcluded()Gets or sets whether to exclude this entity during exporting.

Result:


setExcluded

NameDescription
setExcluded(value)Gets or sets whether to exclude this entity during exporting.

Result:


getParentNode

NameDescription
getParentNode()Gets or sets the first parent node, if set the first parent node, this entity will be detached from other parent nodes. The parent node.

Result:


setParentNode

NameDescription
setParentNode(value)Gets or sets the first parent node, if set the first parent node, this entity will be detached from other parent nodes. The parent node.

Result:


getScene

NameDescription
getScene()Gets the scene that this object belongs to

Result:


getName

NameDescription
getName()Gets or sets the name. The name.

Result:


setName

NameDescription
setName(value)Gets or sets the name. The name.

Result:


getProperties

NameDescription
getProperties()Gets the collection of all properties.

Result:


toMesh

NameDescription
toMesh()Convert current object to mesh

Result: Mesh


getBoundingBox

NameDescription
getBoundingBox()Gets the bounding box of current entity in its object space coordinate system.

Result: Mesh


getEntityRendererKey

NameDescription
getEntityRendererKey()Gets the key of the entity renderer registered in the renderer

Result: EntityRendererKey


removeProperty

NameDescription
removeProperty(property)Removes a dynamic property.

Parameters:

NameTypeDescription
propertyPropertyWhich property to remove

Result: boolean


removeProperty

NameDescription
removeProperty(property)Remove the specified property identified by name

Parameters:

NameTypeDescription
propertStringnull

Result: boolean


getProperty

NameDescription
getProperty(property)Get the value of specified property

Parameters:

NameTypeDescription
propertyStringProperty name

Result: Object


setProperty

NameDescription
setProperty(property, value)Sets the value of specified property

Parameters:

NameTypeDescription
propertyStringProperty name
valueObjectThe value of the property

Result: Object


findProperty

NameDescription
findProperty(propertyName)Finds the property. It can be a dynamic property (Created by CreateDynamicProperty/SetProperty) or native property(Identified by its name)

Parameters:

NameTypeDescription
propertyNameStringProperty name.

Result: Property