12345678910111213141516171819202122232425262728293031 |
- using System;
- using System.Collections.Generic;
- using System.Drawing;
- using System.Linq;
- using System.Text;
- using System.Threading.Tasks;
- using bbiwarg.Images;
- using bbiwarg.Graphics;
- using bbiwarg.Recognition.Tracking;
- using bbiwarg.Utility;
- namespace bbiwarg.Recognition.TouchRecognition
- {
- class TouchTracker : Tracker<TouchEvent, TrackedTouchEvent>
- {
- public List<TouchEvent> TouchEvents { get { return getCurrentObjectsWithState(TrackingState.Tracked); } }
- public event TouchEventHandler TouchDown;
- public event TouchEventHandler TouchMove;
- public event TouchEventHandler TouchUp;
- protected override TrackedTouchEvent createTrackedObject(TouchEvent detectedObject)
- {
- TrackedTouchEvent tte = new TrackedTouchEvent(idPool.getNextUnusedID(), detectedObject, Parameters.TouchTrackerNumFramesDetectedUntilTracked, Parameters.TouchTrackerNumFramesLostUntilDeleted);
- tte.TouchDown += TouchDown;
- tte.TouchMove += TouchMove;
- tte.TouchUp += TouchUp;
- return tte;
- }
- }
- }
|