Interface IProvidesReferencePoints
Defines the API for a Reference Point Provider This functionality provider is responsible for reference point tracking
Inherited Members
Namespace: Unity.MARS
Syntax
public interface IProvidesReferencePoints : IFunctionalityProvider
Methods
GetAllReferencePoints(List<MRReferencePoint>)
Get the full list of reference points we know about
Declaration
void GetAllReferencePoints(List<MRReferencePoint> referencePoints)
Parameters
Type | Name | Description |
---|---|---|
List<MRReferencePoint> | referencePoints | A list of MRReferencePoint objects to which the currently tracked reference points will be added |
StartTrackingReferencePoints()
Start tracking reference points. Reference point detection is enabled on initialization, so this is only necessary after calling StopDetecting.
Declaration
void StartTrackingReferencePoints()
StopTrackingReferencePoints()
Stop tracking reference points. This will happen automatically on destroying the session. It is only necessary to call this method to pause plane detection while maintaining camera tracking
Declaration
void StopTrackingReferencePoints()
TryAddReferencePoint(Pose, out MarsTrackableId)
Try to add a reference point
Declaration
bool TryAddReferencePoint(Pose pose, out MarsTrackableId referencePointId)
Parameters
Type | Name | Description |
---|---|---|
Pose | pose | |
MarsTrackableId | referencePointId |
Returns
Type | Description |
---|---|
Boolean | true if adding the point succeeded, false otherwise |
TryGetReferencePoint(MarsTrackableId, out MRReferencePoint)
Try to get a reference point
Declaration
bool TryGetReferencePoint(MarsTrackableId id, out MRReferencePoint referencePoint)
Parameters
Type | Name | Description |
---|---|---|
MarsTrackableId | id | |
MRReferencePoint | referencePoint |
Returns
Type | Description |
---|---|
Boolean | true if getting the point succeeded, false otherwise |
TryRemoveReferencePoint(MarsTrackableId)
Try to remove a reference point
Declaration
bool TryRemoveReferencePoint(MarsTrackableId id)
Parameters
Type | Name | Description |
---|---|---|
MarsTrackableId | id |
Returns
Type | Description |
---|---|
Boolean | true if removing the point succeeded, false otherwise |
Events
pointAdded
Called when a reference point is added the first time
Declaration
event Action<MRReferencePoint> pointAdded
Event Type
Type | Description |
---|---|
Action<MRReferencePoint> |
pointRemoved
Called when a reference point is removed (lost)
Declaration
event Action<MRReferencePoint> pointRemoved
Event Type
Type | Description |
---|---|
Action<MRReferencePoint> |
pointUpdated
Called when a reference point has updated data
Declaration
event Action<MRReferencePoint> pointUpdated
Event Type
Type | Description |
---|---|
Action<MRReferencePoint> |