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; }
Type | Description |
---|---|
Native.MagicLeapNativeBindings.MLCoordinateFrameUID | A 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
Type | Name | Description |
---|---|---|
Pose | pose |
unsafe TrackableId GenerateTrackableId
public static unsafe TrackableId GenerateTrackableId()
ReferenceFrame
public ReferenceFrame(
Cinfo cinfo
)
Parameters
Type | Name | Description |
---|---|---|
Cinfo | cinfo | Information 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
Type | Name | Description |
---|---|---|
Native.MagicLeapNativeBindings.MLCoordinateFrameUID | cfuid | The UID of the new coordinate frame |
Pose | coordinateFrame | The 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
Type | Name | Description |
---|---|---|
TrackingState | trackingState | The 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;