S3MInstance

new Cesium.S3MInstance(context, index, ownerGroup, options)

S3M model instance object.
Name Type Description
context Context context object.
index Number The index position of the group where this instance belongs.
ownerGroup Object The group the instance belongs to.
options Object The object has the following properties:
Name Type Description
position Cartesian3 optional World location.
color Color optional Colour.
scale Cartesian3 optional Zoom.
hpr HeadingPitchRoll optional Rotation (radians).
feature Object optional Description.

Members

boundingSphere : BoundingSphere

Get or set the bounding ball of this instance.

readonlycolor : Color

Get the color of this instance.

readonlyfeature : Object

Get the description information of the instance.

readonlyhpr : HeadingPitchRoll

Get the rotation coefficient of this instance.

id : Number

Get or set the id of the instance.

index : Number

Get or set the index position of the instance.

isDeleted : Boolean

Get or set whether the instance is removed. The instance is removed when the value is true, and the instance is not removed when the value is false. The default value is false.

readonlyisSelected : Boolean

Get the selected state of the instance.

readonlyoffset : Cartesian3

Get the offset position of the model center point of this instance.

readonlyposition : Cartesian3

Get the instance location.

readonlyscale : Cartesian3

Get the zoom factor of this instance.

readonlytype : String

Get the type of instance object.

visible : Boolean

Get or set whether the instance is displayed

Methods

setSelected()

Set the instance as selected and highlight the instance.

setUnSelected()

Cancel the selected state of the instance.

updateColor(color)

Update the instance color.
Name Type Description
color Color The color value.

updateModelMatrix(matrix)

Update instance translation, rotation, and scaling parameters
Name Type Description
matrix Set up the matrix

updatePosition(position)

Update the instance location.
Name Type Description
position Cartesian3 World location.

updateRotation(hpr)

Update the instance rotation parameters.
Name Type Description
hpr HeadingPitchRoll Rotation parameters.

updateScale(scale)

Update the instance zoom factor.
Name Type Description
scale Cartesian3 Scaling parameters.