S3MInstanceCollection

new Cesium.S3MInstanceCollection(context)

S3M instantiated model collection class.
Name Type Description
context Context Object.

Members

clampToObject : Boolean

Gets or sets whether the layer is attached to the object. The default value is false.

readonlygroup : Object

Get all the model groups for this layer.

maxVisibleAltitude : Number

Gets or sets the maximum visible height of the layer

maxVisibleDistance : Number

Get or set the maximum visible distance of the layer

readonlytype : String

Get the layer type identifier.

visible : Boolean

Gets or sets the visibility of this layer.

Methods

add(url, attrs, data, streamBytes)

Add one or a set of instances.
Name Type Default Description
url String optional Model url.
attrs Object | Array optional Instance property or instance property collection.
Name Type Default Description
position Cartesian3 optional World location.
color Color Color.WHITE optional colour.
scale Cartesian3 new Cartesian3(1,1,1) optional xyz scaling.
offset Cartesian3 new Cartesian3(0,0,0) optional Center point offset position.
hpr HeadingPitchRoll new HeadingPitchRoll() optional Rotate.
data Blob | ArrayBuffer | Object optional Stream data
streamBytes Boolean true optional Whether to intercept the first four bytes.

getInstance(url, id)boolean

The instance object S3MInstance is obtained by ID.
Name Type Description
url String The url of the instance object.
id Number The id of the instance object
Returns:
Whether the removal is successful, the value is true, the removal is successful, and the value is false, the removal fails.

getVisibleInViewport(index)boolean

Gets the object where the specified split screen window is located.
Name Type Description
index Number Viewport index value, which ranges from 0 to 3.
Returns:
Visible Viewport visibility.

removeCollection(url)boolean

Remove all instance objects corresponding to the url.
Name Type Description
url String The url of the model.
Returns:
Whether the removal is successful, the value is true, the removal is successful, and the value is false, the removal fails.

removeInstance(url, ids)boolean

Remove the instance object corresponding to the id specified by the url model.
Name Type Description
url String The url of the model.
ids Array List of instance object ids.
Returns:
Whether the removal is successful, the value is true, the removal is successful, and the value is false, the removal fails.

setCullEnabled(url, cullFace)

Set up single-sided rendering.
Name Type Description
url String The url of the model.
cullFace boolean Whether to enable single-sided rendering.

setUnSelected()

Cancel the selected state of all instances.

setVisibleInViewport(index, visible)

Set which split screen window the object is displayed in.
Name Type Description
index Number Viewport index value, which ranges from 0 to 3.
visible boolean Viewport visibility.

update(frameState)

Do not call this function directly.

Name Type Description
frameState