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

Anchor

Anchor

data class Anchor(var handle: Long, var uuid: UUID)
Represents a spatial anchor in a mixed reality environment.
Anchors are persistent spatial references that maintain their position relative to the physical environment. They can represent detected objects, planes, or user-defined points in space. Anchors can have various components (defined by SpaceComponentType) that provide different capabilities and information.

Constructors

NameSummary
Anchor
constructor(handle: Long, uuid: UUID)

Types

NameSummary
data class FetchOptions(var uuids: Array<UUID> = arrayOf(), var componentTypes: Array<Anchor.SpaceComponentType> = arrayOf())

Options for fetching anchors from the MR subsystem.
data class RoomLayout(var floor: UUID, var ceiling: UUID, var walls: Array<UUID>)

Represents the layout of a room detected in the physical environment.
enum SpaceComponentType : Enum<Anchor.SpaceComponentType>

Defines the types of components that can be associated with a space/anchor.
data class SpaceTriangleMesh(val vertices: Array<Vector3>, val indices: IntArray)

Represents a triangle mesh associated with an anchor.

Properties

NameSummary
handle
var handle: Long

Native handle to the underlying OpenXR space object
uuid
var uuid: UUID

Unique identifier for this anchor
Did you find this page helpful?
Thumbs up icon
Thumbs down icon