public Unistroke SavePattern(string name, IEnumerable <Vector2> points) { Unistroke stroke = new Unistroke(name, points); /* int index = library.Count; * library.Add(stroke); * * List<int> examples = null; * if (_libraryIndex.ContainsKey(stroke.name)) * examples = _libraryIndex[stroke.name]; * if (examples == null) * { * examples = new List<int>(); * _libraryIndex[stroke.name] = examples; * } * stroke.ExampleIndex = examples.Count; * examples.Add(index); */ return(stroke); }
public static float distanceAtAngle(Vector2[] points, Unistroke test, float angle) { Vector2[] rotated = new Vector2[points.Length]; rotateBy(rotated, angle); return(pathDistance(rotated, test.points)); }
public Result(Unistroke match, float score, float angle) { Match = match; Score = score; Angle = angle; }