/// <summary> /// Creates a new KinectGesture instance. /// </summary> /// <param name="type">Type of the recognizable gesture</param> /// <param name="gestureFrames">Sequence of frames that represent the gesture</param> public KinectGesture(KinectGestureType type, IKinectGestureFrame[] gestureFrames) { this.gestureType = type; this.gestureFrames = gestureFrames; this.currentFrameIndex = 0; this.currentFrameCount = 0; this.pausedFrameCount = 0; this.gesturePaused = false; }
/// <summary> /// Adds a new complex gesture to the gestures controller. /// </summary> /// <param name="type">Type of the gesture to be added</param> /// <param name="frames">Frames that represent the complex gesture</param> public void AddGesture(KinectGestureType type, IKinectGestureFrame[] frames) { KinectGesture gesture = new KinectGesture(type, frames); // Bind the controller "gesture recognized" event trigger to the // added gesture. gesture.KinectGestureRecognized += new EventHandler<KinectGestureEventArgs>(this.KinectGesture_KinectGestureRecognized); this.recognizableGestures.Add(gesture); }
/// <summary> /// Creates a new KinectGestureEventArgs instance. /// </summary> /// <param name="type">Type of the recognized gesture</param> /// <param name="trackingId">TrackingID of the analyzed skeleton</param> public KinectGestureEventArgs(KinectGestureType type, int trackingId) { this.gestureType = type; this.trackingId = trackingId; }