Class XRHumanBodySubsystem.Provider
The provider which will service the XRHumanBodySubsystem.
Namespace: UnityEngine.XR.ARSubsystems
Syntax
public abstract class Provider
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 sets 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 sets 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
Destroy()
Method to be implemented by the provider to destroy itself and release any resources.
Declaration
public virtual void Destroy()
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. |
Allocator | allocator | The memory allocator to use for the returns trackable changes. |
Returns
Type | Description |
---|---|
TrackableChanges<XRHumanBody> | The set of human body changes. |
Exceptions
Type | Condition |
---|---|
NotSupportedException | Thrown for platforms not supporting 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. |
ScreenOrientation | screenOrientation | The orientation of the device so that the joint positions may be adjusted as required. |
Allocator | allocator | The allocator to use for the returned array memory. |
Returns
Type | Description |
---|---|
NativeArray<XRHumanBodyPose2DJoint> | The array of body pose 2D joints. |
Remarks
The returned array may 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. |
Allocator | allocator | The memory allocator to use for the returned arrays. |
NativeArray<XRHumanBodyJoint> | skeleton | The array of skeleton joints to update and return. |
Exceptions
Type | Condition |
---|---|
NotSupportedException | Thrown for platforms not supporting human body pose 3D. |
Start()
Method to be implemented by the provider to start the functionality.
Declaration
public virtual void Start()
Stop()
Method to be implemented by the provider to stop the functionality.
Declaration
public virtual void Stop()