Class XRHumanBodySubsystem.Provider
The provider which will service the XRHumanBodySubsystem.
Inheritance
Inherited Members
Namespace: UnityEngine.XR.ARSubsystems
Syntax
public abstract class Provider : SubsystemProvider<XRHumanBodySubsystem>
Properties
pose2DEnabled
Property to be implemented by the provider to get whether human body pose 2D estimation is enabled.
Declaration
public virtual bool pose2DEnabled { get; }
Property Value
Type | Description |
---|---|
Boolean |
pose2DRequested
Property to be implemented by the provider to set whether human body pose 2D estimation is requested.
Declaration
public virtual bool pose2DRequested { get; set; }
Property Value
Type | Description |
---|---|
Boolean |
|
Exceptions
Type | Condition |
---|---|
NotSupportedException | Thrown when setting the human body pose 2D estimation to
|
pose3DEnabled
Method to be implemented by the provider to get whether human body pose 3D estimation is enabled.
Declaration
public virtual bool pose3DEnabled { get; }
Property Value
Type | Description |
---|---|
Boolean |
pose3DRequested
Property to be implemented by the provider to set whether human body pose 3D estimation is requested.
Declaration
public virtual bool pose3DRequested { get; set; }
Property Value
Type | Description |
---|---|
Boolean |
|
Exceptions
Type | Condition |
---|---|
NotSupportedException | Thrown when setting the human body pose 3D estimation to
|
pose3DScaleEstimationEnabled
Property to be implemented by the provider to get whether 3D human body scale estimation is enabled.
Declaration
public virtual bool pose3DScaleEstimationEnabled { get; }
Property Value
Type | Description |
---|---|
Boolean |
pose3DScaleEstimationRequested
Property to be implemented by the provider to get or set whether 3D human body scale estimation is requested.
Declaration
public virtual bool pose3DScaleEstimationRequested { get; set; }
Property Value
Type | Description |
---|---|
Boolean |
|
Exceptions
Type | Condition |
---|---|
NotSupportedException | Thrown when setting the 3D human body scale estimation to
|
Methods
GetChanges(XRHumanBody, Allocator)
Method to be implemented by the provider to query for the set of human body changes.
Declaration
public abstract TrackableChanges<XRHumanBody> GetChanges(XRHumanBody defaultHumanBody, Allocator allocator)
Parameters
Type | Name | Description |
---|---|---|
XRHumanBody | defaultHumanBody | The default human body. |
Unity.Collections.Allocator | allocator | The memory allocator to use for the returned trackable changes. |
Returns
Type | Description |
---|---|
TrackableChanges<XRHumanBody> | The set of human body changes. |
Exceptions
Type | Condition |
---|---|
NotSupportedException | Thrown for platforms that don't support human body pose estimation. |
GetHumanBodyPose2DJoints(XRHumanBodyPose2DJoint, Int32, Int32, ScreenOrientation, Allocator)
Method to be implemented by the provider to get the human body pose 2D joints for the current frame.
Declaration
public virtual NativeArray<XRHumanBodyPose2DJoint> GetHumanBodyPose2DJoints(XRHumanBodyPose2DJoint defaultHumanBodyPose2DJoint, int screenWidth, int screenHeight, ScreenOrientation screenOrientation, Allocator allocator)
Parameters
Type | Name | Description |
---|---|---|
XRHumanBodyPose2DJoint | defaultHumanBodyPose2DJoint | The default value for the body pose 2D joint. |
Int32 | screenWidth | The width of the screen, in pixels. |
Int32 | screenHeight | The height of the screen, in pixels. |
UnityEngine.ScreenOrientation | screenOrientation | The orientation of the device so that the joint positions can be adjusted as required. |
Unity.Collections.Allocator | allocator | The allocator to use for the returned array memory. |
Returns
Type | Description |
---|---|
Unity.Collections.NativeArray<XRHumanBodyPose2DJoint> | The array of body pose 2D joints. |
Remarks
The returned array can be empty if the system is not enabled for human body pose 2D or if the system does not detect a human in the camera image.
Exceptions
Type | Condition |
---|---|
NotSupportedException | Thrown if the implementation does not support human body pose 2D. |
GetSkeleton(TrackableId, Allocator, ref NativeArray<XRHumanBodyJoint>)
Method to be implemented by the provider to get the skeleton joints for the requested trackable identifier.
Declaration
public virtual void GetSkeleton(TrackableId trackableId, Allocator allocator, ref NativeArray<XRHumanBodyJoint> skeleton)
Parameters
Type | Name | Description |
---|---|---|
TrackableId | trackableId | The human body trackable identifier for which to query. |
Unity.Collections.Allocator | allocator | The memory allocator to use for the returned arrays. |
Unity.Collections.NativeArray<XRHumanBodyJoint> | skeleton | The array of skeleton joints to update and return. |
Exceptions
Type | Condition |
---|---|
NotSupportedException | Thrown for platforms that don't support human body pose 3D. |