This repository has been archived on 2020-04-08. You can view files and clone it, but cannot push or open issues or pull requests.
Files
IndoorMap/mapview/model/MMFloorObstacleLine.h
kazu fa06320219 a whole lotta work!!
- refactoring
- completely changed the tooling (adding elements)
- better re-use for more stable editing
- new elements
- ui adjustments
- LINT for stair-editing
- many more changes
2016-08-29 19:05:46 +02:00

49 lines
1.4 KiB
C++

#ifndef MAPELEMENTOBSTACLE_H
#define MAPELEMENTOBSTACLE_H
#include "MapModelElement.h"
#include "../2D/MapViewElementHelper.h"
#include "IHasMaterial.h"
#include "IHasObstacleType.h"
#include "../2D/MV2DElementFloorObstacleLine.h"
#include "../3D/MV3DElementFloorObstacleWall.h"
#include <Indoor/floorplan/v2/Floorplan.h>
class MMFloorObstacleLine : public MapModelElement, public IHasMaterial, public IHasObstacleType {
public:
Floorplan::Floor* mf;
Floorplan::FloorObstacleLine* fo;
MV2DElementFloorObstacleLine mv2d;
MV3DElementFloorObstacleWall mv3d;
public:
MMFloorObstacleLine(MapLayer* parent, Floorplan::Floor* mf, Floorplan::FloorObstacleLine* fo) :
MapModelElement(parent), mf(mf), fo(fo), mv2d(fo), mv3d(mf,fo) {
}
void setMaterial(const Floorplan::Material m) override {fo->material = m;}
Floorplan::Material getMaterial() const override {return fo->material;}
void setObstacleType(const Floorplan::ObstacleType t) override {fo->type = t;}
Floorplan::ObstacleType getObatcleType() const override {return fo->type;}
MV2DElement* getMV2D() const override {return (MV2DElement*) &mv2d;}
MV3DElement* getMV3D() const override {return (MV3DElement*) &mv3d;}
void deleteMe() const override {
parent->removeElement(this);
mf->obstacles.erase(std::remove(mf->obstacles.begin(), mf->obstacles.end(), fo), mf->obstacles.end());
}
};
#endif // MAPELEMENTOBSTACLE_H