Class XRTrackableItems
Stores the currently trackable items.
Inherited Members
Namespace: Evergine.Framework.XR.TrackableItems
Assembly: Evergine.Framework.dll
Syntax
public abstract class XRTrackableItems : DisposableObject
Constructors
XRTrackableItems()
Initializes a new instance of the XRTrackableItems class.
Declaration
public XRTrackableItems()
Fields
TrackablesById
Backing field for the XRTrackableItem property.
Declaration
public ConcurrentDictionary<Guid, XRTrackableItem> TrackablesById
Field Value
Type | Description |
---|---|
ConcurrentDictionary<Guid, XRTrackableItem> |
Methods
AddTrackables(IEnumerable<XRTrackableItem>)
Executes when new trackables are detected.
Declaration
public void AddTrackables(IEnumerable<XRTrackableItem> addedTrackables)
Parameters
Type | Name | Description |
---|---|---|
IEnumerable<XRTrackableItem> | addedTrackables | Collection of detected trackables. |
ClearAllTrackables()
Clears cached trackable items.
Declaration
public void ClearAllTrackables()
Destroy()
Destroys all resources of this instance.
Declaration
protected override void Destroy()
Overrides
FindTrackable(Guid)
Looks for an XRTrackableItem detected in the current frame.
Declaration
public XRTrackableItem FindTrackable(Guid trackableId)
Parameters
Type | Name | Description |
---|---|---|
Guid | trackableId | The ID of the trackable. |
Returns
Type | Description |
---|---|
XRTrackableItem | The XRTrackableItem or null if no XRTrackableItem with the specified ID was found. |
RemoveTrackables(IEnumerable<Guid>)
Executed when trackables stop being detected.
Declaration
public void RemoveTrackables(IEnumerable<Guid> removedTrackables)
Parameters
Type | Name | Description |
---|---|---|
IEnumerable<Guid> | removedTrackables | Collection of updated trackables. |
UpdateTrackables(IEnumerable<XRTrackableItem>)
Executes when already detected trackables are updated.
Declaration
public void UpdateTrackables(IEnumerable<XRTrackableItem> updatedTrackables)
Parameters
Type | Name | Description |
---|---|---|
IEnumerable<XRTrackableItem> | updatedTrackables | Collection of updated trackables. |
Events
AddedTrackables
Event triggered when one or more trackables have been added
Declaration
public event EventHandler<IEnumerable<XRTrackableItem>> AddedTrackables
Event Type
Type | Description |
---|---|
EventHandler<IEnumerable<XRTrackableItem>> |
RemovedTrackables
Event triggered when one or more trackables have been removed.
Declaration
public event EventHandler<IEnumerable<XRTrackableItem>> RemovedTrackables
Event Type
Type | Description |
---|---|
EventHandler<IEnumerable<XRTrackableItem>> |
UpdatedTrackables
Event triggered when one or more trackables have been updated
Declaration
public event EventHandler<IEnumerable<XRTrackableItem>> UpdatedTrackables
Event Type
Type | Description |
---|---|
EventHandler<IEnumerable<XRTrackableItem>> |