public static HeuristicD heuristic; // Heuristic object containing the dijkstra movement costs

    #endregion Fields

    #region Constructors

    // claim a node at any given time)
    // <summary>
    // Constructor that initializes the data structures necessary for the path planning approach
    // </summary>
    static PathPlanningDataStructures()
    {
        graph = new GenerateGraph();
        heuristic = new HeuristicD(graph);
        globalLock = new object();
        Debug.Log ("Heuristic Finished");
    }
    public static object globalLock;     // Global lock for synchronizing access to nodes (only one car
    // claim a node at any given time)

    // <summary>
    // Constructor that initializes the data structures necessary for the path planning approach
    // </summary>
    static PathPlanningDataStructures()
    {
        graph      = new GenerateGraph();
        heuristic  = new HeuristicD(graph);
        globalLock = new object();
        Debug.Log("Heuristic Finished");
    }
 // <summary>
 // Constructor that initializes the data structures necessary for the path planning approach
 // </summary>
 public static void initializePathPlanning()
 {
     lock (globalLock) {
         if (pathPlanningInitialized == false) {
             graph = new GenerateGraph ();
             heuristic = new HeuristicD (graph);
             pathPlanningInitialized = true;
         }
     }
 }
 // <summary>
 // Constructor that initializes the data structures necessary for the path planning approach
 // </summary>
 public static void initializePathPlanning()
 {
     lock (globalLock) {
         if (pathPlanningInitialized == false)
         {
             graph     = new GenerateGraph();
             heuristic = new HeuristicD(graph);
             pathPlanningInitialized = true;
         }
     }
 }
예제 #5
0
 static AStar()
 {
     graph = new GenerateGraph();
     heuristic = new HeuristicD(graph);
 }
예제 #6
0
 static AStar()
 {
     graph     = new GenerateGraph();
     heuristic = new HeuristicD(graph);
 }