Exemplo n.º 1
0
 public BodyMatcher(App app, int precision = 15)
 {
     this.App = app;
     this.Precision = precision;
     foreach (var gesture in this.App.Gestures)
     {
         var matcher = new GestureMatcher(gesture);
         Matchers.Add(matcher);
     }
 }
Exemplo n.º 2
0
 public static bool IsWithinDefaultSafetyRestrictions(
     App app,
     out List<PoseSafetyException> allExceptions, 
     out List<long> elapsedTimes)
 {
     allExceptions = new List<PoseSafetyException>();
     elapsedTimes = new List<long>();
     var result = true;
     foreach (var gesture in app.Gestures)
     {
         List<PoseSafetyException> exceptions = null;
         var stopwatch = new Stopwatch();
         stopwatch.Start();
         if (!IsWithinDefaultSafetyRestrictions(gesture, out exceptions))
         {
             result = false;
             Contract.Assert(exceptions != null);
             allExceptions.AddRange(exceptions);
         }
         stopwatch.Stop();
         elapsedTimes.Add(stopwatch.ElapsedMilliseconds);
     }
     return result;
 }