Name | Summary |
---|---|
SceneObject |
Name | Summary |
---|---|
Companion | object Companion |
Name | Summary |
---|---|
entity | val entity: Entity? |
handle | var handle: Long |
materials | var materials: Array<SceneMaterial>? |
mesh | var mesh: SceneMesh? |
Name | Summary |
---|---|
addInputListener | fun addInputListener(listener: InputListener): Long Add an input listener to this SceneObject. |
destroy | fun destroy() Destory this SceneObject. |
destroyInternal | open fun destroyInternal() Destroy this SceneObject’s native components. |
onClick | |
onClickDown | |
onHoverStart | open fun onHoverStart(sourceOfInput: Entity) Handler for the start of hovers on this SceneObject. |
onHoverStop | open fun onHoverStop(sourceOfInput: Entity) Handler for the termination of hovers on this SceneObject. |
onInput | |
onPointerEvent | |
removeInputListener | fun removeInputListener(id: Long) Remove an input listener by id. |
setIsVisible | fun setIsVisible(isVisible: Boolean) Set whether this SceneObject is visible. |
setLocalNodePose | fun setLocalNodePose(node: Int, pose: Pose) Sets the local transform of the node (relative to it’s parent) to the input pose |
setPosition | fun setPosition(position: Vector3) fun setPosition(x: Float, y: Float, z: Float) Set the 3D position of this SceneObject. |
setRotation | fun setRotation(pitch: Float, yaw: Float, roll: Float) Set the rotation of this SceneObjecgt. |
setRotationQuat | fun setRotationQuat(quat: Quaternion) fun setRotationQuat(x: Float, y: Float, z: Float, w: Float) Set the rotation of this SceneObject. |
setScale | open fun setScale(scale: Vector3) Set the scale of the model. The default value is 1.0f. |
setSceneMesh | open fun setSceneMesh(mesh: SceneMesh, name: String) Set the mesh for this SceneObject. |
shouldFrustumCull | fun shouldFrustumCull(cull: Boolean) Whether this SceneObject can be frustum culled (default is true) |
stopInput | open fun stopInput(sourceOfInput: Entity, downTime: Long) Stop receiving input from another entity for a given amount of time. |
updateAnimationTrackToTime | fun updateAnimationTrackToTime(track: Int, timeInSeconds: Float) Update the local transforms of the model to match the given animation track at the specified time (matching keyframe time in the glTF). |
updateNodeLocalPoseToObjectPose | fun updateNodeLocalPoseToObjectPose(node: Int, pose: Pose) Sets the local transform of a node (relative to it’s parent) such that the resulting object transform (relative to the model) is placed at the input pose |
updateSceneMesh | fun updateSceneMesh(meshModifier: SceneMesh.() -> Unit) Modify and update this SceneObject’s mesh. |