Class PoseDataSource
The PoseDataSource class acts as a container for the GetDataFromSource method call that should be used by PoseProviders wanting to query data for a particular pose.
Inherited Members
Namespace: UnityEngine.SpatialTracking
Assembly: UnityEngine.SpatialTracking.dll
Syntax
public static class PoseDataSource
Methods
GetDataFromSource(TrackedPose, out Pose)
The GetDataFromSource method is used to query data from the XRNode subsystem based on the provided pose source.
Declaration
public static PoseDataFlags GetDataFromSource(TrackedPoseDriver.TrackedPose poseSource, out Pose resultPose)
Parameters
Type | Name | Description |
---|---|---|
TrackedPoseDriver.TrackedPose | poseSource | The pose source to request data for. |
Pose | resultPose | The resulting pose data. This function will return the Center Eye pose if the Color Camera pose is not available. |
Returns
Type | Description |
---|---|
PoseDataFlags | Returns a bitflag which represents which data has been retrieved from the provided pose source |
TryGetDataFromSource(TrackedPose, out Pose)
The GetDataFromSource method is used to query data from the XRNode subsystem based on the provided pose source.
Declaration
public static bool TryGetDataFromSource(TrackedPoseDriver.TrackedPose poseSource, out Pose resultPose)
Parameters
Type | Name | Description |
---|---|---|
TrackedPoseDriver.TrackedPose | poseSource | The pose source to request data for. |
Pose | resultPose | The resulting pose data. |
Returns
Type | Description |
---|---|
bool | True, if the pose source is valid, otherwise false. |