started working on walling, dooring and windowing

refactoring
This commit is contained in:
k-a-z-u
2018-07-25 16:21:47 +02:00
parent f7e4323d58
commit 0d22d91470
9 changed files with 368 additions and 48 deletions

View File

@@ -36,7 +36,7 @@ namespace Floorplan3D {
bool exportObjects = true;
bool exportPillars = true;
bool exportWallTops = false;
bool center = true;
bool center = false;
//Walls* walls = new WallsViaCubes();
//Walls* walls = new WallsViaCuttedQuads();
@@ -92,6 +92,11 @@ namespace Floorplan3D {
// process each obstacle within the floor
if (f->obstacles.enabled) {
if (1 == 1) {
const std::vector<Obstacle3D> tmp = getLines(f);
res.insert(res.end(), tmp.begin(), tmp.end());
}
if (1 == 1) {
const std::vector<Obstacle3D> tmp = getWalls(f);
res.insert(res.end(), tmp.begin(), tmp.end());
@@ -140,6 +145,20 @@ namespace Floorplan3D {
WallsViaCuttedQuads walls;
for (const Floorplan::FloorObstacle* obs : f->obstacles) {
const Floorplan::FloorObstacleWall* wall = dynamic_cast<const Floorplan::FloorObstacleWall*>(obs);
if (wall) {walls.add(f, wall);}
}
return walls.get();
}
/** get all old walls (lines) */
std::vector<Obstacle3D> getLines(const Floorplan::Floor* f) {
WallsViaCubes walls;
for (const Floorplan::FloorObstacle* obs : f->obstacles) {
const Floorplan::FloorObstacleLine* line = dynamic_cast<const Floorplan::FloorObstacleLine*>(obs);
if (line) {walls.add(f, line, nullptr);}