Clear() public method

public Clear ( ) : void
return void
示例#1
0
        /** Initializes the NodeRunData for calculation of the specified path.
         * Called by core pathfinding functions just before starting to calculate a path.
         */
        public void Initialize(Path p)
        {
            path = p;

            pathID = p.pathID;

            //Resets the binary heap, don't clear everything because that takes an awful lot of time, instead we can just change the numberOfItems in it (which is just an int)
            //Binary heaps are just like a standard array but are always sorted so the node with the lowest F value can be retrieved faster
            open.Clear();
        }
示例#2
0
 public void InitializeForPath(Path p)
 {
     pathID = p.pathID;
     heap.Clear();
 }