예제 #1
0
        public void Track(TrackingContext context)
        {
            // This is where we would spawn new threads for each tracking.
            Dictionary <string, bool> insertionMap = new Dictionary <string, bool>();
            bool atLeastOneInserted = false;

            foreach (KeyValuePair <string, TrackablePoint> pair in trackablePoints)
            {
                bool inserted = pair.Value.Track(context);
                drawing.SetTrackablePointValue(pair.Key, pair.Value.CurrentValue, pair.Value.TimeDifference);

                insertionMap[pair.Key] = inserted;
                if (inserted)
                {
                    atLeastOneInserted = true;
                }
            }

            if (atLeastOneInserted)
            {
                FixTimelineSync(insertionMap);
            }
        }
예제 #2
0
        public void Track(TrackingContext context)
        {
            // This is where we would spawn new threads for each tracking.
            // TODO: Extract the bitmapdata once and pass it to all.
            foreach (KeyValuePair <string, TrackablePoint> pair in trackablePoints)
            {
                pair.Value.Track(context);

                if (isTracking)
                {
                    drawing.SetTrackablePointValue(pair.Key, pair.Value.CurrentValue);
                }
            }
        }