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

@@ -1,17 +1,32 @@
#ifndef PLATFORMSTAIR_H
#define PLATFORMSTAIR_H
#include "Stair.h";
#include "Stair.h"
class PlatformStair {
struct PlatformStair {
/** stair to the platform */
Stair s1;
/** platform in the center */
BBox2 platform;
/** stair from the platform */
Stair s2;
PlatformStair() : s1(), platform(), s2() {;}
// PlatformStair(const Line2& startEdge, const Line2& endEdge, const int w2, const int w2) {
// s1.start = startEdge;
// s2.start = endEdge;
// Point2 edgeDir = startEdge.p2 - startEdge.p1;
// Point2 perp(edgeDir.y, -edgeDir.x);
// platform.add(startEdge.p1 + perp);
// plat
// }
};
#endif // PLATFORMSTAIR_H

View File

@@ -13,6 +13,13 @@ struct Stair {
/** the direction to move all the starting points to */
Point2 dir;
/** empty ctor */
Stair() : start(), dir() {;}
/** ctor with starting edge and stair-direction */
Stair(const Line2& start, const Point2& dir) : start(start), dir(dir) {;}
};
#endif // STAIR_H