interface changes

added new data-strcutures for new sensors
new helper methods
fixed some issues
This commit is contained in:
2017-05-24 09:23:27 +02:00
parent f67f95d1ce
commit d40032ca74
29 changed files with 471 additions and 68 deletions

View File

@@ -97,6 +97,11 @@ namespace Floorplan {
checkStair(res, floor, s);
}
// check elevators
for (const Elevator* e : floor->elevators) {
checkElevator(res, floor, e);
}
}
// done
@@ -190,7 +195,7 @@ namespace Floorplan {
for (int i = 0; i < (int) parts.size(); ++i) {
const Floorplan::Quad3& quad = quads[i];
//const Floorplan::Quad3& quad = quads[i];
// disconnected within?
if (i > 0) {
@@ -201,7 +206,17 @@ namespace Floorplan {
}
}
static void checkElevator(Issues& res, const Floor* floor, const Elevator* e) {
if (e->depth < 0.5) {
res.push_back(Issue(Type::ERROR, floor, "elevator's depth @" + e->center.asString() + " is too small: " + std::to_string(e->depth) + "m"));
}
if (e->width < 0.5) {
res.push_back(Issue(Type::ERROR, floor, "elevator's width @" + e->center.asString() + " is too small: " + std::to_string(e->width) + "m"));
}
}