API reference
API reference
Select your platform
No SDKs available
No versions available

PanelSceneObject

PanelSceneObject

class PanelSceneObject : SceneObject

Constructors

NameSummary
PanelSceneObject
constructor(scene: Scene?, ctx: SpatialContext, intent: <Error class: unknown class>, ent: Entity?, config: PanelConfigOptions = PanelConfigOptions(), displayCreator: (ctx: SpatialContext, panelSurface: PanelSurface, <Error class: unknown class>, config: PanelConfigOptions) -> PanelDisplay = { ctx_, panelSurface_, intent_, config_ -> PanelDisplay(ctx_, panelSurface_, config_.calcDPI(), intent = intent_) })constructor(scene: Scene?, ctx: SpatialContext, id: Class<*>?, ent: Entity?, config: PanelConfigOptions = PanelConfigOptions(), displayCreator: (ctx: SpatialContext, panelSurface: PanelSurface, <Error class: unknown class>, config: PanelConfigOptions) -> PanelDisplay = { ctx_, panelSurface_, intent_, config_ -> PanelDisplay(ctx_, panelSurface_, config_.calcDPI(), intent = intent_) })constructor(scene: Scene?, ctx: SpatialContext, ent: Entity?, config: PanelConfigOptions = PanelConfigOptions(), getView: (<Error class: unknown class>) -> <Error class: unknown class>, displayCreator: (ctx: SpatialContext, panelSurface: PanelSurface, getView: (<Error class: unknown class>) -> <Error class: unknown class>, config: PanelConfigOptions) -> PanelDisplay = { ctx_, panelSurface_, getView_, config_ -> PanelDisplay( ctx_, panelSurface_, config_.calcDPI(), getView = getView_, themeResourceId = config_.themeResourceId, ) })constructor(scene: Scene?, ctx: SpatialContext, id: Int, ent: Entity?, config: PanelConfigOptions = PanelConfigOptions(), displayCreator: (ctx: SpatialContext, panelSurface: PanelSurface, getView: (<Error class: unknown class>) -> <Error class: unknown class>, config: PanelConfigOptions) -> PanelDisplay = { ctx_, panelSurface_, getView_, config_ -> PanelDisplay( ctx_, panelSurface_, config_.calcDPI(), getView = getView_, themeResourceId = config_.themeResourceId, ) })constructor(scene: Scene?, ent: Entity?, config: PanelConfigOptions = PanelConfigOptions())

Types

NameSummary
Companion
object Companion

Properties

NameSummary
entity
val entity: Entity?
handle
var handle: Long
mesh
var mesh: SceneMesh?
rootView
val rootView: <Error class: unknown class>?

Functions

NameSummary
addInputListener
fun addInputListener(listener: InputListener): Long
Add an input listener to this SceneObject.
attachDisplay
fun attachDisplay(ctxt: SpatialContext, clickButtons: Int, displayCreator: (PanelSurface) -> PanelDisplay)
destroy
fun destroy()
Destory this SceneObject.
destroyInternal
open override fun destroyInternal()
Destroy this SceneObject’s native components.
detachDisplay
fun detachDisplay()
getLayer
fun getLayer(): SceneLayer?
getPanelShapeConfig
fun getPanelShapeConfig(): PanelShapeConfig
getSurface
fun getSurface(): <Error class: unknown class>
getSwapchain
fun getSwapchain(): SceneSwapchain?
getTexture
fun getTexture(): SceneTexture?
onClick
open fun onClick(hitInfo: HitInfo, sourceOfInput: Entity)
Handler for clicks on this SceneObject.
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
open override fun onInput(hitInfo: HitInfo, sourceOfInput: Entity, changed: Int, clicked: Int, downTime: Long): Boolean
Handler to handle generic input.
onPointerEvent
open override fun onPointerEvent(hitInfo: HitInfo, type: Int, sourceOfInput: Entity)
Handler to handle pointer events on this SceneObject.
removeInputListener
fun removeInputListener(id: Long)
Remove an input listener by id.
reshape
fun reshape(shapeConfig: PanelShapeConfig)
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 override 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 override 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

Companion

object Companion
Did you find this page helpful?
Thumbs up icon
Thumbs down icon