Sphere

Sphere class

Parameterized sphere.

Methods

constructor

NameDescription
constructor()Initializes a new instance of the Sphere with default radius 1.

Result:


constructor_overload

NameDescription
constructor_overload(radius)Initializes a new instance of the Sphere class with specified radius.

Parameters:

NameTypeDescription
radiusNumberRadius.

Result:


constructor_overload$2{#constructor_overload$2}

NameDescription
constructor_overload$2(radius, widthSegments, heightSegments)Initializes a new instance of the Sphere class with specified radius, width segments and height segments.

Parameters:

NameTypeDescription
radiusNumberRadius of the sphere.
widthSegmentsNumberWidth segments.
heightSegmentsNumberHeight segments.

Result:


constructor_overload$3{#constructor_overload$3}

NameDescription
constructor_overload$3(name, radius, widthSegments, heightSegments, phiStart, phiLength, thetaStart, thetaLength)Initializes a new instance of the Sphere class.

Parameters:

NameTypeDescription
nameStringName.
radiusNumberRadius of the sphere.
widthSegmentsNumberWidth segments.
heightSegmentsNumberHeight segments.
phiStartNumberPhi start.
phiLengthNumberPhi length.
thetaStartNumberTheta start.
thetaLengthNumberTheta length.

Result:


getWidthSegments

NameDescription
getWidthSegments()Gets or sets the width segments. The width segments.

Result:


setWidthSegments

NameDescription
setWidthSegments(value)Gets or sets the width segments. The width 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:


getPhiStart

NameDescription
getPhiStart()Gets or sets the phi start. The phi start.

Result:


setPhiStart

NameDescription
setPhiStart(value)Gets or sets the phi start. The phi start.

Result:


getPhiLength

NameDescription
getPhiLength()Gets or sets the length of the phi. The length of the phi.

Result:


setPhiLength

NameDescription
setPhiLength(value)Gets or sets the length of the phi. The length of the phi.

Result:


getThetaStart

NameDescription
getThetaStart()Gets or sets the theta start. The theta start.

Result:


setThetaStart

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

Result:


getThetaLength

NameDescription
getThetaLength()Gets or sets the length of the theta. The length of the theta.

Result:


setThetaLength

NameDescription
setThetaLength(value)Gets or sets the length of the theta. The length of the theta.

Result:


getRadius

NameDescription
getRadius()Gets or sets the radius of the sphere.

Result:


setRadius

NameDescription
setRadius(value)Gets or sets the radius of the sphere.

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