Class SpatialAnchorStore
Spatial mapping observer.
Namespace: Evergine.Framework.XR.SpatialAnchors
Assembly: Evergine.Framework.dll
Syntax
public abstract class SpatialAnchorStore
Properties
IsSupported
Gets a value indicating whether spatial mapping is supported.
Declaration
public abstract bool IsSupported { get; }
Property Value
Type | Description |
---|---|
bool |
SavedAnchors
Gets the saved spatial anchors.
Declaration
public abstract IReadOnlyDictionary<string, SpatialAnchor> SavedAnchors { get; }
Property Value
Type | Description |
---|---|
IReadOnlyDictionary<string, SpatialAnchor> |
Methods
CreateSpatialAnchor(Vector3)
Creates a spatial anchor.
Declaration
public abstract SpatialAnchor CreateSpatialAnchor(Vector3 position)
Parameters
Type | Name | Description |
---|---|---|
Vector3 | position | The anchor's position. |
Returns
Type | Description |
---|---|
SpatialAnchor | A new spatial anchor. |
CreateSpatialAnchor(Vector3, Quaternion)
Creates a spatial anchor.
Declaration
public abstract SpatialAnchor CreateSpatialAnchor(Vector3 position, Quaternion orientation)
Parameters
Type | Name | Description |
---|---|---|
Vector3 | position | The anchor's position. |
Quaternion | orientation | The anchor's orientation. |
Returns
Type | Description |
---|---|
SpatialAnchor | The new spatial anchor. |
Destroy()
Destroys all resources of this instance.
Declaration
protected virtual void Destroy()
Dispose()
Public implementation of the Dispose pattern, callable by consumers.
Declaration
public void Dispose()
Dispose(bool)
Protected implementation of the Dispose pattern.
Declaration
protected virtual void Dispose(bool disposing)
Parameters
Type | Name | Description |
---|---|---|
bool | disposing | Disposes of native elements. |
~SpatialAnchorStore()
Finalizes an instance of the SpatialAnchorStore class.
Declaration
protected ~SpatialAnchorStore()
Initialize()
Initializes this instance.
Declaration
public abstract void Initialize()
RemoveAllAnchors()
Removes all stored anchors.
Declaration
public abstract void RemoveAllAnchors()
RemoveAnchor(string)
Removes a spatial anchor.
Declaration
public abstract void RemoveAnchor(string id)
Parameters
Type | Name | Description |
---|---|---|
string | id | The anchor ID. |
StoreAnchor(string, SpatialAnchor)
Stores a spatial anchor in this store.
Declaration
public abstract bool StoreAnchor(string id, SpatialAnchor spatialAnchor)
Parameters
Type | Name | Description |
---|---|---|
string | id | The identifier of the anchor. |
SpatialAnchor | spatialAnchor | The spatial anchor to store. |
Returns
Type | Description |
---|---|
bool | True if the anchor has been stored successfully. |