Skip to content
Select language:English

ARDK 1.5.6

class ARSession(val withOcclusion: Boolean = true, val withHdr: Boolean = false) : CameraSession

Manages the lifecycle and execution of an augmented reality tracking session.

Parameters

withOcclusion

Whether to enable occlusion detection.

withHdr

Whether to enable HDR mode.

Constructors

constructor(withOcclusion: Boolean = true, withHdr: Boolean = false)

Properties

Whether HDR mode is supported by the device.

Whether occlusion detection is supported by the device.

Pointer to the underlying native session state.

Whether HDR mode is enabled.

Whether occlusion detection is enabled.

Inherited properties

Desired minimum height, in pixels, of camera frames.

Desired minimum width, in pixels, of camera frames.

open override val port: Module.Port

Communication port inherited from the Module interface.

val rawPoses: SharedFlow<Sample<Trans3f>>

A stream of raw poses.

The current tracking state.

A stream of tracking updates.

Functions

open override fun dispose()

Disposes the session.

open override fun prepare(context: Any? = null)

Prepares the session for tracking.

fun setDisplayGeometry(width: Int, height: Int, rotation: Int)

Sets the display geometry.

Updates the session.

Inherited functions

fun attachMarker(markerInfo: MarkerInfo)

Attaches a marker to the session.

fun discardMarker(markerId: Int)

Discard the current detected marker.

Gets the ID of the camera texture.

fun link(module: Module)

Links a module to the session.

fun requestCameraFrame(callback: (reader: CameraFrameReader) -> Unit)

Requests a single camera frame and its associated spatial metadata.

fun requestCameraFrameMono(callback: (reader: CameraFrameReader) -> Unit)

This function is similar to requestCameraFrame, but it requests a monochromatic camera frame.

fun requestMarkers(callback: (state: DetectionState, markerId: Int, marker: Marker?) -> Unit)

Sets a callback to receive marker detection events.

fun setMarkerMountingThresholds(vertical: Float, horizontal: Float)

Sets the thresholds used to detect how a marker is mounted.

fun setMarkerRefining(count: Int, movement: Float)

Sets the refinement parameters for marker detection.

fun unlink(module: Module)

Unlinks a module from the session.

fun unlinkAll()

Unlinks all the previously linked modules.