started removing KLib related code:

- assertions
- distributions
new helper methods
worked on stairs
worked on grid-walkers
worked on navigation
This commit is contained in:
2016-01-27 20:03:58 +01:00
parent e6329e1db4
commit 0e05f4bef8
26 changed files with 408 additions and 109 deletions

View File

@@ -13,7 +13,7 @@
#include "../../misc/Time.h"
#include "../../Defines.h"
#include <KLib/Assertions.h>
#include "../../Assertions.h"
template <typename T> class Dijkstra {
@@ -32,6 +32,7 @@ public:
// NOTE: end is currently ignored!
// runs until all nodes were evaluated
(void) end;
Log::add("Dijkstra", "calculating dijkstra from " + (std::string)start + " to ALL OTHER nodes", false);
Log::tick();
@@ -89,7 +90,7 @@ public:
// get the distance-weight to the neighbor
const float weight = acc.getWeightBetween(*dnSrc->element, *dst);
_assertTrue(weight >= 0, "edge-weight must not be negative!");
Assert::isTrue(weight >= 0, "edge-weight must not be negative!");
// update the weight to the destination?
const float potentialWeight = dnSrc->cumWeight + weight;