MagicLeapMarkerUnderstandingFeature
NameSpace: MarkerUnderstanding
Inherits from:
MagicLeapOpenXRFeatureBase,
OpenXRFeature
Public Methods
MarkerDetector CreateMarkerDetector
Creates a marker detector with predefined settings.
public MarkerDetector CreateMarkerDetector(
MarkerDetectorSettings settings
)
Parameters
Type | Name | Description |
---|---|---|
MarkerDetectorSettings | settings | The marker detector settings to be associated with the marker detector to be created. |
Returns: The marker detector that has been created. Returns null if the number of active marker detectors is at the limit or an error occurred.
void DestroyAllMarkerDetectors
Destroys all actively tracked marker detectors.
public void DestroyAllMarkerDetectors()
void DestroyMarkerDetector
Destroys the specified marker detector.
public void DestroyMarkerDetector(
MarkerDetector markerDetector
)
Parameters
Type | Name | Description |
---|---|---|
MarkerDetector | markerDetector | The marker detector to be destroyed. |
void ModifyMarkerDetector
Provides the ability to modify a marker detector with new settings. Note: this method actually destroys the old marker detector and replaces it with a newly created one. However, this approach maintains the index position of it in the marker detectors list.
public void ModifyMarkerDetector(
MarkerDetectorSettings settings,
ref MarkerDetector markerDetector
)
Parameters
Type | Name | Description |
---|---|---|
MarkerDetectorSettings | settings | The marker detector settings to be associated with the marker detector to be created. |
ref MarkerDetector | markerDetector | The specified marker detector to modify. |
Returns: The newly created marker detector that replaced the old one. This returns null if the specified marker detector is not tracked.
void UpdateMarkerDetectors
Updates the status and data for all actively tracked marker detectors.
public void UpdateMarkerDetectors()
Protected Methods
OnInstanceCreate
protected override bool OnInstanceCreate(
ulong xrInstance
)
Parameters
Type | Name | Description |
---|---|---|
ulong | xrInstance |
OnSessionEnd
protected override void OnSessionEnd(
ulong xrSession
)
Parameters
Type | Name | Description |
---|---|---|
ulong | xrSession |
Public Attributes
FeatureId
public const string FeatureId = "com.magicleap.openxr.feature.ml2_markerunderstanding";
MarkerDetectors
The active marker detectors tracked by the marker understanding feature.
public IReadOnlyList< MarkerDetector > MarkerDetectors => markerDetectors;
Type | Description |
---|---|
IReadOnlyList< MarkerDetector > | Used to detect data from a specified type of marker tracker based on specific settings. |
Returns: A readonly list of the active marker detectors.
MarkerDetectorsLimit
The maximum number of marker detectors allowed at once.
public const int MarkerDetectorsLimit = 64;