示例#1
0
        public void CopyGesturesFromOrigin(Exercise copyFromExercise)
        {
            ContinuousGestureName = copyFromExercise.ContinuousGestureName;
            StartGesutre          = new VTGesture(copyFromExercise.StartGesutre);

            VTGestureList = new List <VTGesture>();
            foreach (VTGesture gesture in copyFromExercise.VTGestureList)
            {
                VTGestureList.Add(new VTGesture(gesture));
            }
        }
示例#2
0
        // to duplicate gestures - copy constractor
        public VTGesture(VTGesture _serverGesture)
        {
            GestureName          = _serverGesture.GestureName;
            MaxProgressValue     = _serverGesture.MaxProgressValue;
            MinProgressValue     = _serverGesture.MinProgressValue;
            TrsholdProgressValue = _serverGesture.TrsholdProgressValue;
            IsTrack   = _serverGesture.IsTrack;
            IsSuccess = false;

            InitProgressDirection();
        }
示例#3
0
        public void UpdateGestureDetection(string _gestureName, DiscreteGestureResult _gestureResult, float _gestureProgress)
        {
            if (GestureList.ContainsKey(_gestureName))
            {
                VTGesture _gesture = null;
                GestureList.TryGetValue(_gestureName, out _gesture);

                _gesture.ConfidenceValue = _gestureResult.Confidence;

                if (_gestureResult.Detected)
                {
                    _gesture.ProgressValue = _gestureProgress;
                }

                if (_gestureResult.Detected && _gesture.IsPassConfidanceTrshold() && _gesture.IsPassProgressTrshold() && !_gesture.IsSuccess && _gestureProgress > 0.1)
                {
                    Console.WriteLine("Round {0}, G: {1}, prog: {2}, conf: {3}, Time: {4}, Detected {5}", RoundNumber, _gesture.GestureName, _gestureProgress, _gestureResult.Confidence
                                      , DateTime.Now.ToString("mm:ss:ffff"), _gestureResult.Detected);

                    _gesture.IsSuccess = true;
                    CheckProgress();
                }
            }
        }