示例#1
0
 /// <summary>
 ///  launch the update on all gestures
 /// </summary>
 /// <param name="depthFrame">the depthImageFrame to observe</param>
 public void FindHandGestures(DepthImageFrame depthFrame)
 {
     if (skeleton != null)
     {
         handDetector.SetUp(skeleton, depthFrame);
         foreach (HandType handtype in Enum.GetValues(typeof(HandType)))
         {
             //Only LEFT and RIGHT
             if (handtype != HandType.NULL)
             {
                 result = handDetector.FindHandGesture(handtype);
                 if (!String.IsNullOrEmpty(result))
                 {
                     HandGestureName handGesture = (HandGestureName)Enum.Parse(typeof(HandGestureName), result.ToString());
                     if (this.GestureRecognised != null)
                     {
                         GestureDatas e = new GestureDatas();
                         e.handGestureEventData = new HandGestureDatas(handGesture, handtype);
                         this.GestureRecognised(this, new GestureEventArgs(EventType.HAND, e, Helper.GetTimeStamp()));
                     }
                 }
             }
         }
     }
 }
示例#2
0
 /// <summary>
 /// Default constructor
 /// </summary>
 /// <param name="name">the name of the hand gesture</param>
 /// <param name="type">the hand firing the event</param>
 /// <param name="isRHandMoving"></param>
 /// <param name="isLHandMoving"></param>
 public HandGestureDatas(HandGestureName name, HandType type)
 {
     this.handGestureName = name;
     this.handType        = type;
 }
 public TemplateClass(SerializationInfo info, StreamingContext ctxt)
 {
     this.templates = (List <Template>)info.GetValue("Templates", typeof(List <Template>));
     this.name      = (HandGestureName)info.GetValue("Name", typeof(HandGestureName));
     this.htype     = (HandType)info.GetValue("Type", typeof(HandType));
 }
 public TemplateClass(HandGestureName name, HandType type)
 {
     this.templates = new List <Template>();
     this.name      = name;
     this.htype     = type;
 }
 /// <summary>
 /// constructor for GestureEvents:HAND
 /// </summary>
 /// <param name="name">name of the hand gesture</param>
 /// <param name="type">hand firing the event</param>
 public Datas(HandGestureName name, HandType type)
 {
     this.GestureDatas = new GestureDatas(null, new HandGestureDatas(name, type), null);
 }
示例#6
0
 public TemplateClass(SerializationInfo info, StreamingContext ctxt)
 {
     this.templates = (List<Template>)info.GetValue("Templates", typeof(List<Template>));
     this.name = (HandGestureName)info.GetValue("Name", typeof(HandGestureName));
     this.htype = (HandType)info.GetValue("Type", typeof(HandType));
 }
示例#7
0
 public TemplateClass(HandGestureName name, HandType type)
 {
     this.templates = new List<Template>();
     this.name = name;
     this.htype = type;
 }
 /// <summary>
 /// Default constructor
 /// </summary>
 /// <param name="name">the name of the hand gesture</param>
 /// <param name="type">the hand firing the event</param>
 /// <param name="isRHandMoving"></param>
 /// <param name="isLHandMoving"></param>
 public HandGestureDatas(HandGestureName name, HandType type)
 {
     this.handGestureName = name;
     this.handType = type;
 }
 /// <summary>
 /// constructor for GestureEvents:HAND
 /// </summary>
 /// <param name="name">name of the hand gesture</param>
 /// <param name="type">hand firing the event</param>
 public Datas(HandGestureName name, HandType type)
 {
     this.GestureDatas = new GestureDatas(null, new HandGestureDatas(name, type), null);
 }