/// <summary> /// Clear the current graph and start the grahan scan algorithm /// </summary> public void startGrahanScan() { clearGraph(); options.transform.Find("Toggle").GetComponent <Toggle>().isOn = false; graph.clearInfo(); grahanScan.triggerGrahamScan(selectedPoints, pinList); calculatingShortestPath = false; }
IEnumerator graphRoutine() { yield return(new WaitForSeconds(1f)); pointsThatsBelongToConvexHull.Clear(); selectedPoints = stateManager.selectedPoints; pinList = stateManager.pinList; hullPoints = grahanScan.hullPoints; grahanScan.triggerGrahamScan(selectedPoints, pinList); graph.buildGraph(selectedPoints, pinList); Debug.Log(hullPoints.Count); Debug.Log(pinList.Count); graph.buildGraphForAutoPath(hullPoints); // findPathForNodes(); StartCoroutine(findPathForNodes()); }