Beispiel #1
0
        public List<IPrimitiveConditionData> GenerateRules(List<TouchPoint2> points)
        {
            List<IPrimitiveConditionData> rules = new List<IPrimitiveConditionData>();
            foreach (TouchPoint2 point in points)
            {
                if (point.Tag != null)
                {
                    rules.Add(null);
                    continue;
                }
                if (!point.isFinger && point.Snapshot!= null )
                {
                    TouchHand hand = new TouchHand();
                    string _type = "";
                    string _side = "";
                    hand.Kind = TouchHand.HAND;

                    ImageHelper.getHandType(out _type, out _side,  point);
                    if (_type != "")
                    {
                        hand.Type = _type;
                        hand.Side = _side;
                        rules.Add(hand);
                    }
                }
            }

            if (rules.Count > 0)
                return rules;
            else
                return null;
        }
Beispiel #2
0
 public void Init(IPrimitiveConditionData ruleData)
 {
     _data = ruleData as TouchHand;
 }