/// <summary> Check if this scriptIndex is detectable by this Detector. </summary> /// <param name="scriptIndex"></param> /// <returns></returns> private bool ValidScript(SG_HandSection handSection) { return((this.detectThumb && handSection == SG_HandSection.Thumb) || (this.detectIndex && handSection == SG_HandSection.Index) || (this.detectMiddle && handSection == SG_HandSection.Middle) || (this.detectRing && handSection == SG_HandSection.Ring) || (this.detectPinky && handSection == SG_HandSection.Pinky)); }
/// <summary> Retrieve the fingertip transform of this Hand Model. </summary> /// <param name="finger"></param> /// <param name="fingerTip"></param> /// <returns></returns> public bool GetFingerTip(SG_HandSection finger, out Transform fingerTip) { int f = (int)finger; if (f > -1 && f < 5) { Transform[][] joints = FingerJoints; fingerTip = joints[f].Length > 3 ? joints[f][3] : null; } else { fingerTip = null; } return(fingerTip != null); }