63 lines
1.2 KiB
C++
Executable File
63 lines
1.2 KiB
C++
Executable File
/*
|
||
* © Copyright 2014 – Urheberrechtshinweis
|
||
* Alle Rechte vorbehalten / All Rights Reserved
|
||
*
|
||
* Programmcode ist urheberrechtlich geschuetzt.
|
||
* Das Urheberrecht liegt, soweit nicht ausdruecklich anders gekennzeichnet, bei Frank Ebner.
|
||
* Keine Verwendung ohne explizite Genehmigung.
|
||
* (vgl. § 106 ff UrhG / § 97 UrhG)
|
||
*/
|
||
|
||
#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:
|
||
|
||
/** empty ctor */
|
||
Floor() {;}
|
||
|
||
/** 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
|