Class AnchorSystem
Defined in File AnchorSystem.h
Inheritance Relationships
Base Type
public csp::systems::SystemBase
(Class SystemBase)
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
ThirdPartyAnchorProvider – csp::systems::AnchorProvider : the 3rd party used for the new anchor
ThirdPartyAnchorId – csp::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
Location – csp::systems::GeoLocation: the geographical location of the new Anchor
Position – csp::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.
Tags – csp::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
ThirdPartyAnchorProvider – csp::systems::AnchorProvider : the 3rd party used for the new anchor
ThirdPartyAnchorId – csp::common::String : The ID of the new anchor in the 3rd party system
SpaceId – csp::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
Location – csp::systems::GeoLocation: the geographical location of the new Anchor
Position – csp::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.
Tags – csp::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
AnchorIds – csp::common::Array<csp::common::String> : List of Anchor IDs to be deleted
Callback – NullResultCallback : callback when asynchronous task finishes
-
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
OriginLocation – csp::systems::GeoLocation : latitude and longitude coordinates of the circular area origin
AreaRadius – double : radius from the circular area origin in meters
SpatialKeys – csp::common::Array<csp::common::String> : optional searchable SpatialKeys info associated with the Anchor
SpatialValues – csp::common::Array<csp::common::String> : optional searchable SpatialValues associated with the Anchor
Tags – csp::common::Array<csp::common::String> : optional searchable Tags info associated with the Anchor
AllTags – bool : optional flag to determine of all tags must be present in Anchor
SpaceIds – csp::common::Array<csp::common::String> : optional array of ids of spaces 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 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
SpaceId – csp::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
AssetCollectionId – csp::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
AnchorId – csp::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
Tags – csp::common::Array<csp::common::String> : optional searchable Tags info associated with the AnchorResolution
Callback – AnchorResolutionResultCallback : callback when asynchronous task finishes
-
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)