Class: BoxGraphics

BoxGraphics

new BoxGraphics(options)

Used to create 3D cube or rectangular prism classes. The center position and orientation are defined in the Entity.

Name Type Description
options Object optional

Objects containing the following attributes:

Name Type Default Description
show Property true optional

Boolean attribute, used to specify the visibility of the box.

dimensions Property optional

Cartesian3 attribute, specifying the length, width, and height of the box.

heightReference Property HeightReference.NONE optional

The HeightReference property specifies the relative reference height of the height in the Entity.

fill Property true optional

Boolean property, specifying whether to fill the box with the provided material.

material MaterialProperty Color.WHITE optional

Specify the properties of the material used to fill the box.

outline Property false optional

Boolean property, used to specify whether to display the box outline.

outlineColor Property Color.BLACK optional

Specify the Color attribute of the contour.

outlineWidth Property 1.0 optional

Specify the numerical attribute of the contour width.

shadows Property ShadowMode.DISABLED optional

Enumeration properties used to specify whether the box casts or receives shadows from each light source.

distanceDisplayCondition Property optional

Attribute, specifying how far the box is displayed from the camera.

Members

readonly definitionChangedEvent

Get events. This event is thrown when the value of a property or sub property is modified, or when the definition is modified.

dimensionsProperty

Get or set Cartesian3 properties. Used to specify the length, width, and height of the box.

distanceDisplayConditionProperty

Get or set the DistanceDisplayCondition property to specify how far the box should be displayed from the camera.

fillProperty

Get or set boolean property to specify whether to fill the box with the provided material.

Default Value:
true

heightReferenceProperty

Get or set the HeightReference property.

Default Value:
HeightReference.NONE

Get or set the MaterialProperty property to specify the material used to fill the box.

Default Value:
Color.WHITE

outlineProperty

Get or set Boolean properties to specify whether to display the box outline.

Default Value:
false

outlineColorProperty

Get or set the Color property to specify the color of the contour.

Default Value:
Color.BLACK

outlineWidthProperty

Get or set the number property to specify the contour width.

Default Value:
1.0

shadowsProperty

Gets or sets enumeration properties to specify whether the box casts or receives shadows from each light source.

Default Value:
ShadowMode.DISABLED

showProperty

Get the visibility of the box setting, of type boolean.

Default Value:
true

Methods

clone(result){BoxGraphics}

Copy instance

Name Type Description
result BoxGraphics optional

The object that stores the copied results

Returns:
Type Description
BoxGraphics If input parameters are provided, return the modified input parameter object. If no input parameters are provided, return a new instance.

merge(source)

Assign the attribute values corresponding to the source object to all unspecified attributes of this instance

Name Type Description
source BoxGraphics

Object providing attribute values