using System; namespace UnityEngine.XR.Hands.Gestures { /// /// The different states to describe a finger /// public enum XRFingerShapeType { /// /// The amount that all joints in a finger are curled. /// FullCurl, /// /// The amount that the proximal (knuckle) joint is curled. /// BaseCurl, /// /// The amount of bend in the top two joints of the finger. /// /// /// This state does not take the Proximal (knuckle) joint into consideration. /// TipCurl, /// /// How close a given fingertip of the four fingers is to the . /// /// /// This state does not exist for the . /// Pinch, /// /// The amount that the finger is separated from the adjacent finger towards the finger. /// /// /// This state does not exist for the finger. /// Spread, } /// /// Set which types you want to calculate for the the corresponding fields calculated when /// calling . /// Any cleared types will result in a value of 0 for its corresponding field in the /// returned . /// [Flags] public enum XRFingerShapeTypes { /// /// Don't calculate any fields of during a /// call to or /// . /// None = 0, /// /// Whether to calculate the value /// during a call to or /// . /// FullCurl = 1 << XRFingerShapeType.FullCurl, /// /// Whether to calculate the value /// during a call to or /// . /// BaseCurl = 1 << XRFingerShapeType.BaseCurl, /// /// Whether to calculate the value /// during a call to or /// . /// TipCurl = 1 << XRFingerShapeType.TipCurl, /// /// Whether to calculate the value /// during a call to or /// . /// Pinch = 1 << XRFingerShapeType.Pinch, /// /// Whether to calculate the value /// during a call to or /// . /// Spread = 1 << XRFingerShapeType.Spread, /// /// Calculate all fields of during a call to /// or /// . /// All = (1 << 5) - 1 } /// /// The axis of a hand that is independent of the handedness. /// public enum XRHandAxis { /// /// The direction pointing out from the hand's palm. /// This direction is perpendicular to the hand's and /// /// PalmDirection, /// /// The direction pointing from the center of the hand towards the thumb. /// Left and right hands are symmetrically mirrored so when palms are facing up in front of the body, this /// direction is right on the right hand, and left on the left hand, relative to the body. /// This direction is perpendicular to the hand's and /// /// ThumbExtendedDirection, /// /// The direction that the index, middle, ring, and little finger point when they are extended. /// This direction is perpendicular to the hand's and /// /// FingersExtendedDirection, } /// /// The method used to compare two directions. /// public enum XRHandAlignmentCondition { /// /// The angle between the directions is less than the threshold. /// AlignsWith, /// /// The angle between the directions is 90 degrees plus or minus the threshold. /// PerpendicularTo, /// /// The angle between the direction and the opposite of the reference direction is less than the threshold. /// OppositeTo, } /// /// The direction to compare the hand's axis direction to relative to the user. /// public enum XRHandUserRelativeDirection { /// /// Up direction of the user's tracking space. /// The direction uses the in the scene. /// OriginUp, /// /// Direction from the root pose of the hand to the user's head. /// The head position is the position of the in the scene. /// HandToHead, /// /// The nose direction of the user's head. /// The direction uses the forward direction of the in the scene. /// NoseDirection, /// /// The chin direction of the user's head. /// The direction uses the down direction of the in the scene. /// ChinDirection, /// /// The ear direction of the user's head, or the lateral direction of the user's head. /// The ear chosen is the one on the same side of the body as the hand's connected shoulder. /// This direction is perpendicular to the and directions. /// The direction uses the right/left direction of the in the scene. /// EarDirection, } /// /// The direction to compare the hand's axis direction to relative to an arbitrary target transform in the scene. /// public enum XRHandTargetRelativeDirection { /// /// Direction pointing towards the target from the hand. /// HandToTarget, /// /// The forward direction of the target. /// TargetForward, /// /// The up direction of the target. /// TargetUp, /// /// The right direction of the target. /// TargetRight, } }