Class AnchorSystem

Inheritance Relationships

Base Type

Class Documentation

class AnchorSystem : public csp::systems::SystemBase

Public facing system that allows interfacing with Magnopus Connected Services’ concept of an Anchor.

Offers methods for creating and deleting Anchors.

Asynchronous Calls

These are methods that perform WebClient calls and therefore operate asynchronously and require a callback to be passed for a completion result

void CreateAnchor(csp::systems::AnchorProvider ThirdPartyAnchorProvider, const csp::common::String &ThirdPartyAnchorId, const csp::common::String &AssetCollectionId, const csp::systems::GeoLocation &Location, const csp::systems::OlyAnchorPosition &Position, const csp::systems::OlyRotation &Rotation, const csp::common::Optional<csp::common::Map<csp::common::String, csp::common::String>> &SpatialKeyValue, const csp::common::Optional<csp::common::Array<csp::common::String>> &Tags, AnchorResultCallback Callback)

Creates a new Anchor.

Parameters
  • ThirdPartyAnchorProvidercsp::systems::AnchorProvider : the 3rd party used for the new anchor

  • ThirdPartyAnchorIdcsp::common::String : The ID of the new anchor in the 3rd party system

  • AssetCollectionId – : ID of the asset collection the new anchor is associated with

  • Locationcsp::systems::GeoLocation: the geographical location of the new Anchor

  • Positioncsp::systems::OlyAnchorPosition: the virtual position inside a space of the new Anchor

  • Rotation – csp::systems::OlyAnchorRotation: the rotation of the new Anchor

  • SpatialKeyValue – csp::common::StringMap : optional searchable SpatialKeyValue info to be associated with the Anchor Either the value or the key can be search for.

  • Tagscsp::common::Array<csp::common::String> : optional array of strings to add to the Anchor as tags

  • Callback – AnchorResultCallback : callback when asynchronous task finishes

void CreateAnchorInSpace(csp::systems::AnchorProvider ThirdPartyAnchorProvider, const csp::common::String &ThirdPartyAnchorId, const csp::common::String &SpaceId, uint64_t SpaceEntityId, const csp::common::String &AssetCollectionId, const csp::systems::GeoLocation &Location, const csp::systems::OlyAnchorPosition &Position, const csp::systems::OlyRotation &Rotation, const csp::common::Optional<csp::common::Map<csp::common::String, csp::common::String>> &SpatialKeyValue, const csp::common::Optional<csp::common::Array<csp::common::String>> &Tags, AnchorResultCallback Callback)

Creates a new Anchor in a space.

Parameters
  • ThirdPartyAnchorProvidercsp::systems::AnchorProvider : the 3rd party used for the new anchor

  • ThirdPartyAnchorIdcsp::common::String : The ID of the new anchor in the 3rd party system

  • SpaceIdcsp::common::String : The space that the new anchor is associated with

  • SpaceEntityId – uint64_t : The multiplayer object the new anchor is associated with

  • AssetCollectionId – : ID of the asset collection the new anchor is associated with

  • Locationcsp::systems::GeoLocation: the geographical location of the new Anchor

  • Positioncsp::systems::OlyAnchorPosition: the virtual position inside a space of the new Anchor

  • Rotation – csp::systems::OlyAnchorRotation: the rotation of the new Anchor

  • SpatialKeyValue – csp::common::StringMap : optional searchable SpatialKeyValue info to be associated with the Anchor Either the value or the key can be search for.

  • Tagscsp::common::Array<csp::common::String> : optional array of strings to add to the Anchor as tags

  • Callback – AnchorResultCallback : callback when asynchronous task finishes

void DeleteAnchors(const csp::common::Array<csp::common::String> &AnchorIds, NullResultCallback Callback)

Deletes a list of Anchors.

Parameters
void GetAnchorsInArea(const csp::systems::GeoLocation &OriginLocation, const double AreaRadius, const csp::common::Optional<csp::common::Array<csp::common::String>> &SpatialKeys, const csp::common::Optional<csp::common::Array<csp::common::String>> &SpatialValues, const csp::common::Optional<csp::common::Array<csp::common::String>> &Tags, const csp::common::Optional<bool> &AllTags, const csp::common::Optional<csp::common::Array<csp::common::String>> &SpaceIds, const csp::common::Optional<int> &Skip, const csp::common::Optional<int> &Limit, AnchorCollectionResultCallback Callback)

Retrieves an array with all the Anchors that are located inside the circular area defined by the parameters.

Parameters
void GetAnchorsInSpace(const csp::common::String &SpaceId, const csp::common::Optional<int> &Skip, const csp::common::Optional<int> &Limit, AnchorCollectionResultCallback Callback)

Retrieves an array with all the Anchors that are located inside the given space.

Parameters
  • SpaceIdcsp::common::String : id of the space to search within

  • Skip – int : optional Number of result entries that will be skipped from the result.

  • Limit – int : optional Maximum number of result entries to be retrieved. for all available result entries pass

  • Callback – AnchorCollectionResultCallback : callback when asynchronous task finishes

void GetAnchorsByAssetCollectionId(const csp::common::String &AssetCollectionId, const csp::common::Optional<int> &Skip, const csp::common::Optional<int> &Limit, AnchorCollectionResultCallback Callback)

Retrieves a list of Anchors that belong to the given AssetCollection.

Parameters
  • AssetCollectionIdcsp::common::String : id of the AssetCollection to filter by

  • Callback – AnchorCollectionResultCallback : callback when asynchronous task finishes

void CreateAnchorResolution(const csp::common::String &AnchorId, bool SuccessfullyResolved, int ResolveAttempted, double ResolveTime, const csp::common::Array<csp::common::String> &Tags, AnchorResolutionResultCallback Callback)

Creates a new AnchorResolution.

Parameters
  • AnchorIdcsp::common::String : Anchor Id to associate AnchorResolution with

  • SuccessfullyResolved – bool : Successfully resolved value for an anchor

  • ResolveAttempted – int : Number of resolve attempted for an anchor

  • ResolveTime – double : Resolve time of anchor in seconds

  • Tagscsp::common::Array<csp::common::String> : optional searchable Tags info associated with the AnchorResolution

  • Callback – AnchorResolutionResultCallback : callback when asynchronous task finishes