Pathfinding.BinaryHeapM.Clear C# (CSharp) Method

Clear() public method

public Clear ( ) : void
return void
		public void Clear () {
			numberOfItems = 1;
		}
		

Usage Example

示例#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();
        }
All Usage Examples Of Pathfinding.BinaryHeapM::Clear