SUMO - Simulation of Urban MObility
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
ShapeContainer.h
Go to the documentation of this file.
1 /****************************************************************************/
8 // Storage for geometrical objects, sorted by the layers they are in
9 /****************************************************************************/
10 // SUMO, Simulation of Urban MObility; see http://sumo.sourceforge.net/
11 // Copyright (C) 2001-2013 DLR (http://www.dlr.de/) and contributors
12 /****************************************************************************/
13 //
14 // This file is part of SUMO.
15 // SUMO is free software: you can redistribute it and/or modify
16 // it under the terms of the GNU General Public License as published by
17 // the Free Software Foundation, either version 3 of the License, or
18 // (at your option) any later version.
19 //
20 /****************************************************************************/
21 #ifndef ShapeContainer_h
22 #define ShapeContainer_h
23 
24 
25 // ===========================================================================
26 // included modules
27 // ===========================================================================
28 #ifdef _MSC_VER
29 #include <windows_config.h>
30 #else
31 #include <config.h>
32 #endif
33 
34 #include <string>
36 #include "PointOfInterest.h"
37 #include "Polygon.h"
38 using namespace SUMO;
39 
40 // ===========================================================================
41 // class declarations
42 // ===========================================================================
43 class Position;
44 class PositionVector;
45 class RGBColor;
46 
47 
48 // ===========================================================================
49 // class definitions
50 // ===========================================================================
56 public:
59 
60 
62  virtual ~ShapeContainer();
63 
66 
78  virtual bool addPolygon(const std::string& id, const std::string& type,
79  const RGBColor& color, SUMOReal layer,
80  SUMOReal angle, const std::string& imgFile,
81  const PositionVector& shape, bool fill);
82 
83 
96  virtual bool addPOI(const std::string& id, const std::string& type,
97  const RGBColor& color, SUMOReal layer, SUMOReal angle, const std::string& imgFile,
98  const Position& pos, SUMOReal width, SUMOReal height);
99 
100 
101 
106  virtual bool removePolygon(const std::string& id);
107 
108 
113  virtual bool removePOI(const std::string& id);
114 
115 
116 
121  virtual void movePOI(const std::string& id, const Position& pos);
122 
123 
128  virtual void reshapePolygon(const std::string& id, const PositionVector& shape);
129 
130 
131 
133  inline const Polygons& getPolygons() const {
134  return myPolygons;
135  }
136 
137 
139  inline const POIs& getPOIs() const {
140  return myPOIs;
141  }
142 
143 
144 protected:
147 
150 
151 };
152 
153 
154 #endif
155 
156 /****************************************************************************/
157