worked on windows
This commit is contained in:
@@ -415,7 +415,7 @@ namespace Floorplan {
|
||||
FloorObstacleWallDoor* door = new FloorObstacleWallDoor(
|
||||
parseDoorType(n->Attribute("type")),
|
||||
parseMaterial(n->Attribute("material")),
|
||||
n->FloatAttribute("at"),
|
||||
n->FloatAttribute("x01"),
|
||||
n->FloatAttribute("width"),
|
||||
n->FloatAttribute("height"),
|
||||
n->BoolAttribute("lr"),
|
||||
@@ -425,6 +425,22 @@ namespace Floorplan {
|
||||
}
|
||||
}
|
||||
|
||||
// windows
|
||||
FOREACH_NODE(n, el) {
|
||||
if (std::string("window") == n->Name()) {
|
||||
FloorObstacleWallWindow* win = new FloorObstacleWallWindow(
|
||||
parseWindowType(n->Attribute("type")),
|
||||
parseMaterial(n->Attribute("material")),
|
||||
n->FloatAttribute("x01"),
|
||||
n->FloatAttribute("y"),
|
||||
n->FloatAttribute("width"),
|
||||
n->FloatAttribute("height"),
|
||||
n->BoolAttribute("io")
|
||||
);
|
||||
wall->windows.push_back(win);
|
||||
}
|
||||
}
|
||||
|
||||
return wall;
|
||||
|
||||
}
|
||||
@@ -534,6 +550,10 @@ namespace Floorplan {
|
||||
try { return (DoorType) std::stoi(type); } catch (...) { return DoorType::UNKNOWN; }
|
||||
}
|
||||
|
||||
static WindowType parseWindowType(const std::string type) {
|
||||
try { return (WindowType) std::stoi(type); } catch (...) { return WindowType::UNKNOWN; }
|
||||
}
|
||||
|
||||
static Material parseMaterial(const std::string material) {
|
||||
try {
|
||||
return (Material) std::stoi(material);
|
||||
|
||||
Reference in New Issue
Block a user