worked on nav-mesh

added dijkstra support for nav mesh
some minor changes to distributions
minor fixes
This commit is contained in:
k-a-z-u
2018-01-17 16:36:37 +01:00
parent e81e8c112d
commit 3c72bc814c
15 changed files with 696 additions and 48 deletions

View File

@@ -31,7 +31,12 @@ public:
/** get the dijkstra-pendant for the given user-node. null if none matches */
inline const DijkstraNode<T>* getNode(const T& userNode) const {
auto it = nodes.find(&userNode);
return getNode(&userNode);
}
/** get the dijkstra-pendant for the given user-node. null if none matches */
inline const DijkstraNode<T>* getNode(const T* userNode) const {
auto it = nodes.find(userNode);
return (unlikely(it == nodes.end())) ? (nullptr) : (it->second);
}