dijkstra is now bleching fast
deleting from the grid is now bleaching fast added new helper methods many new test-cases many new methods for geo classes and others added a bunch of new grid-walkers
This commit is contained in:
@@ -184,11 +184,12 @@ private:
|
||||
Stair s;
|
||||
Line2 dir = scaler.scale(line);
|
||||
s.dir = (dir.p2 - dir.p1);
|
||||
const float d = 9;
|
||||
s.from.add(start.p1 + Point2(-d,-d));
|
||||
s.from.add(start.p1 + Point2(+d,+d));
|
||||
s.from.add(start.p2 + Point2(-d,-d));
|
||||
s.from.add(start.p2 + Point2(+d,+d));
|
||||
// const float d = 50;
|
||||
s.start = start;
|
||||
// s.from.add(start.p1 + Point2(-d,-d));
|
||||
// s.from.add(start.p1 + Point2(+d,+d));
|
||||
// s.from.add(start.p2 + Point2(-d,-d));
|
||||
// s.from.add(start.p2 + Point2(+d,+d));
|
||||
stairs.push_back(s);
|
||||
}
|
||||
}
|
||||
|
||||
17
floorplan/PlatformStair.h
Normal file
17
floorplan/PlatformStair.h
Normal file
@@ -0,0 +1,17 @@
|
||||
#ifndef PLATFORMSTAIR_H
|
||||
#define PLATFORMSTAIR_H
|
||||
|
||||
#include "Stair.h";
|
||||
|
||||
|
||||
class PlatformStair {
|
||||
|
||||
Stair s1;
|
||||
|
||||
BBox2 platform;
|
||||
|
||||
Stair s2;
|
||||
|
||||
};
|
||||
|
||||
#endif // PLATFORMSTAIR_H
|
||||
@@ -4,10 +4,11 @@
|
||||
#include "../geo/BBox2.h"
|
||||
#include "../geo/Point2.h"
|
||||
|
||||
/** a simple stair with a slope from A to B */
|
||||
struct Stair {
|
||||
|
||||
/** bbox with all starting points */
|
||||
BBox2 from;
|
||||
/** starting line of the stair */
|
||||
Line2 start;
|
||||
|
||||
/** the direction to move all the starting points to */
|
||||
Point2 dir;
|
||||
|
||||
Reference in New Issue
Block a user