using System;
namespace UnityEngine.XR.Hands.ProviderImplementation
{
public static partial class XRHandProviderUtility
{
///
/// Create a fully configurable joint with at least a pose in hand
/// space, tracking state, and ID.
///
///
/// The tracking state flags associated with this joint, representing
/// which fields of the are valid.
///
///
/// The of the joint. When filling out an
/// element of an array of , the index must
/// be converted with .
///
///
/// The pose of the joint in session space, relative to the
/// [XROrigin](xref:Unity.XR.CoreUtils.XROrigin).
///
///
/// The radius of the joint. The default value is 0f.
///
///
/// The linear velocity of the joint in hand space (relative to the
/// [XROrigin](xref:Unity.XR.CoreUtils.XROrigin)). The default value is
/// Vector3.zero.
///
///
/// The angular velocity of the joint in hand space (relative to the
/// [XROrigin](xref:Unity.XR.CoreUtils.XROrigin)). The default value is
/// Vector3.zero.
///
///
/// An with the given pose and other supplied
/// data.
///
[Obsolete("Use the CreateJoint overload that has an additional first argument for handedness. Otherwise, joints will always report as being from the left hand, even if they were from the right hand.")]
public static XRHandJoint CreateJoint(
XRHandJointTrackingState trackingState,
XRHandJointID id,
Pose pose,
float radius = 0f,
Vector3 linearVelocity = new Vector3(),
Vector3 angularVelocity = new Vector3())
{
return new XRHandJoint
{
m_TrackingState = trackingState,
m_IdAndHandedness = (int)id,
m_Pose = pose,
m_Radius = radius,
m_LinearVelocity = linearVelocity,
m_AngularVelocity = angularVelocity,
};
}
}
}