Esempio n. 1
0
 public void AddGestureRule(AngleGestureRule gestureRule)
 {
     if (!gestureRules.Contains(gestureRule))
     {
         gestureRules.Add(gestureRule);
     }
 }
Esempio n. 2
0
        public void AddChildJointAngleRule(Joint thisJoint, Joint otherJoint, ConnectedJoint otherConnectedJoint, double tolerance)
        {
            double angle = GetJointPairAngle(thisJoint, otherJoint);

            double[]         rule        = new double[] { angle - tolerance, angle + tolerance };
            AngleGestureRule gestureRule = new AngleGestureRule(rule);

            AddChildJointRule(gestureRule, otherConnectedJoint);
        }
Esempio n. 3
0
        public void AddChildJointRule(AngleGestureRule gestureRule, ConnectedJoint connectedJoint)
        {
            ChildGestureRules childGestureRules = childGestureRulesCollection.Find(gr => gr.ChildID == connectedJoint.ID);

            if (childGestureRules != null)
            {
                childGestureRules.AddGestureRule(gestureRule);
            }
            else
            {
                childGestureRules = new ChildGestureRules(connectedJoint.ID, gestureRule);
                childGestureRulesCollection.Add(childGestureRules);
            }
        }
Esempio n. 4
0
 public bool RemoveGestureRule(AngleGestureRule gestureRule)
 {
     return(gestureRules.Remove(gestureRule));
 }
Esempio n. 5
0
 public ChildGestureRules(int childID, AngleGestureRule gestureRule)
 {
     this.childID      = childID;
     this.gestureRules = new List <AngleGestureRule>();
     this.gestureRules.Add(gestureRule);
 }
Esempio n. 6
0
        public void AddChildJointRule(AngleGestureRule gestureRule, ConnectedJoint connectedJoint)
        {
            ChildGestureRules childGestureRules = childGestureRulesCollection.Find(gr => gr.ChildID == connectedJoint.ID);

            if (childGestureRules != null)
            {
                childGestureRules.AddGestureRule(gestureRule);
            }
            else
            {
                childGestureRules = new ChildGestureRules(connectedJoint.ID, gestureRule);
                childGestureRulesCollection.Add(childGestureRules);
            }
        }
Esempio n. 7
0
        public void AddChildJointAngleRule(Joint thisJoint, Joint otherJoint, ConnectedJoint otherConnectedJoint, double tolerance)
        {
            double angle = GetJointPairAngle(thisJoint, otherJoint);
            double[] rule = new double[] { angle - tolerance, angle + tolerance };
            AngleGestureRule gestureRule = new AngleGestureRule(rule);

            AddChildJointRule(gestureRule, otherConnectedJoint);
        }