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}"); } }
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); } }
private void Serialize(TouchPointFrame frame) { var frameData = JsonConvert.SerializeObject(frame, Formatting.None); _streamWriter.WriteLine($"{frameData.ToString()}"); }