FirstModulAR 0.1.0
Loading...
Searching...
No Matches
OVRAnchorProvider Class Reference

Anchor provider for Oculus XR, allows for the creation and management of anchors. Uses player preferences for storage of anchor references, this is how Meta officially recommends storing anchors via their documentation. More...

Inheritance diagram for OVRAnchorProvider:
AnchorProvider

Public Member Functions

override void Awake ()
 Initializes the singleton instance of the anchor provider.
 
override void CreateAnchor (Pose pose, Action< string > OnCompleted)
 
override void DestroyAnchor (string id)
 Destroys the anchor with the specified ID.
 
void Update ()
 Updates the anchors.
 
void Start ()
 Starts the anchor provider.
 
override bool TryGetAnchor (string id, out FMARAnchor anchor)
 Tries to get the anchor with the specified ID.
 
void LoadAnchorsByUuid ()
 Loads the anchors by UUID.
 
override FMARAnchor[] GetAllAnchors ()
 Gets all anchors.
 
override bool TryGetClosestAnchor (Vector3 position, float radius, out FMARAnchor anchor)
 Tries to get the closest anchor.
 
- Public Member Functions inherited from AnchorProvider
void CreateAnchor (Pose pose, Action< string > OnCompleted=null)
 Creates an anchor at the specified pose.
 
void DestroyAnchor (string id)
 Destroys the anchor with the specified ID.
 
bool TryGetAnchor (string id, out FMARAnchor anchor)
 Tries to get the anchor with the specified ID.
 
bool TryGetClosestAnchor (Vector3 position, float radius, out FMARAnchor anchor)
 Tries to get the closest anchor to the specified position within a given radius.
 
FMARAnchor[] GetAllAnchors ()
 Gets all anchors managed by the provider.
 
virtual void OnDestroy ()
 Cleans up the singleton instance when the provider is destroyed.
 

Properties

override bool Ready [get]
 
- Properties inherited from AnchorProvider
static AnchorProvider Instance [get]
 
bool Ready [get]
 Gets a value indicating whether the provider is ready to create and manage anchors.
 

Additional Inherited Members

- Static Public Attributes inherited from AnchorProvider
static Action OnAnchorsUpdated
 
static Action OnAnchorAdded
 
static Action OnAnchorRemoved
 

Detailed Description

Anchor provider for Oculus XR, allows for the creation and management of anchors. Uses player preferences for storage of anchor references, this is how Meta officially recommends storing anchors via their documentation.

Member Function Documentation

◆ Awake()

override void OVRAnchorProvider.Awake ( )
inlinevirtual

Initializes the singleton instance of the anchor provider.

Reimplemented from AnchorProvider.

◆ CreateAnchor()

override void OVRAnchorProvider.CreateAnchor ( Pose pose,
Action< string > OnCompleted )
inline

◆ DestroyAnchor()

override void OVRAnchorProvider.DestroyAnchor ( string id)
inline

Destroys the anchor with the specified ID.

Parameters
idThe ID of the anchor to destroy.

◆ GetAllAnchors()

override FMARAnchor[] OVRAnchorProvider.GetAllAnchors ( )
inline

Gets all anchors.

Returns
All anchors.

◆ LoadAnchorsByUuid()

void OVRAnchorProvider.LoadAnchorsByUuid ( )
inline

Loads the anchors by UUID.

◆ Start()

void OVRAnchorProvider.Start ( )
inline

Starts the anchor provider.

◆ TryGetAnchor()

override bool OVRAnchorProvider.TryGetAnchor ( string id,
out FMARAnchor anchor )
inline

Tries to get the anchor with the specified ID.

Parameters
idThe ID of the anchor to get.
anchorThe anchor to get.
Returns
Whether the anchor was found.

◆ TryGetClosestAnchor()

override bool OVRAnchorProvider.TryGetClosestAnchor ( Vector3 position,
float radius,
out FMARAnchor anchor )
inline

Tries to get the closest anchor.

Parameters
positionThe position to get the closest anchor to.
radiusThe radius to search within.
anchorThe anchor to get.
Returns
Whether the anchor was found.

◆ Update()

void OVRAnchorProvider.Update ( )
inline

Updates the anchors.

Property Documentation

◆ Ready

override bool OVRAnchorProvider.Ready
get

The documentation for this class was generated from the following file: