Class: S3MInstance

S3MInstance

new S3MInstance(context, index, ownerGroup)

S3M模型实例对象。

Name Type Description
context Context

context对象。

index Number

该实例所在组的索引位置。

ownerGroup Object

该实例所在组。

options.position Cartesian3 可选

世界位置。

options.color Color 可选

颜色。

options.scale Cartesian3 可选

缩放。

options.hpr HeadingPitchRoll 可选

旋转(弧度)。

options.offset Cartesian3 可选

中心点偏移位置

options.feature Object 可选

描述信息。

Members

boundingSphereBoundingSphere

获取或者设置该实例的包围球

readonly colorColor

获取该实例的颜色

readonly featureObject

获取该实例的描述信息

readonly hprHeadingPitchRoll

获取该实例的旋转系数

idNumber

获取或者设置该实例的id

indexNumber

获取或者设置该实例的索引位置

isDeletedBoolean

设置或者获取该实例是否被删除

readonly isSelectedBoolean

获取该实例的选中状态

localQuaternionQuaternion

局部旋转四元数

localTransformMatrix4

局部变换矩阵(平移旋转缩放)

localTranslationCartesian3

局部平移向量

readonly offsetCartesian3

获取该实例的模型中心点偏移位置

readonly positionCartesian3

获取该实例位置

readonly scaleCartesian3

获取该实例的缩放系数

visibleBoolean

获取或者设置该实例是否显示

Methods

setSelected(offset)

设置该实例为选中状态并高亮实例

Name Type Description
offset Number

该实例所在组的索引位置

setUnSelected(offset)

取消该实例的选中状态

Name Type Description
offset Number

该实例所在组的索引位置

updateColor(color)

更新实例颜色

Name Type Description
color Color

颜色值

updateModelMatrix()

更新实例平移、旋转、缩放参数

updatePosition(position)

更新实例位置

Name Type Description
position Cartesian3

世界位置

updateRotation(hpr)

更新实例旋转参数

Name Type Description
hpr HeadingPitchRoll

旋转参数

updateScale(scale)

更新实例缩放系数

Name Type Description
scale Cartesian3

缩放参数