2008-04-11 10:11:29 +02:00
|
|
|
#ifndef _AREA_HH_
|
|
|
|
#define _AREA_HH_
|
|
|
|
|
|
|
|
#include <iostream>
|
|
|
|
#include <string>
|
2008-05-29 10:48:05 +02:00
|
|
|
#include "point.hh"
|
2008-04-11 10:11:29 +02:00
|
|
|
|
|
|
|
using namespace std;
|
|
|
|
using std::string;
|
|
|
|
|
|
|
|
class Area
|
2010-05-21 10:35:15 +02:00
|
|
|
{
|
|
|
|
protected:
|
|
|
|
string area_name;
|
|
|
|
float x_min;
|
|
|
|
float x_max;
|
|
|
|
float y_min;
|
|
|
|
float y_max;
|
|
|
|
float z_min;
|
|
|
|
float z_max;
|
2009-05-29 13:46:49 +02:00
|
|
|
|
2010-05-21 10:35:15 +02:00
|
|
|
public:
|
|
|
|
Area(const string &_name = "No name", const float &_x1 = 0, const float &_x2 = 0, const float &_y1 = 0, const float &_y2 = 0, const float &_z1 = 0, const float &_z2 = 0) ;
|
|
|
|
Area(const Area &a) ;
|
|
|
|
~Area() {};
|
2009-05-29 13:46:49 +02:00
|
|
|
|
2010-05-21 10:35:15 +02:00
|
|
|
bool containsPoint(const Point &p)const ;
|
2009-05-29 13:46:49 +02:00
|
|
|
|
2010-05-21 10:35:15 +02:00
|
|
|
string getName()const
|
|
|
|
{
|
|
|
|
return area_name ;
|
|
|
|
} ;
|
|
|
|
float getXmin()const
|
|
|
|
{
|
|
|
|
return x_min;
|
|
|
|
} ;
|
|
|
|
float getXmax()const
|
|
|
|
{
|
|
|
|
return x_max;
|
|
|
|
} ;
|
|
|
|
float getYmin()const
|
|
|
|
{
|
|
|
|
return y_min;
|
|
|
|
} ;
|
|
|
|
float getYmax()const
|
|
|
|
{
|
|
|
|
return y_max;
|
|
|
|
} ;
|
|
|
|
float getZmin()const
|
|
|
|
{
|
|
|
|
return z_min;
|
|
|
|
} ;
|
|
|
|
float getZmax()const
|
|
|
|
{
|
|
|
|
return z_max;
|
|
|
|
} ;
|
2009-05-29 13:46:49 +02:00
|
|
|
|
2010-05-21 10:35:15 +02:00
|
|
|
void setName(const string &_name)
|
|
|
|
{
|
|
|
|
area_name = _name ;
|
|
|
|
} ;
|
|
|
|
void setXmin(const float &v)
|
|
|
|
{
|
|
|
|
x_min = v;
|
|
|
|
} ;
|
|
|
|
void setXmax(const float &v)
|
|
|
|
{
|
|
|
|
x_max = v;
|
|
|
|
} ;
|
|
|
|
void setYmin(const float &v)
|
|
|
|
{
|
|
|
|
y_min = v;
|
|
|
|
} ;
|
|
|
|
void setYmax(const float &v)
|
|
|
|
{
|
|
|
|
y_max = v;
|
|
|
|
} ;
|
|
|
|
void setZmin(const float &v)
|
|
|
|
{
|
|
|
|
z_min = v;
|
|
|
|
} ;
|
|
|
|
void setZmax(const float &v)
|
|
|
|
{
|
|
|
|
z_max = v;
|
|
|
|
} ;
|
2009-05-29 13:46:49 +02:00
|
|
|
|
2010-05-21 10:35:15 +02:00
|
|
|
bool operator==(const Area &a)const ;
|
|
|
|
friend ostream &operator<<(ostream &os, const Area &a) ;
|
|
|
|
};
|
2008-04-11 10:11:29 +02:00
|
|
|
|
2008-05-29 10:48:05 +02:00
|
|
|
#endif // _AREA_HH_
|