Class: S3MInstance

S3MInstance

new S3MInstance(context, index, ownerGroup)

S3M model instance object.

Name Type Description
context Context

Context object.

index Number

The index position of the group where the instance is located.

ownerGroup Object

This instance belongs to the same group.

options.position Cartesian3 optional

World position.

options.color Color optional

Color.

options.scale Cartesian3 optional

Scaling.

options.hpr HeadingPitchRoll optional

Rotation (in radians).

options.offset Cartesian3 optional

Center point offset position

options.feature Object optional

Describe the information.

Members

boundingSphereBoundingSphere

Get or set the enclosing sphere of the instance

readonly colorColor

Get the color of this instance

readonly featureObject

Get the description information of the instance

readonly hprHeadingPitchRoll

Obtain the rotation coefficient of the instance

idNumber

Get or set the ID of the instance

indexNumber

Get or set the index position of the instance

isDeletedBoolean

Set or retrieve whether the instance has been deleted

readonly isSelectedBoolean

Get the selected status of the instance

localQuaternionQuaternion

Local rotation quaternion

localTransformMatrix4

Local transformation matrix (translation, rotation, scaling)

localTranslationCartesian3

Local translation vector

readonly offsetCartesian3

Obtain the offset position of the model center point for this instance

readonly positionCartesian3

Get the location of this instance

readonly scaleCartesian3

Obtain the scaling factor of the instance

type

Get the type of instance object

visibleBoolean

Get or set whether the instance is displayed

Methods

setSelected(offset)

Set the instance to selected status and highlight the instance

Name Type Description
offset Number

The index position of the group where the instance is located

setUnSelected(offset)

Cancel the selected status of this instance

Name Type Description
offset Number

The index position of the group where the instance is located

updateColor(color)

Update instance color

Name Type Description
color Color

Color value

updateModelMatrix()

Update instance translation, rotation, and scaling parameters

updatePosition(position)

Update instance location

Name Type Description
position Cartesian3

World Position

updateRotation(hpr)

Update instance rotation parameters

Name Type Description
hpr HeadingPitchRoll

rotation parameters

updateScale(scale)

Update instance scaling factor

Name Type Description
scale Cartesian3

Scaling parameters