initial version
This commit is contained in:
49
floorplan/Floor.h
Executable file
49
floorplan/Floor.h
Executable file
@@ -0,0 +1,49 @@
|
||||
#ifndef FLOOR_H
|
||||
#define FLOOR_H
|
||||
|
||||
#include <vector>
|
||||
#include "../geo/Line2D.h"
|
||||
|
||||
/**
|
||||
* represents one floor by describing all contained obstacles
|
||||
*/
|
||||
class Floor {
|
||||
|
||||
private:
|
||||
|
||||
|
||||
/** all obstacles within the floor */
|
||||
std::vector<Line2D> lines;
|
||||
|
||||
/** total width of the floor (in meter) */
|
||||
double width_cm;
|
||||
|
||||
/** total depth of the floor (in meter) */
|
||||
double depth_cm;
|
||||
|
||||
|
||||
public:
|
||||
|
||||
/** ctor */
|
||||
Floor(const float width_cm, const float depth_cm) : width_cm(width_cm), depth_cm(depth_cm) {;}
|
||||
|
||||
/** get all obstacles */
|
||||
const std::vector<Line2D>& getObstacles() const {
|
||||
return lines;
|
||||
}
|
||||
|
||||
/** add a new obstacle to this floor */
|
||||
void addObstacle(const Line2D& l ) {
|
||||
lines.push_back(l);
|
||||
}
|
||||
|
||||
/** get the floorplan's total width */
|
||||
float getWidth_cm() const {return width_cm;}
|
||||
|
||||
/** get the floorplan's total depth */
|
||||
float getDepth_cm() const {return depth_cm;}
|
||||
|
||||
|
||||
};
|
||||
|
||||
#endif // FLOOR_H
|
||||
Reference in New Issue
Block a user