Exemple #1
0
 public Unistroke(string name, IEnumerable <Vector2> points)
 {
     this.name   = string.Intern(name);
     this.points = DollarRecognizer.resample(points, DollarRecognizer._kNormalizedPoints);
     angle       = DollarRecognizer.indicativeAngle(this.points);
     DollarRecognizer.rotateBy(this.points, -angle);
     DollarRecognizer.scaleTo(this.points, DollarRecognizer._kNormalizedSize);
     DollarRecognizer.translateTo(this.points, Vector2.zero);
     vector = DollarRecognizer.vectorize(this.points);
 }
        private void Awake()
        {
            trainingSetFile = Registry.Instance.oneDollarTrainingSet;
            recognizer      = new DollarOne.DollarRecognizer();
#if UNITY_EDITOR
            oscSensor.SetActive(true);
            nativeSensor.SetActive(false);
#else
            oscSensor.SetActive(false);
            nativeSensor.SetActive(true);
#endif
        }