added support for pillars
minor fixes new 3D models
This commit is contained in:
47
mapview/2D/tools/ToolNewPillar.h
Normal file
47
mapview/2D/tools/ToolNewPillar.h
Normal file
@@ -0,0 +1,47 @@
|
||||
#ifndef TOOLNEWPILLAR_H
|
||||
#define TOOLNEWPILLAR_H
|
||||
|
||||
#include "ToolNewElement.h"
|
||||
#include "../../model/MMFloorObstacles.h"
|
||||
#include "../../model/MMFloorObstacleCircle.h"
|
||||
|
||||
class ToolNewPillar : public ToolNewElement<Floorplan::FloorObstacleCircle, MMFloorObstacleCircle> {
|
||||
|
||||
public:
|
||||
|
||||
ToolNewPillar(Tools& tools, MapLayer* layer) : ToolNewElement(tools, layer) {
|
||||
;
|
||||
}
|
||||
|
||||
void becomesActive() override {
|
||||
emit onHelpTextChange("left-click where to place a new pillar. right-click to end.");
|
||||
}
|
||||
|
||||
void becomesInactive() override {
|
||||
;
|
||||
}
|
||||
|
||||
const std::string getName() const override {
|
||||
return "new Pillar";
|
||||
}
|
||||
|
||||
void moving(const Point2 mapPoint) override {
|
||||
(void) mapPoint;
|
||||
}
|
||||
|
||||
void leftMouse(const Point2 mapPoint) override {
|
||||
const Floorplan::Material mat = Floorplan::Material::CONCRETE; // default material
|
||||
foEL = new Floorplan::FloorObstacleCircle(mat, mapPoint.x, mapPoint.y, 0.2);//"", Point3(mapPoint.x, mapPoint.y, 0.0), Point3(0,0,0));
|
||||
MMFloorObstacles* obs = (MMFloorObstacles*)layer;
|
||||
mmEL = obs->createCircle(foEL);
|
||||
}
|
||||
|
||||
void rightMouse(const Point2 mapPoint) override {
|
||||
(void) mapPoint;
|
||||
finalizeCurrent();
|
||||
disableMe();
|
||||
}
|
||||
|
||||
};
|
||||
|
||||
#endif // TOOLNEWPILLAR_H
|
||||
Reference in New Issue
Block a user