public void RecognizeShape() { recognized = true; if (points.Count > 0) { Gesture candidate = new Gesture(points.ToArray()); Result gestureResult = QPointCloudRecognizer.ClassifyWithResult(candidate, trainingSet.ToArray()); /*Fire off the event with the spell we've gotten * TODO: maybe log if a shape wasn't detected * This will come in handy if we extend the recognizer to discard any shapes that are badly draw for example */ onSpellRecognized.Raise(spellList.GetSpell(gestureResult.GestureClass)); Debug.Log(gestureResult.GestureClass); } strokeID = -1; points.Clear(); foreach (UILineRendererList lineRenderer in gestureLinesRenderer) { Destroy(lineRenderer.gameObject); } gestureLinesRenderer.Clear(); }
public void RecognizeShape() { recognized = true; Gesture candidate = new Gesture(points.ToArray()); Result gestureResult = QPointCloudRecognizer.ClassifyWithResult(candidate, trainingSet.ToArray()); resultText.text = gestureResult.GestureClass; }