# SpatialAnnotationTrackingOptions

Artifact: [androidx.xr.arcore:arcore](https://developer.android.com/jetpack/androidx/releases/xr-arcore) [View Source](https://cs.android.com/search?q=file:androidx/xr/arcore/SpatialAnnotationTrackingOptions.kt+class:androidx.xr.arcore.SpatialAnnotationTrackingOptions) Added in [1.1.0-alpha01](https://developer.android.com/jetpack/androidx/releases/xr-arcore#1.1.0-alpha01)

*** ** * ** ***


```
@ExperimentalSpatialAnnotationsApi
public final class SpatialAnnotationTrackingOptions
```

<br />

*** ** * ** ***

Configuration options required to start tracking Spatial Annotations.

Use the nested `https://developer.android.com/reference/androidx/xr/arcore/SpatialAnnotationTrackingOptions.Builder` to create an instance.

## Summary

| ### Nested types |
|---|
| `public final class https://developer.android.com/reference/androidx/xr/arcore/SpatialAnnotationTrackingOptions.Builder` Builder for `https://developer.android.com/reference/androidx/xr/arcore/SpatialAnnotationTrackingOptions`. |

| ### Public methods |
|---|---|
| `boolean` | `https://developer.android.com/reference/androidx/xr/arcore/SpatialAnnotationTrackingOptions#equals(kotlin.Any)(https://developer.android.com/reference/java/lang/Object.html other)` |
| `final @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/xr/arcore/SpatialAnnotationQuadAlignment` | `https://developer.android.com/reference/androidx/xr/arcore/SpatialAnnotationTrackingOptions#getAlignment()()` the requested tracking alignment |
| `final @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/xr/arcore/SpatialAnnotationImageFormat` | `https://developer.android.com/reference/androidx/xr/arcore/SpatialAnnotationTrackingOptions#getFormat()()` the format of the input image |
| `final @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/java/nio/ByteBuffer.html` | `https://developer.android.com/reference/androidx/xr/arcore/SpatialAnnotationTrackingOptions#getImageBuffer()()` the `https://developer.android.com/reference/java/nio/ByteBuffer.html` containing the input image data |
| `final @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/xr/runtime/math/IntSize2d` | `https://developer.android.com/reference/androidx/xr/arcore/SpatialAnnotationTrackingOptions#getImageSize()()` the `https://developer.android.com/reference/androidx/xr/runtime/math/IntSize2d` of the input image |
| `final @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/java/util/Map.html<@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/xr/arcore/SpatialAnnotationId, @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/xr/runtime/math/Quad>` | `https://developer.android.com/reference/androidx/xr/arcore/SpatialAnnotationTrackingOptions#getQuads()()` a map of `https://developer.android.com/reference/androidx/xr/arcore/SpatialAnnotationId`s to bounding quads |
| `final int` | `https://developer.android.com/reference/androidx/xr/arcore/SpatialAnnotationTrackingOptions#getRowStride()()` the row stride of the input image in bytes |
| `final long` | `https://developer.android.com/reference/androidx/xr/arcore/SpatialAnnotationTrackingOptions#getTimestampNanos()()` the system timestamp of the input image in nanoseconds, using the `https://developer.android.com/reference/java/lang/System.html#nanoTime()` clock base |
| `int` | `https://developer.android.com/reference/androidx/xr/arcore/SpatialAnnotationTrackingOptions#hashCode()()` |
| `@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/java/lang/String.html` | `https://developer.android.com/reference/androidx/xr/arcore/SpatialAnnotationTrackingOptions#toString()()` |

## Public methods

### equals

```
public boolean equals(Object other)
```

### getAlignment

Added in [1.1.0-alpha01](https://developer.android.com/jetpack/androidx/releases/xr-arcore#1.1.0-alpha01)

```
public final @NonNull SpatialAnnotationQuadAlignment getAlignment()
```

the requested tracking alignment

### getFormat

Added in [1.1.0-alpha01](https://developer.android.com/jetpack/androidx/releases/xr-arcore#1.1.0-alpha01)

```
public final @NonNull SpatialAnnotationImageFormat getFormat()
```

the format of the input image

### getImageBuffer

Added in [1.1.0-alpha01](https://developer.android.com/jetpack/androidx/releases/xr-arcore#1.1.0-alpha01)

```
public final @NonNull ByteBuffer getImageBuffer()
```

the `https://developer.android.com/reference/java/nio/ByteBuffer.html` containing the input image data

### getImageSize

Added in [1.1.0-alpha01](https://developer.android.com/jetpack/androidx/releases/xr-arcore#1.1.0-alpha01)

```
public final @NonNull IntSize2d getImageSize()
```

the `https://developer.android.com/reference/androidx/xr/runtime/math/IntSize2d` of the input image

### getQuads

Added in [1.1.0-alpha01](https://developer.android.com/jetpack/androidx/releases/xr-arcore#1.1.0-alpha01)

```
public final @NonNull Map<@NonNull SpatialAnnotationId, @NonNull Quad> getQuads()
```

a map of `https://developer.android.com/reference/androidx/xr/arcore/SpatialAnnotationId`s to bounding quads

### getRowStride

Added in [1.1.0-alpha01](https://developer.android.com/jetpack/androidx/releases/xr-arcore#1.1.0-alpha01)

```
public final int getRowStride()
```

the row stride of the input image in bytes

### getTimestampNanos

Added in [1.1.0-alpha01](https://developer.android.com/jetpack/androidx/releases/xr-arcore#1.1.0-alpha01)

```
public final long getTimestampNanos()
```

the system timestamp of the input image in nanoseconds, using the `https://developer.android.com/reference/java/lang/System.html#nanoTime()` clock base

### hashCode

```
public int hashCode()
```

### toString

```
public @NonNull String toString()
```