Esempio n. 1
0
 private void Log(TouchPointFrame frame)
 {
     foreach (var tp in frame.touches)
     {
         Console.WriteLine($"  point {tp.id} come at ({tp.Position.X},{tp.Position.Y}) width:{tp.Acceleration.X} height:{tp.Acceleration.Y}");
     }
 }
Esempio n. 2
0
        private void ProcessFrame(TouchPointFrame frame)
        {
            try
            {
                var registredTangibles  = _tangibleMarkerController.Config.registredTangibles;
                var recognizedTangibles = _tangibleMarkerRecognizer.RecognizeTangibleMarkers(frame.touches, registredTangibles);

                Console.WriteLine($"Recognized markers{recognizedTangibles.Count}");
                var currentRecognizedTangibles = DetermineMarkerState(recognizedTangibles);
                previouslyRecognizedTangibles = currentRecognizedTangibles;

                // TODO - split touches from objects

                OnTuioInput?.Invoke(frame.touches, currentRecognizedTangibles.Values.ToList());
            }
            catch (System.Exception ex)
            {
                Console.WriteLine(ex);
            }
        }
Esempio n. 3
0
        private void Serialize(TouchPointFrame frame)
        {
            var frameData = JsonConvert.SerializeObject(frame, Formatting.None);

            _streamWriter.WriteLine($"{frameData.ToString()}");
        }