00001 #ifndef SPATIAL_WORLD_MODEL_SURFACE_H_ 00002 #define SPATIAL_WORLD_MODEL_SURFACE_H_ 00003 00004 #include <string> 00005 #include <vector> 00006 #include <spatial_world_model/PointOfInterest.h> 00007 00008 namespace spatial_world_model 00009 { 00010 00011 class Surface 00012 { 00013 public: 00014 Surface(std::string name, std::string frame, double width, double height) 00015 { 00016 name_ = name; 00017 frame_ = frame; 00018 width_ = width; 00019 height_ = height; 00020 }; 00021 00022 std::string getName() const 00023 { 00024 return name_; 00025 } 00026 00027 void setName(std::string name) 00028 { 00029 name_ = name; 00030 } 00031 00032 double getWidth() const 00033 { 00034 return width_; 00035 } 00036 00037 void setWidth(double width) 00038 { 00039 width_ = width; 00040 } 00041 00042 double getHeight() const 00043 { 00044 return height_; 00045 } 00046 00047 void setHeight(double height) 00048 { 00049 height_ = height; 00050 } 00051 00052 std::string getFrame() const 00053 { 00054 return frame_; 00055 } 00056 00057 void setFrame(std::string frame) 00058 { 00059 frame_ = frame; 00060 } 00061 00062 size_t getNumPlacementSurfaces() const 00063 { 00064 return placement_surfaces_.size(); 00065 } 00066 00067 void addPlacementSurface(std::string frame) 00068 { 00069 placement_surfaces_.push_back(frame); 00070 } 00071 00072 std::string &getPlacementSurface(size_t i) 00073 { 00074 return placement_surfaces_[i]; 00075 } 00076 00077 size_t getNumPOIs() const 00078 { 00079 return placement_surfaces_.size(); 00080 } 00081 00082 void addPOI(PointOfInterest poi) 00083 { 00084 pois_.push_back(poi); 00085 } 00086 00087 PointOfInterest &getPOI(size_t i) 00088 { 00089 return pois_[i]; 00090 } 00091 00092 private: 00093 std::string name_, frame_; 00094 std::vector<std::string> placement_surfaces_; 00095 std::vector<PointOfInterest> pois_; 00096 double width_, height_; 00097 }; 00098 00099 } 00100 00101 #endif