Example #1
0
        public Hand2d(Hand hand)
        {
            Speed               = hand.PalmVelocity.Magnitude;
            SpeedDirection      = GetVectorDirection(hand.PalmVelocity);
            FloatingAttachPoint = GetFloatingAttachPoint(hand);
            IsFist              = GetIsFist(hand);
            IsFlat              = GetIsFlat(hand);
            SetPalmProperties(hand);
            if (hand.IsLeft)
            {
                Side = HandSide.Left;
            }
            else
            {
                Side = HandSide.Right;
            }

            HandVelocityHistory.AddVelocity(hand.PalmVelocity, palmAttachPoint3d, Side);

            PalmPosition   = LeapCalibrator.ToScaledPoint(hand.PalmPosition);
            PalmPosition3d = hand.PalmPosition;
            // TODO: Calculate Details!!!
            foreach (Finger finger in hand.Fingers)
            {
                Fingers.Add(new Finger2d(finger));
            }
        }
Example #2
0
        public TutorialFinger CreateFinger(Transform parent, TutorialFingerData fingerData)
        {
            if (Fingers.ContainsKey(fingerData.Id))
            {
                RemoveFinger(fingerData.Id);
            }
            GameObject     fingerObj = GameObject.Instantiate(Services.ResourceService.Prefabs.GetPrefab("finger"), parent, false);
            TutorialFinger finger    = fingerObj.GetComponent <TutorialFinger>();

            finger.Setup(fingerData);
            Fingers.Add(finger.Data.Id, finger);
            return(finger);
        }
Example #3
0
 public AddFingerViewModel(Employee employee)
 {
     Fingers.Add(CurrentSample);
     Employee = employee;
 }