minor changes to floorplan

fixed some compile issues
worked on nav-meshes
added some tests
This commit is contained in:
2018-01-16 12:41:05 +01:00
parent fee6cd3496
commit 55061ef0da
24 changed files with 1288 additions and 205 deletions

View File

@@ -111,6 +111,10 @@ public:
return Base::get(distance);
}
bool doneAtDistance(const float distance) const {
return Base::getMaxKey() < distance;
}
/** at the given distance: are we walking on a plain surface or up/down? */
bool isPlain(const float distance) const {
const Point3 pos1 = getPosAfterDistance(distance);

View File

@@ -55,7 +55,7 @@ private:
public:
/** ctor with the walker to follow */
SyntheticSteps(SyntheticWalker* walker, const float stepSize_m = 0.7, const float stepSizeStair_m = 0.3, const float stepSizeSigma_m = 0.1, const float noiseLevel = 0.33) :
SyntheticSteps(SyntheticWalker* walker, const float stepSize_m = 0.7, const float stepSizeStair_m = 0.35, const float stepSizeSigma_m = 0.1, const float noiseLevel = 0.33) :
//stepSize_m(stepSize_m), drift(drift), stepSizeSigma_m(stepSizeSigma_m),
noiseLevel(noiseLevel), dNextStep(stepSize_m, stepSizeSigma_m), dNextStepStair(stepSizeStair_m, stepSizeSigma_m) {

View File

@@ -49,6 +49,10 @@ public:
this->listeners.push_back(l);
}
bool done() {
return path.doneAtDistance(this->walkedDistance);
}
/** increment the walk */
Point3 tick(const Timestamp timePassed) {