SpatialAnnotationTrackingOptions.Builder


class SpatialAnnotationTrackingOptions.Builder


Builder for SpatialAnnotationTrackingOptions.

Summary

Public constructors

Builder(
    imageBuffer: ByteBuffer,
    imageSize: IntSize2d,
    timestampNanos: Long
)

Public functions

SpatialAnnotationTrackingOptions

Builds a new SpatialAnnotationTrackingOptions instance.

SpatialAnnotationTrackingOptions.Builder

Sets the physical alignment behavior of the resulting 3D quad.

SpatialAnnotationTrackingOptions.Builder

Sets the pixel format encoding.

SpatialAnnotationTrackingOptions.Builder
setImageBuffer(imageBuffer: ByteBuffer)

Sets the raw image byte buffer from the camera frame.

SpatialAnnotationTrackingOptions.Builder
setImageSize(imageSize: IntSize2d)

Sets the 2D pixel dimensions of the image buffer.

SpatialAnnotationTrackingOptions.Builder

Sets the bounding quadrilaterals mapped to their unique tracking IDs.

SpatialAnnotationTrackingOptions.Builder
setRowStride(rowStride: Int)

Sets the row stride (bytes per row) of the image buffer.

SpatialAnnotationTrackingOptions.Builder
setTimestampNanos(timestampNanos: Long)

Sets the system timestamp in nanoseconds correlating to the camera frame, using the System.nanoTime clock base.

Public constructors

Builder

Added in 1.1.0-alpha01
Builder(
    imageBuffer: ByteBuffer,
    imageSize: IntSize2d,
    timestampNanos: Long
)
Parameters
imageBuffer: ByteBuffer

the raw image byte buffer from the camera frame

imageSize: IntSize2d

the 2D pixel dimensions of the image buffer

timestampNanos: Long

the system timestamp in nanoseconds correlating to the camera frame, using the System.nanoTime clock base

Public functions

build

Added in 1.1.0-alpha01
fun build(): SpatialAnnotationTrackingOptions

Builds a new SpatialAnnotationTrackingOptions instance.

Throws
IllegalStateException

if required fields were not explicitly set

setAlignment

Added in 1.1.0-alpha01
fun setAlignment(alignment: SpatialAnnotationQuadAlignment): SpatialAnnotationTrackingOptions.Builder

Sets the physical alignment behavior of the resulting 3D quad. Defaults to SCREEN.

setFormat

Added in 1.1.0-alpha01
fun setFormat(format: SpatialAnnotationImageFormat): SpatialAnnotationTrackingOptions.Builder

Sets the pixel format encoding. Defaults to RGBA.

setImageBuffer

Added in 1.1.0-alpha01
fun setImageBuffer(imageBuffer: ByteBuffer): SpatialAnnotationTrackingOptions.Builder

Sets the raw image byte buffer from the camera frame.

setImageSize

Added in 1.1.0-alpha01
fun setImageSize(imageSize: IntSize2d): SpatialAnnotationTrackingOptions.Builder

Sets the 2D pixel dimensions of the image buffer.

setQuads

Added in 1.1.0-alpha01
fun setQuads(quads: Map<SpatialAnnotationId, Quad>): SpatialAnnotationTrackingOptions.Builder

Sets the bounding quadrilaterals mapped to their unique tracking IDs.

setRowStride

Added in 1.1.0-alpha01
fun setRowStride(rowStride: Int): SpatialAnnotationTrackingOptions.Builder

Sets the row stride (bytes per row) of the image buffer.

setTimestampNanos

Added in 1.1.0-alpha01
fun setTimestampNanos(timestampNanos: Long): SpatialAnnotationTrackingOptions.Builder

Sets the system timestamp in nanoseconds correlating to the camera frame, using the System.nanoTime clock base.