26 #include "../CD_LIB/CDGrid.h"
30 namespace OpenSkyNet {
42 std::list<QueueNode> _q;
43 std::list<QueueNode>::iterator _front;
44 std::list<QueueNode>::iterator _back;
46 bool _deletedRightPaths;
47 bool _deletedLeftPaths;
49 bool _deletedDownPaths;
50 bool _deletedForwardPaths;
51 bool _deletedBackwardPaths;
57 inline bool isEmpty()
const {
return (!(_q.size() > 1)); }
61 _q.push_back(*_front);
64 _back->_pathDirs = _back->_pathDirs*10+dir_;
65 if (_back->_pathDirs < 10)
66 _back->_initPathDir =
static_cast<CD::DIRECTION>(_back->_pathDirs);
78 return (static_cast<CD::DIRECTION>(_front->_pathDirs - (_front->_pathDirs/10)*10));
86 if (!_q.size())
return false;
void init(const Math::Point< Utils::uint > &bin_)
Definition: PFQueue.cpp:17
bool getCurrBin(Math::Point< Utils::uint > &bin_) const
Definition: PFQueue.h:85
bool isEmpty() const
Definition: PFQueue.h:57
User editable constants to finetune the pathfinder's capabilities.
const uint INITIAL_TABLE_SIZE
Definition: UHash.h:34
void deletePathDirsStartingWith(CD::DIRECTION dir_)
Definition: PFQueue.cpp:35
CD::DIRECTION dequeue(Math::Point< Utils::uint > &bin_)
Definition: PFQueue.h:74
Utils::uint getCompositeKey(const Math::Point< Utils::uint > &bin_)
Definition: CDGrid.h:41
DIRECTION
Definition: CDGrid.h:61
std::vector< CD::DIRECTION > returnFrontPathDirsAsVector() const
Definition: PFQueue.cpp:80
unsigned long long uint64
Definition: UTypes.h:43
void setVisitedBin(const Math::Point< Utils::uint > &bin_, bool isVisited_)
Definition: PFQueue.h:91
void add(const uint &key_, const T &value_)
Definition: UHash.h:185
bool enqueue(CD::DIRECTION dir_, const Math::Point< Utils::uint > &bin_)
Definition: PFQueue.h:59
Queue()
Definition: PFQueue.h:53