示例#1
0
        /// <summary>
        /// Prueft die history, ob die jeweilige Bewegung ausgelöst wird oder nicht.
        /// </summary>
        /// <param name="history">The history.</param>
        /// <returns></returns>
        public ErkennerStatus Pruefe(Skeleton[] history)
        {
            var rightFootZ = history.Select(x => x.Joints[JointType.FootRight].Position.Z);
            var rightFootY = history.Select(x => x.Joints[JointType.FootRight].Position.Y);

            Ok = rightFootZ.Max() > rightFootZ.First() + 0.5 && (rightFootY.First() > rightFootY.Min() + 0.2);

            return(ErkennerHandler.SinglePress(this));
        }
示例#2
0
        /// <summary>
        /// Prueft die history, ob die jeweilige Bewegung ausgelöst wird oder nicht.
        /// </summary>
        /// <param name="history">The history.</param>
        /// <returns></returns>
        public ErkennerStatus Pruefe(Skeleton[] history)
        {
            var leftFootY  = history.Select(x => x.Joints[JointType.FootLeft].Position.Y);
            var rightFootY = history.Select(x => x.Joints[JointType.FootRight].Position.Y);

            Ok = (leftFootY.First() - leftFootY.Min() > Paramters.JumpSchwelle) &&
                 (rightFootY.First() - rightFootY.Min() > Paramters.JumpSchwelle);

            return(ErkennerHandler.SinglePress(this));
        }
示例#3
0
        /// <summary>
        /// Prueft die history, ob die jeweilige Bewegung ausgelöst wird oder nicht.
        /// </summary>
        /// <param name="history">The history.</param>
        /// <returns></returns>
        public ErkennerStatus Pruefe(Skeleton[] history)
        {
            var leftHandZ     = history.Select(x => x.Joints[JointType.HandLeft].Position.Z);
            var leftHandY     = history.Select(x => x.Joints[JointType.HandLeft].Position.Y);
            var leftShoulderY = history.Select(x => x.Joints[JointType.ShoulderLeft].Position.Y);
            var rightHandZ    = history.Select(x => x.Joints[JointType.HandRight].Position.Z);

            Ok = leftHandZ.First() < leftHandZ.Max() - 0.27 && (leftHandY.First() < leftShoulderY.First() + 0.1) && (rightHandZ.Max() - rightHandZ.First() < 0.15);

            return(ErkennerHandler.SinglePress(this));
        }
示例#4
0
        /// <summary>
        /// Prueft die history, ob die jeweilige Bewegung ausgelöst wird oder nicht.
        /// </summary>
        /// <param name="history">The history.</param>
        /// <returns></returns>
        public ErkennerStatus Pruefe(Skeleton[] history)
        {
            var rightHandY    = history.Select(x => x.Joints[JointType.HandRight].Position.Y);
            var rightHandX    = history.Select(x => x.Joints[JointType.HandRight].Position.X);
            var headX         = history.Select(x => x.Joints[JointType.Head].Position.X);
            var leftShoulderY = history.Select(x => x.Joints[JointType.ShoulderLeft].Position.Y);

            Ok = rightHandX.First() < rightHandX.Max() - 0.2 && (rightHandY.First() > leftShoulderY.First()) && (rightHandX.First() < headX.First() - 0.2);

            return(ErkennerHandler.SinglePress(this));
        }
示例#5
0
        public ErkennerStatus Pruefe(Skeleton[] history)
        {
            var rightHandZ = history.Select(x => x.Joints[JointType.HandRight].Position.Z);
            var leftHandZ  = history.Select(x => x.Joints[JointType.HandLeft].Position.Z);

            Ok = (rightHandZ.Max() - rightHandZ.First() > Paramters.rhWieWeitNachVorneMitDenHaenden) &&
                 (leftHandZ.Max() - leftHandZ.First() > Paramters.rhWieWeitNachVorneMitDenHaenden) &&
                 (leftHandZ.First() - leftHandZ.First() < Paramters.rhWieParallelDieHaendeSeinSollten);

            return(ErkennerHandler.SinglePress(this));
        }