Sphere
Contents
[
Hide
]Sphere class
Parameterized sphere.
Methods
constructor
| Name | Description |
|---|---|
| constructor() | Initializes a new instance of the Sphere with default radius 1. |
Result:
constructor_overload
| Name | Description |
|---|---|
| constructor_overload(radius) | Initializes a new instance of the Sphere class with specified radius. |
Parameters:
| Name | Type | Description |
|---|---|---|
| radius | Number | Radius. |
Result:
constructor_overload2
| Name | Description |
|---|---|
| constructor_overload2(radius, widthSegments, heightSegments) | Initializes a new instance of the Sphere class with specified radius, width segments and height segments. |
Parameters:
| Name | Type | Description |
|---|---|---|
| radius | Number | Radius of the sphere. |
| widthSegments | Number | Width segments. |
| heightSegments | Number | Height segments. |
Result:
constructor_overload3
| Name | Description |
|---|---|
| constructor_overload3(name, radius, widthSegments, heightSegments, phiStart, phiLength, thetaStart, thetaLength) | Initializes a new instance of the Sphere class. |
Parameters:
| Name | Type | Description |
|---|---|---|
| name | String | Name. |
| radius | Number | Radius of the sphere. |
| widthSegments | Number | Width segments. |
| heightSegments | Number | Height segments. |
| phiStart | Number | Phi start. |
| phiLength | Number | Phi length. |
| thetaStart | Number | Theta start. |
| thetaLength | Number | Theta length. |
Result:
getWidthSegments
| Name | Description |
|---|---|
| getWidthSegments() | Gets or sets the width segments. The width segments. |
Result:
setWidthSegments
| Name | Description |
|---|---|
| setWidthSegments(value) | Gets or sets the width segments. The width segments. |
Result:
getHeightSegments
| Name | Description |
|---|---|
| getHeightSegments() | Gets or sets the height segments. The height segments. |
Result:
setHeightSegments
| Name | Description |
|---|---|
| setHeightSegments(value) | Gets or sets the height segments. The height segments. |
Result:
getPhiStart
| Name | Description |
|---|---|
| getPhiStart() | Gets or sets the phi start. The phi start. |
Result:
setPhiStart
| Name | Description |
|---|---|
| setPhiStart(value) | Gets or sets the phi start. The phi start. |
Result:
getPhiLength
| Name | Description |
|---|---|
| getPhiLength() | Gets or sets the length of the phi. The length of the phi. |
Result:
setPhiLength
| Name | Description |
|---|---|
| setPhiLength(value) | Gets or sets the length of the phi. The length of the phi. |
Result:
getThetaStart
| Name | Description |
|---|---|
| getThetaStart() | Gets or sets the theta start. The theta start. |
Result:
setThetaStart
| Name | Description |
|---|---|
| setThetaStart(value) | Gets or sets the theta start. The theta start. |
Result:
getThetaLength
| Name | Description |
|---|---|
| getThetaLength() | Gets or sets the length of the theta. The length of the theta. |
Result:
setThetaLength
| Name | Description |
|---|---|
| setThetaLength(value) | Gets or sets the length of the theta. The length of the theta. |
Result:
getRadius
| Name | Description |
|---|---|
| getRadius() | Gets or sets the radius of the sphere. |
Result:
setRadius
| Name | Description |
|---|---|
| setRadius(value) | Gets or sets the radius of the sphere. |
Result:
getCastShadows
| Name | Description |
|---|---|
| getCastShadows() | Gets or sets whether this geometry can cast shadow |
Result:
setCastShadows
| Name | Description |
|---|---|
| setCastShadows(value) | Gets or sets whether this geometry can cast shadow |
Result:
getReceiveShadows
| Name | Description |
|---|---|
| getReceiveShadows() | Gets or sets whether this geometry can receive shadow. |
Result:
setReceiveShadows
| Name | Description |
|---|---|
| setReceiveShadows(value) | Gets or sets whether this geometry can receive shadow. |
Result:
getParentNodes
| Name | Description |
|---|---|
| getParentNodes() | Gets all parent nodes, an entity can be attached to multiple parent nodes for geometry instancing The nodes. |
Result:
getExcluded
| Name | Description |
|---|---|
| getExcluded() | Gets or sets whether to exclude this entity during exporting. |
Result:
setExcluded
| Name | Description |
|---|---|
| setExcluded(value) | Gets or sets whether to exclude this entity during exporting. |
Result:
getParentNode
| Name | Description |
|---|---|
| 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
| Name | Description |
|---|---|
| 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
| Name | Description |
|---|---|
| getScene() | Gets the scene that this object belongs to |
Result:
getName
| Name | Description |
|---|---|
| getName() | Gets or sets the name. The name. |
Result:
setName
| Name | Description |
|---|---|
| setName(value) | Gets or sets the name. The name. |
Result:
getProperties
| Name | Description |
|---|---|
| getProperties() | Gets the collection of all properties. |
Result:
toMesh
| Name | Description |
|---|---|
| toMesh() | Convert current object to mesh |
Result: Mesh
getBoundingBox
| Name | Description |
|---|---|
| getBoundingBox() | Gets the bounding box of current entity in its object space coordinate system. |
Result: Mesh
getEntityRendererKey
| Name | Description |
|---|---|
| getEntityRendererKey() | Gets the key of the entity renderer registered in the renderer |
Result: EntityRendererKey
removeProperty
| Name | Description |
|---|---|
| removeProperty(property) | Removes a dynamic property. |
Parameters:
| Name | Type | Description |
|---|---|---|
| property | Property | Which property to remove |
Result: boolean
removeProperty
| Name | Description |
|---|---|
| removeProperty(property) | Remove the specified property identified by name |
Parameters:
| Name | Type | Description |
|---|---|---|
| propert | String | null |
Result: boolean
getProperty
| Name | Description |
|---|---|
| getProperty(property) | Get the value of specified property |
Parameters:
| Name | Type | Description |
|---|---|---|
| property | String | Property name |
Result: Object
setProperty
| Name | Description |
|---|---|
| setProperty(property, value) | Sets the value of specified property |
Parameters:
| Name | Type | Description |
|---|---|---|
| property | String | Property name |
| value | Object | The value of the property |
Result: Object
findProperty
| Name | Description |
|---|---|
| findProperty(propertyName) | Finds the property. It can be a dynamic property (Created by CreateDynamicProperty/SetProperty) or native property(Identified by its name) |
Parameters:
| Name | Type | Description |
|---|---|---|
| propertyName | String | Property name. |
Result: Property