コード例 #1
0
ファイル: GestureDetector.cs プロジェクト: K-Cully/SticKart
        /// <summary>
        /// Adds the skeleton point to the positions being tracked by the gesture detector.
        /// Checks if the gesture has been detected.
        /// </summary>
        /// <param name="position">The position of the joint being tracked.</param>
        public virtual void Add(SkeletonPoint position)
        {
            if (this.GestureDetected == GestureType.None)
            {
                GestureEntry newEntry = new GestureEntry(position.ToVector3(), DateTime.UtcNow);
                this.GestureEntries.Add(newEntry);
                if (this.GestureEntries.Count > this.MaxRecordedPositions)
                {
                    this.GestureEntries.RemoveAt(0);
                }

                this.LookForGesture();
            }
        }
コード例 #2
0
ファイル: GestureDetector.cs プロジェクト: K-Cully/SticKart
        /// <summary>
        /// Adds the skeleton point to the positions being tracked by the gesture detector.
        /// Checks if the gesture has been detected.
        /// </summary>
        /// <param name="position">The position of the joint being tracked.</param>
        public virtual void Add(SkeletonPoint position)
        {
            if (this.GestureDetected == GestureType.None)
            {
                GestureEntry newEntry = new GestureEntry(position.ToVector3(), DateTime.UtcNow);
                this.GestureEntries.Add(newEntry);
                if (this.GestureEntries.Count > this.MaxRecordedPositions)
                {
                    this.GestureEntries.RemoveAt(0);
                }

                this.LookForGesture();
            }
        }