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
Indoor/floorplan/Floor.h
2018-10-25 11:50:12 +02:00

63 lines
1.2 KiB
C++
Executable File
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

/*
* © 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