Skip to main content
Version: 11 Nov 2025

ReferenceFrame

NameSpace: MagicLeap

Contains information necessary to report on XRAnchor s.

Public Fields​

anchor​

Get the reference frame as a refernce point


public XRAnchor anchor { get; set; }


anchorPose​

Compute the pose of the anchor.


public Pose anchorPose { get; set; }


cfuid​

The UID of the closest coordinate frame


public Native.MagicLeapNativeBindings.MLCoordinateFrameUID cfuid { get; set; }

TypeDescription
Native.MagicLeapNativeBindings.MLCoordinateFrameUIDA unique identifier which represents a coordinate frame. The unique identifier is comprised of two values.

coordinateFrame​

The pose of the coordinate frame used as the origin when calculating the anchorPose.


public Pose coordinateFrame { get; set; }


trackableId​

The anchor's trackable id.


public TrackableId trackableId { get; set; }


trackingState​

The tracking state associated with the anchor


public TrackingState trackingState { get; set; }


Public Methods​

void ComputeDelta​

public void ComputeDelta(
Pose pose
)

Parameters

TypeNameDescription
Posepose

unsafe TrackableId GenerateTrackableId​

public static unsafe TrackableId GenerateTrackableId()

ReferenceFrame​

public ReferenceFrame(
Cinfo cinfo
)

Parameters

TypeNameDescription
CinfocinfoInformation necessary to construct a reference frame

void SetCoordinateFrame​

Sets a new coordinate frame. This is different from simply setting the coordinateFrame. This method causes the anchor to be computed relative to a different coordinate frame entirely.

public void SetCoordinateFrame(
Native.MagicLeapNativeBindings.MLCoordinateFrameUID cfuid,
Pose coordinateFrame
)

Parameters

TypeNameDescription
Native.MagicLeapNativeBindings.MLCoordinateFrameUIDcfuidThe UID of the new coordinate frame
PosecoordinateFrameThe pose of the new coordinate frame

bool SetTrackingState​

Sets the tracking state and returns true if the state changed.

public bool SetTrackingState(
TrackingState trackingState
)

Parameters

TypeNameDescription
TrackingStatetrackingStateThe new tracking state

Returns: true if the tracking state changed.


Public Attributes​

m_AnchorFromCoordinateFrame​

A pose which describes the delta beteen the anchor and the closest MLCoordinateFrame.


public Pose m_AnchorFromCoordinateFrame;