SUMO - Simulation of Urban MObility
|
00001 /****************************************************************************/ 00008 // Storage for geometrical objects extended by mutexes 00009 /****************************************************************************/ 00010 // SUMO, Simulation of Urban MObility; see http://sumo.sourceforge.net/ 00011 // Copyright (C) 2001-2012 DLR (http://www.dlr.de/) and contributors 00012 /****************************************************************************/ 00013 // 00014 // This file is part of SUMO. 00015 // SUMO is free software: you can redistribute it and/or modify 00016 // it under the terms of the GNU General Public License as published by 00017 // the Free Software Foundation, either version 3 of the License, or 00018 // (at your option) any later version. 00019 // 00020 /****************************************************************************/ 00021 #ifndef GUIShapeContainer_h 00022 #define GUIShapeContainer_h 00023 00024 00025 // =========================================================================== 00026 // included modules 00027 // =========================================================================== 00028 #ifdef _MSC_VER 00029 #include <windows_config.h> 00030 #else 00031 #include <config.h> 00032 #endif 00033 00034 #include <utils/shapes/ShapeContainer.h> 00035 #include <utils/gui/globjects/GUIGlObject.h> 00036 #include <utils/foxtools/MFXMutex.h> 00037 00038 00039 // =========================================================================== 00040 // class declarations 00041 // =========================================================================== 00042 class SUMORTree; 00043 class Position; 00044 00045 00046 // =========================================================================== 00047 // class definitions 00048 // =========================================================================== 00054 class GUIShapeContainer : public ShapeContainer { 00055 public: 00057 GUIShapeContainer(SUMORTree& vis) ; 00058 00059 00061 virtual ~GUIShapeContainer() ; 00062 00063 00064 00074 virtual bool addPoI(const std::string& name, int layer, const std::string& type, 00075 const RGBColor& c, const Position& pos) ; 00076 00077 00087 virtual bool addPolygon(const std::string& name, int layer, 00088 const std::string& type, const RGBColor& c, bool filled, const PositionVector& shape) ; 00089 00090 00091 00098 bool removePolygon(int layer, const std::string& id) ; 00099 00100 00107 bool removePoI(int layer, const std::string& id) ; 00108 00109 00110 00117 void movePoI(int layer, const std::string& id, const Position& pos) ; 00118 00119 00125 void reshapePolygon(int layer, const std::string& id, const PositionVector& shape) ; 00126 00127 00129 std::vector<GUIGlID> getShapeIDs() const; 00130 00131 00132 private: 00134 MFXMutex myLock; 00135 00137 SUMORTree& myVis; 00138 00139 }; 00140 00141 00142 #endif 00143 00144 /****************************************************************************/ 00145