Example #1
0
        public static bool IsInternallyValid(Gesture gesture, out List<PoseSafetyException> exceptions)
        {
            bool result = true;
            exceptions = new List<PoseSafetyException>();
            foreach (var step in gesture.Steps)
            {
                var pose = step.Pose;
                Z3Body witness = null;
                if (!Validity.IsInternallyValid(pose))
                {
                    var exception = new PoseSafetyException(
                        "Pose failed internal validity check!", pose, witness
                        );
                    exceptions.Add(exception);
                    result = false;
                }
            }

            return result;
        }
Example #2
0
        public static bool IsInternallyValid(Gesture gesture, out List <PoseSafetyException> exceptions)
        {
            bool result = true;

            exceptions = new List <PoseSafetyException>();
            foreach (var step in gesture.Steps)
            {
                var    pose    = step.Pose;
                Z3Body witness = null;
                if (!Validity.IsInternallyValid(pose))
                {
                    var exception = new PoseSafetyException(
                        "Pose failed internal validity check!", pose, witness
                        );
                    exceptions.Add(exception);
                    result = false;
                }
            }

            return(result);
        }
Example #3
0
        /// <summary>
        /// Checks if the pose is within default safety
        /// restrictions when the transform and restrictions
        /// are applied.
        /// </summary>
        /// <returns>True if it's safe</returns>
        public static bool IsWithinDefaultSafetyRestrictions(Gesture gesture, out List <PoseSafetyException> exceptions)
        {
            bool result = true;

            exceptions = new List <PoseSafetyException>();
            foreach (var step in gesture.Steps)
            {
                var    pose    = step.Pose;
                Z3Body witness = null;
                if (!Safety.IsWithinSafetyRestrictions(pose, out witness))
                {
                    var exception = new PoseSafetyException(
                        "Default safety violation", pose, witness
                        );
                    exceptions.Add(exception);
                    result = false;
                }
            }

            return(result);
        }
Example #4
0
        /// <summary>
        /// Checks if the pose is within default safety 
        /// restrictions when the transform and restrictions 
        /// are applied.
        /// </summary>
        /// <returns>True if it's safe</returns>
        public static bool IsWithinDefaultSafetyRestrictions(Gesture gesture, out List<PoseSafetyException> exceptions)
        {
            bool result = true;
            exceptions = new List<PoseSafetyException>();
            foreach (var step in gesture.Steps)
            {
                var pose = step.Pose;
                Z3Body witness = null;
                if (!Safety.IsWithinSafetyRestrictions(pose, out witness))
                {
                    var exception = new PoseSafetyException(
                        "Default safety violation", pose, witness
                        );
                    exceptions.Add(exception);
                    result = false;
                }
            }

            return result;
        }