50 lines
884 B
C++
Executable File
50 lines
884 B
C++
Executable File
#ifndef FLOOR_H
|
|
#define FLOOR_H
|
|
|
|
#include <vector>
|
|
#include "../geo/Line2.h"
|
|
|
|
/**
|
|
* represents one floor by describing all contained obstacles
|
|
*/
|
|
class Floor {
|
|
|
|
private:
|
|
|
|
|
|
/** all obstacles within the floor */
|
|
std::vector<Line2> 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<Line2>& getObstacles() const {
|
|
return lines;
|
|
}
|
|
|
|
/** add a new obstacle to this floor */
|
|
void addObstacle(const Line2& 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
|