Skip to main content
Version: 12 Dec 2024

MagicLeapMarkerUnderstandingFeature

NameSpace: MarkerUnderstanding

Inherits from:
MagicLeapOpenXRFeatureBase,
OpenXRFeature

Public Methods

MarkerDetector CreateMarkerDetector

Creates a marker detector with predefined settings.

public MarkerDetector CreateMarkerDetector(
MarkerDetectorSettings settings
)

Parameters

TypeNameDescription
MarkerDetectorSettingssettingsThe 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

TypeNameDescription
MarkerDetectormarkerDetectorThe 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

TypeNameDescription
MarkerDetectorSettingssettingsThe marker detector settings to be associated with the marker detector to be created.
ref MarkerDetectormarkerDetectorThe 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

TypeNameDescription
ulongxrInstance

OnSessionEnd

protected override void OnSessionEnd(
ulong xrSession
)

Parameters

TypeNameDescription
ulongxrSession

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;

TypeDescription
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;