Name | Summary |
---|---|
Scene | constructor(handle: Long) |
Name | Summary |
---|---|
Companion | object Companion |
Name | Summary |
---|---|
handle | val handle: Long |
Name | Summary |
---|---|
addObject | fun addObject(ro: SceneObject) Add a SceneObject to this Scene. |
createCylinderLayer | fun createCylinderLayer(sceneSwapChain: SceneSwapchain, radius: Float, centralAngle: Float, aspectRatio: Float, pivotX: Float, pivotY: Float, stereoMode: StereoMode, sceneObject: SceneObject): Int Create a Layer that is shaped like a cylinder. |
createEquirectLayer | fun createEquirectLayer(sceneSwapChain: SceneSwapchain, radius: Float, centralHorizontalAngle: Float, upperVerticalAngle: Float, lowerVerticalAngle: Float, pivotX: Float, pivotY: Float, stereoMode: StereoMode, sceneObject: SceneObject): Int Create a Layer that maps equirectangular images onto a sphere. |
createQuadLayer | fun createQuadLayer(sceneSwapChain: SceneSwapchain, dimW: Float, dimH: Float, pivotX: Float, pivotY: Float, stereoMode: StereoMode, sceneObject: SceneObject): Int Create a Layer that is shaped like a quad. |
destroyObject | fun destroyObject(ro: SceneObject) Remove and destroy a SceneObject from this Scene. |
discoverSpaces | fun discoverSpaces(fetchOptions: Anchor.FetchOptions): CompletableFuture<Array<Anchor>> Find all the space. |
drawDebugLine | |
enableEnvironmentDepth | fun enableEnvironmentDepth(enabled: Boolean) Experimental: Enable environment depth. May not work. |
enableHolePunching | fun enableHolePunching(enabled: Boolean) Tells the renderer to render the quad layers before the main scene and the main scene is resonsible for writing out alpha values to reveal the panels. For more details, see this technical explanation. |
enableMrPlaneTracker | fun enableMrPlaneTracker(enabled: Boolean) Enable the MR plane tracker. |
enablePassthrough | fun enablePassthrough(enabled: Boolean) Enable pass through of the real world into the scene. |
enableVirtualCamera | fun enableVirtualCamera(enable: Boolean) Enable the virtual camera. |
getAnchorBoundary2D | fun getAnchorBoundary2D(anchorHandle: Long): Array<Vector2> Get the 3D boundary of an anchor. |
getAnchorBoundingBox2D | fun getAnchorBoundingBox2D(anchorHandle: Long): Bound2D? Get the 2D bounding box of an anchor. |
getAnchorBoundingBox3D | fun getAnchorBoundingBox3D(anchorHandle: Long): Bound3D? Get the 3D bounding box for an anchor. |
getAnchorPose | |
getAnchorSemanticLabels | fun getAnchorSemanticLabels(index: Int): String Get the semantic labels for an anchor by index. fun getAnchorSemanticLabels(anchorHandle: Long): List<String> Get the semantic lables for an anchor. |
getConfirmedFrameRate | fun getConfirmedFrameRate(): Float |
getLightingEstimate | |
getNumberOfObjects | fun getNumberOfObjects(): Int Get the number of SceneObjects in the scene. |
getSessionStartPose | fun getSessionStartPose(): Pose Returns the pose that was set at the beginning of the session. This is useful for setting the starting position of entities so that they are placed relative to the user. |
getSpaceContainer | fun getSpaceContainer(anchorHandle: Long): Array<UUID> Get the space continer from an anchor. |
getSpaceRoomLayout | fun getSpaceRoomLayout(anchorHandle: Long): Anchor.RoomLayout Get the RoomLayout from an anchor handle. |
getSpaceTriangleMesh | fun getSpaceTriangleMesh(anchorHandle: Long): Anchor.SpaceTriangleMesh Get the space triangle mesh associated with an anchor handle. |
getViewerPose | fun getViewerPose(): Pose Get the viewer’s pose in the Scene. |
getViewOrigin | fun getViewOrigin(): Vector3 Get the position of the viewer, referred to as the view origin. This is returned in the current reference space. |
getViewSceneRotation | fun getViewSceneRotation(): Float Get the last rotation of the viewer. |
hasObject | fun hasObject(ro: SceneObject): Boolean Check if a SceneObject is part of this Scene. |
isSystemPassthroughEnabled | fun isSystemPassthroughEnabled(): Boolean Is the passthrough system enabled. Returns true if the app is launched in passthrough mode and false if in immersive mode. This value is set at the app launch and will not change during the app’s lifetime. |
lineSegmentIntersect | |
loadRenderModelMesh | fun loadRenderModelMesh(path: String): SceneMesh? Load a render model mesh given a path to a device. This uses the XR_FB_render_model OpenXR extension. |
onClick | |
onHoverStart | fun onHoverStart(sceneObjectHandle: Long, sourceOfInput: Entity) Handler for when a pointer start to hover over a SceneObject. |
onHoverStop | fun onHoverStop(sceneObjectHandle: Long, sourceOfInput: Entity) Handler for when a pointer stops hovering over a SceneObject. |
onInput | |
onNoIntersectionInput | fun onNoIntersectionInput(sourceOfInput: Entity, changedIn: Int, clickedIn: Int) Handler for when we receive input that does not intersect with any SceneObjects. |
playBackgroundSound | fun playBackgroundSound(soundAsset: SceneAudioAsset, volume: Float, looping: Boolean) Plays a sound which attached to the user pose, there is ony one background sound. The sound equivalent to an environment box |
playSound | fun playSound(soundAsset: SceneAudioAsset, volume: Float = 1.0f) Plays a sound which is attached to the user pose fun playSound(soundAsset: SceneAudioAsset, position: Vector3, volume: Float = 1.0f) Plays a sound within the 3d environment. The sound spatialization will update depending on head movement. fun playSound(soundfile: SceneAudioAsset, entity: Entity, volume: Float = 1.0f, looping: Boolean = false) Plays a sound within the 3d environment. The sound spatialization will update depending on head movement |
processQueries | fun processQueries(dataModel: DataModel): Boolean Process queries on a data model. |
rayArcIntersect | |
removeLayer | fun removeLayer(id: Int) Remove a Layer form the Scene. |
requestSceneCapture | fun requestSceneCapture(): CompletableFuture<Unit> Request scene capture. |
resetSessionStartPose | fun resetSessionStartPose() This function resets the session start pose to the current pose. This can be used to reset the session start pose when the user moves around. |
setDepthParams | fun setDepthParams(minDepth: Float, maxDepth: Float) Set the depth parameters on the Scene. |
setLayerAlphaBlend | fun setLayerAlphaBlend(id: Int, srcFactorColor: Int, dstFactorColor: Int, srcFactorAlpha: Int, dstFactorAlpha: Int) Set the alpha blend factors on a Layer. The integers correspond to the different layer alpha blend factors. |
setLayerClip | fun setLayerClip(id: Int, minLeftU: Float, minLeftV: Float, maxLeftU: Float, maxLeftV: Float, minRightU: Float = minLeftU, minRightV: Float = minLeftV, maxRightU: Float = maxLeftU, maxRightV: Float = maxLeftV) Set clip bounds on a Layer in UV space. |
setLayerColorScaleBias | fun setLayerColorScaleBias(id: Int, scaleR: Float, scaleG: Float, scaleB: Float, scaleA: Float, biasR: Float, biasG: Float, biasB: Float, biasA: Float) Set the scale and bias on the color of a Layer. |
setLayerScale | fun setLayerScale(id: Int, x: Float, y: Float, z: Float) Set the scale of a Layer in the Scene. |
setLayerSecure | fun setLayerSecure(id: Int, secureLayer: Boolean) When set to true ensures the layer can not be copied or captured by other apps. |
fun setLayerZIndex(id: Int, zIndex: Int) Set a Layer’s Z index in depth ordering (default 0). If layers have the same z index, we will try to sort by distance to viewer. | |
setLightingEnvironment | |
setPassthroughLUT | fun setPassthroughLUT(lut: Lut?) Sets a custom lookup table for color grading passthrough rendering. The LUT contains a 256x16 Int array. Passing null will remove any existing LUT, resetting passthrough to default colors. |
setPreferredDisplayRate | fun setPreferredDisplayRate(rate: Float): Boolean Set the preferred display rate. |
setReferenceSpace | fun setReferenceSpace(space: ReferenceSpace) Sets the current OpenXR reference space. This may be wanted if you are working on a Mixed Reality vs purely Virtual Reality app. |
setSecureLayers | fun setSecureLayers(secureLayers: Boolean) When set to true ensures the layers can not be copied or captured by other apps. |
setSkipRender | fun setSkipRender(skipRender: Boolean) UNSTABLE API. When set to true skips the rendering of the scene |
setSpaceComponentStatus | fun setSpaceComponentStatus(anchorHandle: Long, type: Anchor.SpaceComponentType, enable: Boolean, timeoutNs: Long = 0): CompletableFuture<Void> Set the component status of a space. |
setViewOrigin | fun setViewOrigin(x: Float, y: Float, z: Float) fun setViewOrigin(x: Float, y: Float, z: Float, degRotation: Float) Set the position of the view, referred to as the view origin. |
setVirtualCameraPose | fun setVirtualCameraPose(pose: Pose) Set the virtual camera pose. |
startLightEstimation | fun startLightEstimation() Start estimation of light in the scene. |
stopBackgroundSound | fun stopBackgroundSound() Stop playing the background sound. |
stopLightEstimation | fun stopLightEstimation() Stop the light estimation in the Scene. |
tickMRScene | fun tickMRScene() Process one tick of the Scene. |
updateCylinderLayer | fun updateCylinderLayer(id: Int, radius: Float, centralAngle: Float, aspectRatio: Float, pivotX: Float, pivotY: Float, stereoMode: Int) Update a cylinder layer with new parameters. |
updateEquirectLayer | fun updateEquirectLayer(id: Int, radius: Float, centralHorizontalAngle: Float, upperVerticalAngle: Float, lowerVerticalAngle: Float, pivotX: Float, pivotY: Float, stereoMode: Int) Update an equirectangular layer with new parameters. |
updateIBLEnvironment | fun updateIBLEnvironment(envFilename: String) Update IBL environment with an image filename. |
updateQuadLayer | fun updateQuadLayer(id: Int, dimW: Float, dimH: Float, pivotX: Float, pivotY: Float, stereoMode: Int) Update a quad layer with new parameters. |
updateViewOrigin | fun updateViewOrigin(deltaMove: Float, deltaRotation: Float) Update the view origin with a rotation and a radial distance. |