docs.unity3d.com
Search Results for

    Show / Hide Table of Contents

    Class XRHumanBodySubsystem.Provider

    The provider which will service the XRHumanBodySubsystem.

    Inheritance
    object
    SubsystemProvider
    SubsystemProvider<XRHumanBodySubsystem>
    XRHumanBodySubsystem.Provider
    Inherited Members
    SubsystemProvider<XRHumanBodySubsystem>.TryInitialize()
    SubsystemProvider<XRHumanBodySubsystem>.Start()
    SubsystemProvider<XRHumanBodySubsystem>.Stop()
    SubsystemProvider<XRHumanBodySubsystem>.Destroy()
    SubsystemProvider.running
    object.Equals(object)
    object.Equals(object, object)
    object.GetHashCode()
    object.GetType()
    object.MemberwiseClone()
    object.ReferenceEquals(object, object)
    object.ToString()
    Namespace: UnityEngine.XR.ARSubsystems
    Assembly: Unity.XR.ARSubsystems.dll
    Syntax
    public abstract class XRHumanBodySubsystem.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
    bool

    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
    bool

    true if human body pose 2D estimation has been requested. Otherwise, false.

    Exceptions
    Type Condition
    NotSupportedException

    Thrown when setting the human body pose 2D estimation to true if the implementation does not support human body pose 2D estimation.

    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
    bool

    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
    bool

    true if the human body pose 3D estimation has been requested. Otherwise, false.

    Exceptions
    Type Condition
    NotSupportedException

    Thrown when setting the human body pose 3D estimation to true if the implementation does not support human body pose 3D estimation.

    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
    bool

    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
    bool

    true if the 3D human body scale estimation is set to the given value. Otherwise, false.

    Exceptions
    Type Condition
    NotSupportedException

    Thrown when setting the 3D human body scale estimation to true if the implementation does not support 3D human body scale estimation.

    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.

    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, int, int, 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.

    int screenWidth

    The width of the screen, in pixels.

    int screenHeight

    The height of the screen, in pixels.

    ScreenOrientation screenOrientation

    The orientation of the device so that the joint positions can 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 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.

    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 that don't support human body pose 3D.

    In This Article
    Back to top
    Copyright © 2024 Unity Technologies — Trademarks and terms of use
    • Legal
    • Privacy Policy
    • Cookie Policy
    • Do Not Sell or Share My Personal Information
    • Your Privacy Choices (Cookie Settings)