Compartir a través de


SpatialGraphNode.TryLocate Method

Definition

Overloads

TryLocate(FrameTime, Pose)

Locate the SpatialGraphNode at the given frame time. The returned pose is in the current Unity scene origin space.

TryLocate(Int64, Pose)

Locate the SpatialGraphNode at the given QPC time. The returned pose is in the current Unity scene origin space.

TryLocate(FrameTime, Pose)

Locate the SpatialGraphNode at the given frame time. The returned pose is in the current Unity scene origin space.

public bool TryLocate (Microsoft.MixedReality.OpenXR.FrameTime frameTime, out UnityEngine.Pose pose);
member this.TryLocate : Microsoft.MixedReality.OpenXR.FrameTime * Pose -> bool
Public Function TryLocate (frameTime As FrameTime, ByRef pose As Pose) As Boolean

Parameters

frameTime
FrameTime

Specify the FrameTime to locate the spatial graph node.

pose
UnityEngine.Pose

Output the pose when the function returns true. Discard the value if the function returns false.

Returns

Return true if the output pose is actively tracked, or return false indicating the node lost tracking.

Remarks

This function is typically used to locate the spatial graph node used in Unity's render pipeline at either OnUpdate or OnBeforeRender callbacks. Providing the correct input frameTime allows the runtime to provide correct motion prediction of the tracked node to the display time of the current rendering frame.

Applies to

TryLocate(Int64, Pose)

Locate the SpatialGraphNode at the given QPC time. The returned pose is in the current Unity scene origin space.

public bool TryLocate (long qpcTime, out UnityEngine.Pose pose);
member this.TryLocate : int64 * Pose -> bool
Public Function TryLocate (qpcTime As Long, ByRef pose As Pose) As Boolean

Parameters

qpcTime
Int64

Specify the QPC (i.e. query performance counter) time to locate the spatial graph node.

pose
UnityEngine.Pose

Output the pose when the function returns true. Discard the value if the function returns false.

Returns

Return true if the output pose is actively tracked, or return false indicating the node lost tracking.

Remarks

This function is typically used to locate the spatial graph node using historical timestamp obtained from other spatial graph APIs, for example the qpcTime of a IMFSample from media foundation APIs representing the time when a Photo and Video camera captured the image. Providing an accurate qpcTime from the camera sensor allows the runtime to locate precisely where the dynamic node was tracked when the image was taken.

Applies to