2009-12-07 16:03:53 +01:00
|
|
|
#ifndef _OWLPS_POSITIONING_AREA_HH_
|
|
|
|
#define _OWLPS_POSITIONING_AREA_HH_
|
2008-04-11 10:11:29 +02:00
|
|
|
|
2009-12-07 16:03:53 +01:00
|
|
|
class Area ;
|
|
|
|
|
|
|
|
#include "building.hh"
|
|
|
|
#include "point3d.hh"
|
|
|
|
|
|
|
|
#include <vector>
|
2008-04-11 10:11:29 +02:00
|
|
|
#include <iostream>
|
|
|
|
#include <string>
|
|
|
|
|
2009-12-07 16:03:53 +01:00
|
|
|
using namespace std ;
|
2008-04-11 10:11:29 +02:00
|
|
|
|
|
|
|
class Area
|
2010-05-21 10:35:15 +02:00
|
|
|
{
|
|
|
|
protected:
|
2009-12-07 16:03:53 +01:00
|
|
|
Building *building ;
|
|
|
|
string name ;
|
|
|
|
Point3D p_min ;
|
|
|
|
Point3D p_max ;
|
2009-05-29 13:46:49 +02:00
|
|
|
|
2010-05-21 10:35:15 +02:00
|
|
|
public:
|
2009-12-07 16:03:53 +01:00
|
|
|
Area(const Building &_building, const string &_name = "Unnamed area",
|
|
|
|
const float &_x1 = 0, const float &_y1 = 0, const float &_z1 = 0,
|
|
|
|
const float &_x2 = 0, const float &_y2 = 0, const float &_z2 = 0) ;
|
2010-05-21 10:35:15 +02:00
|
|
|
Area(const Area &a) ;
|
2009-05-29 13:46:49 +02:00
|
|
|
|
2009-12-11 13:52:21 +01:00
|
|
|
~Area() {}
|
2009-12-07 16:03:53 +01:00
|
|
|
|
|
|
|
Building* get_building(void) const ;
|
|
|
|
string get_name(void) const ;
|
|
|
|
Point3D get_p_min(void) const ;
|
|
|
|
Point3D get_p_max(void) const ;
|
|
|
|
|
|
|
|
void set_building(const Building &_building) ;
|
|
|
|
void set_name(const string &_name) ;
|
|
|
|
void set_x_min(const float &v) ;
|
|
|
|
void set_y_min(const float &v) ;
|
|
|
|
void set_z_min(const float &v) ;
|
|
|
|
void set_x_max(const float &v) ;
|
|
|
|
void set_y_max(const float &v) ;
|
|
|
|
void set_z_max(const float &v) ;
|
|
|
|
void set_p_min(const Point3D &p) ;
|
|
|
|
void set_p_max(const Point3D &p) ;
|
2009-05-29 13:46:49 +02:00
|
|
|
|
2009-12-07 16:03:53 +01:00
|
|
|
bool contains_point(const Point3D &p) const ;
|
2009-05-29 13:46:49 +02:00
|
|
|
|
2009-12-07 16:03:53 +01:00
|
|
|
bool operator==(const Area &a) const ;
|
|
|
|
inline bool operator!=(const Area &a) const ;
|
2009-05-29 13:46:49 +02:00
|
|
|
|
2010-05-21 10:35:15 +02:00
|
|
|
friend ostream &operator<<(ostream &os, const Area &a) ;
|
2009-12-07 16:03:53 +01:00
|
|
|
} ;
|
2008-04-11 10:11:29 +02:00
|
|
|
|
2009-12-07 16:03:53 +01:00
|
|
|
#endif // _OWLPS_POSITIONING_AREA_HH_
|