S3MInstance

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

S3M模型实例对象。
Name Type Description
context Context context对象。
index Number 该实例所在组的索引位置。
ownerGroup Object 该实例所在组。
options Object 对象具有以下属性:
Name Type Description
position Cartesian3 optional 世界位置。
color Color optional 颜色。
scale Cartesian3 optional 缩放。
hpr HeadingPitchRoll optional 旋转(弧度)。
feature Object optional 描述信息。

Members

boundingSphere : BoundingSphere

Gets or sets the bounding sphere of the instance.

readonlycolor : Color

Get the color of the instance.

readonlyfeature : Object

Get the description of the instance.

readonlyhpr : HeadingPitchRoll

Get the rotation coefficient of this instance.

id : Number

Gets or sets the id of this instance.

index : Number

Gets or sets the index position of this instance.

isDeleted : Boolean

Gets or sets whether the instance is removed. When the value is true, the instance is removed. If the value is false, the instance is not removed. The default value is false.

readonlyisSelected : Boolean

Get the selected state of the instance.

readonlyoffset : Cartesian3

Get the model center point offset position for this instance.

readonlyposition : Cartesian3

Get the instance location.

readonlyscale : Cartesian3

Get the scaling factor for this instance.

readonlytype : String

Get the type of the instance object.

visible : Boolean

Get or set whether the instance is displayed

Methods

setSelected()

Set the instance to be selected and highlight the instance.

setUnSelected()

取消该实例的选中状态。

updateColor(color)

更新实例颜色。
Name Type Description
color Color 颜色值。

updatePosition(position)

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

updateRotation(hpr)

更新实例旋转参数。
Name Type Description
hpr HeadingPitchRoll 旋转参数。

updateScale(scale)

更新实例缩放系数。
Name Type Description
scale Cartesian3 Scale the parameters.