owlps/owlps-positioning/area.hh

52 lines
1.3 KiB
C++
Raw Normal View History

#ifndef _OWLPS_POSITIONING_AREA_HH_
#define _OWLPS_POSITIONING_AREA_HH_
class Building ;
#include "point3d.hh"
#include <iostream>
#include <string>
class Area
{
protected:
Building *building ;
std::string name ;
Point3D p_min ;
Point3D p_max ;
public:
Area(const Building *_building, const std::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) ;
Area(const Area &a) ;
~Area() {}
Building* get_building(void) const ;
std::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 std::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) ;
bool contains_point(const Point3D &p) const ;
bool operator==(const Area &a) const ;
inline bool operator!=(const Area &a) const ;
friend std::ostream &operator<<(std::ostream &os, const Area &a) ;
} ;
#endif // _OWLPS_POSITIONING_AREA_HH_