moved from ray3 to floorplan/3D

worked on new wall models
refactoring
This commit is contained in:
2018-07-24 08:13:16 +02:00
parent 083a1c2cf2
commit 8dd1ba0be6
25 changed files with 703 additions and 92 deletions

33
floorplan/3D/misc.h Normal file
View File

@@ -0,0 +1,33 @@
#ifndef FLOORPLAN_3D_MISC_H
#define FLOORPLAN_3D_MISC_H
#include "Obstacle3.h"
namespace Floorplan3D {
/** used to model ceiling thickness */
struct FloorPos {
float fh;
float z1;
float z2;
float height;
FloorPos(const Floorplan::Floor* f) : fh(0.01), z1(f->getStartingZ()), z2(f->getEndingZ()-fh), height(z2-z1) {;}
};
static Obstacle3D::Type getType(const Floorplan::FloorObstacleLine* l) {
switch (l->type) {
case Floorplan::ObstacleType::WALL: return Obstacle3D::Type::WALL;
case Floorplan::ObstacleType::WINDOW: return Obstacle3D::Type::WINDOW;
case Floorplan::ObstacleType::HANDRAIL: return Obstacle3D::Type::HANDRAIL;
default: return Obstacle3D::Type::UNKNOWN;
}
}
static Obstacle3D::Type getType(const Floorplan::FloorObstacleCircle* c) {
(void) c;
return Obstacle3D::Type::WALL;
}
}
#endif // FLOORPLAN_3D_MISC_H