class WayspotAnchorServiceBase (Niantic.ARDK.AR.WayspotAnchors.WayspotAnchorServiceBase)

Overview

class WayspotAnchorServiceBase: IDisposable {
public:
    // fields

    ArdkEventHandler<LocalizationStateUpdatedArgs> LocalizationStateUpdated;

    // properties

    LocalizationFailureReason LocalizationFailureReason;
    LocalizationState LocalizationState;

    // methods

    async void CreateWayspotAnchors(
        Action<IWayspotAnchor[]> callback,
        params Matrix4x4[] localPoses
    );

    IWayspotAnchor[] CreateWayspotAnchors(params Matrix4x4[] localPoses);
    async Task<IWayspotAnchor[]> CreateWayspotAnchorsAsync(params Matrix4x4[] localPoses);
    void DestroyWayspotAnchors(params Guid[] ids);
    void DestroyWayspotAnchors(params IWayspotAnchor[] anchors);
    virtual void Dispose();
    IWayspotAnchor[] GetAllWayspotAnchors();
    IWayspotAnchor GetWayspotAnchor(Guid id);
    async void Restart();
    IWayspotAnchor[] RestoreWayspotAnchors(params WayspotAnchorPayload[] wayspotAnchorPayloads);
};

// direct descendants

class WayspotAnchorService;

Detailed Documentation

Fields

ArdkEventHandler<LocalizationStateUpdatedArgs> LocalizationStateUpdated

Called when the localization status has changed.

Properties

LocalizationFailureReason LocalizationFailureReason

The localization failure reason, if applicable.

LocalizationState LocalizationState

The current localization state of the WayspotAnchor service.

Methods

async void CreateWayspotAnchors(
    Action<IWayspotAnchor[]> callback,
    params Matrix4x4[] localPoses
)

Creates new wayspot anchors.

Parameters:

callback

The callback when the wayspot anchors have been created

localPoses

The positions and rotations used the create the wayspot anchors

async Task<IWayspotAnchor[]> CreateWayspotAnchorsAsync(params Matrix4x4[] localPoses)

Creates new wayspot anchors. The new wayspot anchor is tracked by default.

Parameters:

localPoses

The positions and rotations used the create the wayspot anchors

Returns:

The newly created wayspot anchors

void DestroyWayspotAnchors(params Guid[] ids)

Destroys wayspot anchors by ID.

Parameters:

ids

The IDs of the wayspot anchors to destroy

void DestroyWayspotAnchors(params IWayspotAnchor[] anchors)

Destroys existing wayspot anchors.

Parameters:

anchors

The wayspot anchors to destroy

virtual void Dispose()

Disposes of the Wayspot Anchor Service.

IWayspotAnchor[] GetAllWayspotAnchors()

Gets all of the wayspot anchors.

Returns:

All of the wayspot anchors

IWayspotAnchor GetWayspotAnchor(Guid id)

Gets a wayspot anchor by its ID.

Parameters:

id

The ID of the wayspot anchor to retrieve

Returns:

The wayspot anchor

async void Restart()

Restarts VPS.

IWayspotAnchor[] RestoreWayspotAnchors(params WayspotAnchorPayload[] wayspotAnchorPayloads)

Restores previously created wayspot anchors via their payloads.

注釈

Anchors will have 'WayspotAnchorStatusCode.Pending' status, where its Position and Rotation values are invalid, until they are resolved and reach 'WayspotAnchorStatusCode.Success' status.

Parameters:

wayspotAnchorPayloads

The payloads of the wayspot anchors to restore

Returns:

The restored wayspot anchors