67 std::vector<SpatialStructures::Node> out_nodes;
68 out_nodes.reserve(
size());
73 while (!
node_queue.empty() && num_popped < max)
75 out_nodes.push_back(
pop());
Contains definitions for the UniqueQueue class.
Generate a graph of accessible space from a given start point.
std::unordered_map< int, HIT_FLAG > hashmap
Hashmap used for assigning and storing hitflags for IDs.
std::queue< HF::SpatialStructures::Node > node_queue
The underlying queue.
HF::SpatialStructures::Node pop()
Remove the topmost node from the queue and return it.
bool forcePush(const HF::SpatialStructures::Node &p)
Forcibly push a node onto the queue without checking it. Saves a hash function, but risks breaking th...
int size() const
Determine how many nodes are currently in the queue.
void clearQueue()
Clear every node from the queue without forgetting them.
bool empty() const
Tell if the queue is empty.
HF::SpatialStructures::Node popFromDict()
Retrieve the topmost node from the queue, but "forget" about it to allow it to enter again in the fut...
bool push(const HF::SpatialStructures::Node &p)
Add a node to the queue if it has never previously been in the queue.
std::vector< SpatialStructures::Node > popMany(int max=-1)
Pop a set amount of nodes from the queue, and return them as a vector.
bool hasNode(const HF::SpatialStructures::Node &p) const
Check to see if the node has ever been in the queue.
A point in space with an ID.