示例#1
0
 /// <summary>
 /// Enqueue a 'ContactType.Start' event.
 /// </summary>
 /// <param name="pSource">The SpatioTemporalClassifier which was the source.</param>
 /// <param name="pTracker">The reference to the SpatioTemporalTracker responsible for tracking this input.</param>
 private void handleInputClassifier_OnStart(SpatioTemporalClassifier pSource, SpatioTemporalTracker pTracker)
 {
     // Enqueue a contact removed event.
     lFrame.Enqueue(new WiiContact(pTracker.ID, ContactType.Start, new System.Windows.Point(pTracker.Position.X, pTracker.Position.Y), ScreenSize, pSource, pTracker));
 }
示例#2
0
        /// <summary>
        /// Construct a new WiiContact.
        /// </summary>
        /// <param name="iID">The unique session ID for this input.</param>
        /// <param name="eContactType">The type of contact.</param>
        /// <param name="tPosition">The position which generated the contact.</param>
        /// <param name="tNormalPosition">The maximum width/height so that we can generate a normalised position.</param>
        /// <param name="pClassifier">The classifer responsible for the history</param>
        /// <param name="pTracker">The tracker within the classifer responsible for the direct history.</param>
        public WiiContact(ulong iID, ContactType eContactType, Point tPosition, Vector tScreenSize, SpatioTemporalClassifier pClassifier, SpatioTemporalTracker pTracker)
        {
            this.Classifier = pClassifier;
            this.Tracker    = pTracker;

            this.ID             = iID;
            this.Type           = eContactType;
            this.Position       = tPosition;
            this.NormalPosition = new Point(tPosition.X / tScreenSize.X, tPosition.Y / tScreenSize.Y);
            this.Size           = new Vector(1, 1);
        }