Skip to main content
Version: 14 Oct 2024

MLHeadTracking

Public Methods

void GetStaticData

public static void GetStaticData(
out MagicLeapNativeBindings.MLCoordinateFrameUID outUID
)

Parameters

TypeNameDescription
out MagicLeapNativeBindings.MLCoordinateFrameUIDoutUIDA unique identifier which represents a coordinate frame. The unique identifier is comprised of two values.

bool TryGetMapEvents

public static bool TryGetMapEvents(
InputDevice headDevice,
out MapEvents mapEvents
)

Parameters

TypeNameDescription
InputDeviceheadDevice
out MapEventsmapEventsA set of all types of map events that can occur that a developer may have to handle.

bool TryGetState

public static bool TryGetState(
InputDevice headDevice,
out State headTrackingState
)

Parameters

TypeNameDescription
InputDeviceheadDevice
out StateheadTrackingStateA structure containing information on the current state of the Head Tracking system.

bool TryGetStateEx

public static bool TryGetStateEx(
InputDevice headDevice,
out StateEx headTrackingState
)

Parameters

TypeNameDescription
InputDeviceheadDevice
out StateExheadTrackingStateA structure containing information on the current state of the Head Tracking system.

Public Enums

HeadTrackingStatus

A set of possible tracking status for the Head Tracking system.

EnumeratorValueDescription
Invalid0Head tracking is unavailable.
Initializing1Head tracking is initializing.
Relocalizing2Head tracking is relocalizing.
Valid100Valid head tracking data is available.

MapEvents

A set of all types of map events that can occur that a developer may have to handle.

EnumeratorValueDescription
Lost(1 << 0)Map was lost. It could possibly recover.
Recovered(1 << 1)Previous map was recovered.
RecoveryFailed(1 << 2)Failed to recover previous map.
NewSession(1 << 3)New map session created.

TrackingError

A set of possible error conditions that can cause Head Tracking to be less than ideal.

EnumeratorValueDescription
NoneNo error, tracking is nominal.
NotEnoughFeaturesThere are not enough features in the environment.
LowLightLighting in the environment is not sufficient to track accurately.
UnknownHead tracking failed for an unknown reason.

TrackingErrorFlag

A set of possible error conditions that can cause Head Tracking to be less than ideal.

EnumeratorValueDescription
None0No error, tracking is nominal.
Unknown1 << 0Head tracking failed for an unknown reason.
NotEnoughFeatures1 << 1There are not enough features in the environment.
LowLight1 << 2Lighting in the environment is not sufficient to track accurately.
ExcessiveMotion1 << 3Head tracking failed due to excessive motion.

TrackingMode

A set of possible tracking modes the Head Tracking system can be in.

EnumeratorValueDescription
Mode6DOFFull 6 degrees of freedom tracking (position and orientation).
ModeUnavailableHead tracking is unavailable.