Eclipse SUMO - Simulation of Urban MObility
GNEDetectorE3.cpp
Go to the documentation of this file.
1 /****************************************************************************/
2 // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo
3 // Copyright (C) 2001-2019 German Aerospace Center (DLR) and others.
4 // This program and the accompanying materials
5 // are made available under the terms of the Eclipse Public License v2.0
6 // which accompanies this distribution, and is available at
7 // http://www.eclipse.org/legal/epl-v20.html
8 // SPDX-License-Identifier: EPL-2.0
9 /****************************************************************************/
14 //
15 /****************************************************************************/
16 
17 // ===========================================================================
18 // included modules
19 // ===========================================================================
20 
21 #include <netedit/GNENet.h>
22 #include <netedit/GNEUndoList.h>
23 #include <netedit/GNEViewNet.h>
25 #include <utils/gui/div/GLHelper.h>
28 
29 #include "GNEDetectorE3.h"
30 
31 
32 // ===========================================================================
33 // member method definitions
34 // ===========================================================================
35 
36 GNEDetectorE3::GNEDetectorE3(const std::string& id, GNEViewNet* viewNet, Position pos, SUMOTime freq, const std::string& filename, const std::string& vehicleTypes, const std::string& name, SUMOTime timeThreshold, double speedThreshold, bool blockMovement) :
37  GNEAdditional(id, viewNet, GLO_E3DETECTOR, SUMO_TAG_E3DETECTOR, name, blockMovement, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}),
38  myPosition(pos),
39  myFreq(freq),
40  myFilename(filename),
41  myVehicleTypes(vehicleTypes),
42  myTimeThreshold(timeThreshold),
43 mySpeedThreshold(speedThreshold) {
44 }
45 
46 
48 
49 
50 void
52  // Set block icon position
54 
55  // Set block icon offset
56  myBlockIcon.offset = Position(-0.5, -0.5);
57 
58  // Set block icon rotation, and using their rotation for draw logo
60 
61  // Update connection's geometry
63 }
64 
65 
68  return myPosition;
69 }
70 
71 
74  // Return Boundary depending if myMovingGeometryBoundary is initialised (important for move geometry)
77  } else {
78  Boundary b;
79  b.add(myPosition);
80  b.grow(5);
81  return b;
82  }
83 }
84 
85 
86 void
87 GNEDetectorE3::splitEdgeGeometry(const double /*splitPosition*/, const GNENetElement* /*originalElement*/, const GNENetElement* /*newElement*/, GNEUndoList* /*undoList*/) {
88  // geometry of this element cannot be splitted
89 }
90 
91 
92 void
94  // restore old position, apply offset and update Geometry
96  myPosition.add(offset);
97  // filtern position using snap to active grid
98  // filtern position using snap to active grid
100  updateGeometry();
101 }
102 
103 
104 void
106  // commit new position allowing undo/redo
107  undoList->p_begin("position of " + getTagStr());
109  undoList->p_end();
110 }
111 
112 
113 std::string
115  return myViewNet->getNet()->getMicrosimID();
116 }
117 
118 
119 void
121  // Obtain exaggeration of the draw
122  const double exaggeration = s.addSize.getExaggeration(s, this);
123  // first check if additional has to be drawn
124  if (s.drawAdditionals(exaggeration)) {
125  // check if boundary has to be drawn
126  if (s.drawBoundaries) {
128  }
129  // Start drawing adding an gl identificator
130  glPushName(getGlID());
131  // Add a draw matrix for drawing logo
132  glPushMatrix();
133  glTranslated(myPosition.x(), myPosition.y(), getType());
134  // scale
135  glScaled(exaggeration, exaggeration, 1);
136  // Draw icon depending of detector is selected and if isn't being drawn for selecting
137  if (!s.drawForRectangleSelection && s.drawDetail(s.detailSettings.laneTextures, exaggeration)) {
138  glColor3d(1, 1, 1);
139  glRotated(180, 0, 0, 1);
140  if (drawUsingSelectColor()) {
142  } else {
144  }
145  } else {
147  GLHelper::drawBoxLine(Position(0, 1), 0, 2, 1);
148  }
149  // Pop logo matrix
150  glPopMatrix();
151  // Show Lock icon depending
152  myBlockIcon.drawIcon(s, exaggeration, 0.4);
153  // Draw child connections
155  // Draw name if isn't being drawn for selecting
156  if (!s.drawForRectangleSelection) {
158  }
159  // check if dotted contour has to be drawn
160  if (myViewNet->getDottedAC() == this) {
162  // draw shape dotte contour aroud alld connections between child and parents
163  for (auto i : myChildConnections.connectionPositions) {
165  }
166  }
167  // Pop name
168  glPopName();
169  }
170 }
171 
172 
173 std::string
175  switch (key) {
176  case SUMO_ATTR_ID:
177  return getAdditionalID();
178  case SUMO_ATTR_POSITION:
179  return toString(myPosition);
180  case SUMO_ATTR_FREQUENCY:
181  return time2string(myFreq);
182  case SUMO_ATTR_NAME:
183  return myAdditionalName;
184  case SUMO_ATTR_FILE:
185  return myFilename;
186  case SUMO_ATTR_VTYPES:
187  return myVehicleTypes;
191  return toString(mySpeedThreshold);
193  return toString(myBlockMovement);
194  case GNE_ATTR_SELECTED:
196  case GNE_ATTR_PARAMETERS:
197  return getParametersStr();
198  default:
199  throw InvalidArgument(getTagStr() + " doesn't have an attribute of type '" + toString(key) + "'");
200  }
201 }
202 
203 
204 double
206  throw InvalidArgument(getTagStr() + " doesn't have a double attribute of type '" + toString(key) + "'");
207 }
208 
209 
210 void
211 GNEDetectorE3::setAttribute(SumoXMLAttr key, const std::string& value, GNEUndoList* undoList) {
212  if (value == getAttribute(key)) {
213  return; //avoid needless changes, later logic relies on the fact that attributes have changed
214  }
215  switch (key) {
216  case SUMO_ATTR_ID: {
217  // change ID of Entry
218  undoList->p_add(new GNEChange_Attribute(this, myViewNet->getNet(), key, value));
219  // Change Ids of all Entry/Exits children
220  for (auto i : getChildAdditionals()) {
221  i->setAttribute(SUMO_ATTR_ID, generateChildID(i->getTagProperty().getTag()), undoList);
222  }
223  break;
224  }
225  case SUMO_ATTR_FREQUENCY:
226  case SUMO_ATTR_POSITION:
227  case SUMO_ATTR_NAME:
228  case SUMO_ATTR_FILE:
229  case SUMO_ATTR_VTYPES:
233  case GNE_ATTR_SELECTED:
234  case GNE_ATTR_PARAMETERS:
235  undoList->p_add(new GNEChange_Attribute(this, myViewNet->getNet(), key, value));
236  break;
237  default:
238  throw InvalidArgument(getTagStr() + " doesn't have an attribute of type '" + toString(key) + "'");
239  }
240 }
241 
242 
243 bool
244 GNEDetectorE3::isValid(SumoXMLAttr key, const std::string& value) {
245  switch (key) {
246  case SUMO_ATTR_ID:
247  return isValidDetectorID(value);
248  case SUMO_ATTR_POSITION:
249  return canParse<Position>(value);
250  case SUMO_ATTR_FREQUENCY:
251  return canParse<SUMOTime>(value);
252  case SUMO_ATTR_NAME:
254  case SUMO_ATTR_FILE:
256  case SUMO_ATTR_VTYPES:
257  if (value.empty()) {
258  return true;
259  } else {
261  }
263  return canParse<SUMOTime>(value);
265  return canParse<double>(value) && (parse<double>(value) >= 0);
267  return canParse<bool>(value);
268  case GNE_ATTR_SELECTED:
269  return canParse<bool>(value);
270  case GNE_ATTR_PARAMETERS:
271  return Parameterised::areParametersValid(value);
272  default:
273  throw InvalidArgument(getTagStr() + " doesn't have an attribute of type '" + toString(key) + "'");
274  }
275 }
276 
277 
278 bool
280  int numEntrys = 0;
281  int numExits = 0;
282  // iterate over additional chidls and obtain number of entrys and exits
283  for (auto i : getChildAdditionals()) {
284  if (i->getTagProperty().getTag() == SUMO_TAG_DET_ENTRY) {
285  numEntrys++;
286  } else if (i->getTagProperty().getTag() == SUMO_TAG_DET_EXIT) {
287  numExits++;
288  }
289  }
290  // write warnings
291  if (numEntrys == 0) {
292  WRITE_WARNING("An " + toString(SUMO_TAG_E3DETECTOR) + " need at least one " + toString(SUMO_TAG_DET_ENTRY) + " detector");
293  }
294  if (numExits == 0) {
295  WRITE_WARNING("An " + toString(SUMO_TAG_E3DETECTOR) + " need at least one " + toString(SUMO_TAG_DET_EXIT) + " detector");
296  }
297  // return false depending of number of Entrys and Exits
298  return ((numEntrys != 0) && (numExits != 0));
299 }
300 
301 
302 bool
304  return true;
305 }
306 
307 
308 std::string
310  return getTagStr() + ":" + getID();
311 }
312 
313 
314 std::string
316  return getTagStr();
317 }
318 
319 
320 void
323 }
324 
325 // ===========================================================================
326 // private
327 // ===========================================================================
328 
329 void
330 GNEDetectorE3::setAttribute(SumoXMLAttr key, const std::string& value) {
331  switch (key) {
332  case SUMO_ATTR_ID:
333  changeAdditionalID(value);
334  break;
335  case SUMO_ATTR_POSITION:
337  myPosition = parse<Position>(value);
339  break;
340  case SUMO_ATTR_FREQUENCY:
341  myFreq = parse<SUMOTime>(value);
342  break;
343  case SUMO_ATTR_NAME:
344  myAdditionalName = value;
345  break;
346  case SUMO_ATTR_FILE:
347  myFilename = value;
348  break;
349  case SUMO_ATTR_VTYPES:
350  myVehicleTypes = value;
351  break;
353  myTimeThreshold = parse<SUMOTime>(value);
354  break;
356  mySpeedThreshold = parse<double>(value);
357  break;
359  myBlockMovement = parse<bool>(value);
360  break;
361  case GNE_ATTR_SELECTED:
362  if (parse<bool>(value)) {
364  } else {
366  }
367  break;
368  case GNE_ATTR_PARAMETERS:
369  setParametersStr(value);
370  break;
371  default:
372  throw InvalidArgument(getTagStr() + " doesn't have an attribute of type '" + toString(key) + "'");
373  }
374 }
375 
376 /****************************************************************************/
GUIGlObject::getType
GUIGlObjectType getType() const
Returns the type of the object as coded in GUIGlObjectType.
Definition: GUIGlObject.cpp:180
RGBColor::GREY
static const RGBColor GREY
Definition: RGBColor.h:198
SUMOXMLDefinitions::isValidAttribute
static bool isValidAttribute(const std::string &value)
whether the given string is a valid attribute for a certain key (for example, a name)
Definition: SUMOXMLDefinitions.cpp:995
GNEAdditional::BlockIcon::position
Position position
position of the block icon
Definition: GNEAdditional.h:318
GNEDetectorE3::drawGL
void drawGL(const GUIVisualizationSettings &s) const
Draws the object.
Definition: GNEDetectorE3.cpp:120
GNEAdditional
An Element which don't belongs to GNENet but has influency in the simulation.
Definition: GNEAdditional.h:48
SUMO_ATTR_HALTING_SPEED_THRESHOLD
Definition: SUMOXMLDefinitions.h:751
GNEDetectorE3::checkChildAdditionalRestriction
bool checkChildAdditionalRestriction() const
check restriction with the number of children
Definition: GNEDetectorE3.cpp:279
Parameterised::getParametersStr
std::string getParametersStr() const
Returns the inner key/value map in string format "key1=value1|key2=value2|...|keyN=valueN".
Definition: Parameterised.cpp:112
GNEAdditional::getAdditionalID
const std::string & getAdditionalID() const
Definition: GNEAdditional.cpp:476
GNEAttributeCarrier::getID
const std::string getID() const
function to support debugging
Definition: GNEAttributeCarrier.cpp:1289
WRITE_WARNING
#define WRITE_WARNING(msg)
Definition: MsgHandler.h:275
GNETEXTURE_E3SELECTED
Definition: GUITextures.h:35
SUMOXMLDefinitions::isValidFilename
static bool isValidFilename(const std::string &value)
whether the given string is a valid attribute for a filename (for example, a name)
Definition: SUMOXMLDefinitions.cpp:1001
GNEAdditional::BlockIcon::setRotation
void setRotation(GNELane *additionalLane=nullptr)
set Rotation of block Icon (must be called in updateGeometry() function)
Definition: GNEAdditional.cpp:400
GNEAdditional::AdditionalMove::movingGeometryBoundary
Boundary movingGeometryBoundary
boundary used during moving of elements (to avoid insertion in RTREE
Definition: GNEAdditional.h:288
GUIGlObject::drawName
void drawName(const Position &pos, const double scale, const GUIVisualizationTextSettings &settings, const double angle=0) const
draw name of item
Definition: GUIGlObject.cpp:354
GNEUndoList::p_end
void p_end()
End undo command sub-group. If the sub-group is still empty, it will be deleted; otherwise,...
Definition: GNEUndoList.cpp:79
GUIVisualizationSettings::drawForRectangleSelection
bool drawForRectangleSelection
whether drawing is performed for the purpose of selecting objects using a rectangle
Definition: GUIVisualizationSettings.h:647
GUIVisualizationSettings::drawBoundaries
bool drawBoundaries
enable or disable draw boundaries
Definition: GUIVisualizationSettings.h:638
GNENet::removeGLObjectFromGrid
void removeGLObjectFromGrid(GUIGlObject *o)
add GL Object into net
Definition: GNENet.cpp:1328
GNEAdditional::generateChildID
std::string generateChildID(SumoXMLTag childTag)
gererate a new ID for an element child
Definition: GNEAdditional.cpp:96
GNEDetectorE3::updateParentAdditional
void updateParentAdditional()
update parent after add or remove a child (can be reimplemented, for example used for statistics)
Definition: GNEDetectorE3.cpp:321
GNEHierarchicalChildElements::drawChildConnections
void drawChildConnections(const GUIVisualizationSettings &s, const GUIGlObjectType GLTypeParent) const
Definition: GNEHierarchicalChildElements.cpp:89
GNEDetectorE3::commitGeometryMoving
void commitGeometryMoving(GNEUndoList *undoList)
commit geometry changes in the attributes of an element after use of moveGeometry(....
Definition: GNEDetectorE3.cpp:105
SUMOTime
long long int SUMOTime
Definition: SUMOTime.h:34
GNEDetectorE3::updateGeometry
void updateGeometry()
update pre-computed geometry information
Definition: GNEDetectorE3.cpp:51
GNEDetectorE3::myPosition
Position myPosition
position of E3 in view
Definition: GNEDetectorE3.h:140
GNEDetectorE3::mySpeedThreshold
double mySpeedThreshold
The speed-based threshold that describes how slow a vehicle has to be to be recognized as halting.
Definition: GNEDetectorE3.h:155
GNEViewNet
Definition: GNEViewNet.h:42
SUMO_ATTR_ID
Definition: SUMOXMLDefinitions.h:378
SUMO_TAG_DET_ENTRY
an e3 entry point
Definition: SUMOXMLDefinitions.h:81
GLHelper.h
GNEAdditional::changeAdditionalID
void changeAdditionalID(const std::string &newID)
change ID of additional
Definition: GNEAdditional.cpp:502
GNEAdditional::unselectAttributeCarrier
void unselectAttributeCarrier(bool changeFlag=true)
unselect attribute carrier using GUIGlobalSelection
Definition: GNEAdditional.cpp:532
GNEAdditional::myBlockIcon
BlockIcon myBlockIcon
variable BlockIcon
Definition: GNEAdditional.h:353
GLHelper::setColor
static void setColor(const RGBColor &c)
Sets the gl-color to this value.
Definition: GLHelper.cpp:621
SUMO_ATTR_FILE
Definition: SUMOXMLDefinitions.h:664
GUISUMOAbstractView::snapToActiveGrid
Position snapToActiveGrid(const Position &pos, bool snapXY=true) const
Returns a position that is mapped to the closest grid point if the grid is active.
Definition: GUISUMOAbstractView.cpp:196
GUITexturesHelper::drawTexturedBox
static void drawTexturedBox(int which, double size)
Draws a named texture as a box with the given size.
Definition: GUITexturesHelper.cpp:72
GNEAdditional::myMove
AdditionalMove myMove
variable AdditionalMove
Definition: GNEAdditional.h:344
GNEAdditional::myViewNet
GNEViewNet * myViewNet
The GNEViewNet this additional element belongs.
Definition: GNEAdditional.h:335
GLHelper::drawBoundary
static void drawBoundary(const Boundary &b)
Draw a boundary (used for debugging)
Definition: GLHelper.cpp:817
GNEDetectorE3::myVehicleTypes
std::string myVehicleTypes
attribute vehicle types
Definition: GNEDetectorE3.h:149
GNEAttributeCarrier::GNEChange_Attribute
friend class GNEChange_Attribute
declare friend class
Definition: GNEAttributeCarrier.h:57
GNEUndoList::p_add
void p_add(GNEChange_Attribute *cmd)
special method, avoid empty changes, always execute
Definition: GNEUndoList.cpp:131
GNEViewNet::getNet
GNENet * getNet() const
get the net object
Definition: GNEViewNet.cpp:1014
GNEAdditional::isAttributeCarrierSelected
bool isAttributeCarrierSelected() const
check if attribute carrier is selected
Definition: GNEAdditional.cpp:548
GNEHierarchicalChildElements::ChildConnections::update
void update()
update Connection's geometry
Definition: GNEHierarchicalChildElements.cpp:517
GNEDetectorE3::getParentName
std::string getParentName() const
Returns the name of the parent object (if any)
Definition: GNEDetectorE3.cpp:114
GUIVisualizationSettings::addName
GUIVisualizationTextSettings addName
Definition: GUIVisualizationSettings.h:591
GNEDetectorE3.h
GNEAdditional::isValidDetectorID
bool isValidDetectorID(const std::string &newID) const
check if a new detector ID is valid
Definition: GNEAdditional.cpp:492
GUIVisualizationSettings::detailSettings
GUIVisualizationDetailSettings detailSettings
detail settings
Definition: GUIVisualizationSettings.h:683
GNEDetectorE3::getPopUpID
std::string getPopUpID() const
get PopPup ID (Used in AC Hierarchy)
Definition: GNEDetectorE3.cpp:309
GNEDetectorE3::getAttributeDouble
double getAttributeDouble(SumoXMLAttr key) const
Definition: GNEDetectorE3.cpp:205
GNEAdditional::selectAttributeCarrier
void selectAttributeCarrier(bool changeFlag=true)
Definition: GNEAdditional.cpp:517
GNEDetectorE3::myTimeThreshold
SUMOTime myTimeThreshold
The time-based threshold that describes how much time has to pass until a vehicle is recognized as ha...
Definition: GNEDetectorE3.h:152
GNEViewNet.h
GNEDetectorE3::isAttributeEnabled
bool isAttributeEnabled(SumoXMLAttr key) const
Definition: GNEDetectorE3.cpp:303
GUIGlObject::getGlID
GUIGlID getGlID() const
Returns the numerical id of the object.
Definition: GUIGlObject.cpp:149
GNEViewNet::getDottedAC
const GNEAttributeCarrier * getDottedAC() const
get AttributeCarrier under cursor
Definition: GNEViewNet.cpp:1026
Boundary
A class that stores a 2D geometrical boundary.
Definition: Boundary.h:41
GNE_ATTR_PARAMETERS
parameters "key1=value1|key2=value2|...|keyN=valueN"
Definition: SUMOXMLDefinitions.h:989
GUITextureSubSys::getTexture
static GUIGlID getTexture(GUITexture which)
returns a texture previously defined in the enum GUITexture
Definition: GUITextureSubSys.cpp:101
GLHelper::drawShapeDottedContourRectangle
static void drawShapeDottedContourRectangle(const GUIVisualizationSettings &s, const int type, const Position &center, const double width, const double height, const double rotation=0, const double offsetX=0, const double offsetY=0)
draw a dotted contour around the given Position with certain width and height
Definition: GLHelper.cpp:560
GUIVisualizationSettings::scale
double scale
information about a lane's width (temporary, used for a single view)
Definition: GUIVisualizationSettings.h:632
GNEDetectorE3::getHierarchyName
std::string getHierarchyName() const
get Hierarchy Name (Used in AC Hierarchy)
Definition: GNEDetectorE3.cpp:315
GNEDetectorE3::isValid
bool isValid(SumoXMLAttr key, const std::string &value)
method for checking if the key and their conrrespond attribute are valids
Definition: GNEDetectorE3.cpp:244
Position
A point in 2D or 3D with translation and scaling methods.
Definition: Position.h:38
Position::x
double x() const
Returns the x-position.
Definition: Position.h:56
Boundary::add
void add(double x, double y, double z=0)
Makes the boundary include the given coordinate.
Definition: Boundary.cpp:78
time2string
std::string time2string(SUMOTime t)
Definition: SUMOTime.cpp:67
GNEAdditional::myAdditionalName
std::string myAdditionalName
name of additional
Definition: GNEAdditional.h:347
GNENetElement
Definition: GNENetElement.h:43
GUIVisualizationDetailSettings::laneTextures
static const double laneTextures
details for lane textures
Definition: GUIVisualizationSettings.h:283
GNEAdditional::myBlockMovement
bool myBlockMovement
boolean to check if additional element is blocked (i.e. cannot be moved with mouse)
Definition: GNEAdditional.h:350
GLHelper::drawShapeDottedContourAroundShape
static void drawShapeDottedContourAroundShape(const GUIVisualizationSettings &s, const int type, const PositionVector &shape, const double width)
draw a dotted contour around the given Non closed shape with certain width
Definition: GLHelper.cpp:461
SUMO_ATTR_FREQUENCY
Definition: SUMOXMLDefinitions.h:662
SUMO_ATTR_POSITION
Definition: SUMOXMLDefinitions.h:660
GNETEXTURE_E3
Definition: GUITextures.h:34
GNEDetectorE3::moveGeometry
void moveGeometry(const Position &offset)
change the position of the element geometry without saving in undoList
Definition: GNEDetectorE3.cpp:93
GLO_E3DETECTOR
a E3 detector
Definition: GUIGlObjectTypes.h:79
Parameterised::setParametersStr
void setParametersStr(const std::string &paramsString)
set the inner key/value map in string format "key1=value1|key2=value2|...|keyN=valueN"
Definition: Parameterised.cpp:139
GLIncludes.h
toString
std::string toString(const T &t, std::streamsize accuracy=gPrecision)
Definition: ToString.h:47
GNEAdditional::BlockIcon::drawIcon
void drawIcon(const GUIVisualizationSettings &s, const double exaggeration, const double size=0.5) const
draw lock icon
Definition: GNEAdditional.cpp:416
GNENet::addGLObjectIntoGrid
void addGLObjectIntoGrid(GUIGlObject *o)
add GL Object into net
Definition: GNENet.cpp:1322
Position::y
double y() const
Returns the y-position.
Definition: Position.h:61
SUMO_ATTR_HALTING_TIME_THRESHOLD
Definition: SUMOXMLDefinitions.h:750
GNEHierarchicalChildElements::myChildConnections
ChildConnections myChildConnections
variable ChildConnections
Definition: GNEHierarchicalChildElements.h:237
Parameterised::areParametersValid
static bool areParametersValid(const std::string &value, bool report=false)
check if given string can be parsed to a parameters map "key1=value1|key2=value2|....
Definition: Parameterised.cpp:166
SUMO_ATTR_VTYPES
Definition: SUMOXMLDefinitions.h:632
InvalidArgument
Definition: UtilExceptions.h:56
GLHelper::drawBoxLine
static void drawBoxLine(const Position &beg, double rot, double visLength, double width, double offset=0)
Draws a thick line.
Definition: GLHelper.cpp:136
GNEDetectorE3::setAttribute
void setAttribute(SumoXMLAttr key, const std::string &value, GNEUndoList *undoList)
method for setting the attribute and letting the object perform additional changes
Definition: GNEDetectorE3.cpp:211
GNE_ATTR_BLOCK_MOVEMENT
block movement of a graphic element
Definition: SUMOXMLDefinitions.h:981
GNEDetectorE3::myFilename
std::string myFilename
fielname of E3 detector
Definition: GNEDetectorE3.h:146
GUIVisualizationSettings::drawAdditionals
bool drawAdditionals(const double exaggeration) const
check if additionals must be drawn
Definition: GUIVisualizationSettings.cpp:1663
GNEAdditional::drawUsingSelectColor
bool drawUsingSelectColor() const
check if attribute carrier must be drawn using selecting color.
Definition: GNEAdditional.cpp:554
GNEDetectorE3::splitEdgeGeometry
void splitEdgeGeometry(const double splitPosition, const GNENetElement *originalElement, const GNENetElement *newElement, GNEUndoList *undoList)
split geometry
Definition: GNEDetectorE3.cpp:87
GNEDetectorE3::getCenteringBoundary
Boundary getCenteringBoundary() const
Returns the boundary to which the view shall be centered in order to show the object.
Definition: GNEDetectorE3.cpp:73
SUMO_TAG_E3DETECTOR
an e3 detector
Definition: SUMOXMLDefinitions.h:73
GUIVisualizationSettings::addSize
GUIVisualizationSizeSettings addSize
Definition: GUIVisualizationSettings.h:589
Position::add
void add(const Position &pos)
Adds the given position to this one.
Definition: Position.h:126
Boundary::isInitialised
bool isInitialised() const
check if Boundary is Initialised
Definition: Boundary.cpp:216
GNE_ATTR_SELECTED
element is selected
Definition: SUMOXMLDefinitions.h:971
GNEDetectorE3::myFreq
SUMOTime myFreq
frequency of E3 detector
Definition: GNEDetectorE3.h:143
Boundary::grow
Boundary & grow(double by)
extends the boundary by the given amount
Definition: Boundary.cpp:300
GUIVisualizationSettings::drawDetail
bool drawDetail(const double detail, const double exaggeration) const
check if details can be drawn for the given GUIVisualizationDetailSettings and current scale and exxa...
Definition: GUIVisualizationSettings.cpp:1669
GNEAttributeCarrier::getTagStr
const std::string & getTagStr() const
get tag assigned to this object in string format
Definition: GNEAttributeCarrier.cpp:1267
SUMOXMLDefinitions::isValidListOfTypeID
static bool isValidListOfTypeID(const std::string &value)
whether the given string is a valid list of ids for an edge or vehicle type (empty aren't allowed)
Definition: SUMOXMLDefinitions.cpp:1024
SUMO_ATTR_NAME
Definition: SUMOXMLDefinitions.h:380
GNEUndoList
Definition: GNEUndoList.h:48
GUIVisualizationSettings
Stores the information about how to visualize structures.
Definition: GUIVisualizationSettings.h:345
GNEUndoList::p_begin
void p_begin(const std::string &description)
Begin undo command sub-group. This begins a new group of commands that are treated as a single comman...
Definition: GNEUndoList.cpp:72
SumoXMLAttr
SumoXMLAttr
Numbers representing SUMO-XML - attributes.
Definition: SUMOXMLDefinitions.h:372
GNEAdditional::AdditionalMove::originalViewPosition
Position originalViewPosition
value for saving first original position over lane before moving
Definition: GNEAdditional.h:291
GUIGlObject::getMicrosimID
virtual const std::string & getMicrosimID() const
Returns the id of the object as known to microsim.
Definition: GUIGlObject.cpp:163
SUMO_TAG_DET_EXIT
an e3 exit point
Definition: SUMOXMLDefinitions.h:83
GUITextureSubSys.h
GNEHierarchicalChildElements::getChildAdditionals
const std::vector< GNEAdditional * > & getChildAdditionals() const
return child additionals
Definition: GNEHierarchicalChildElements.cpp:131
GNEDetectorE3::~GNEDetectorE3
~GNEDetectorE3()
GNEDetectorE3 Destructor.
Definition: GNEDetectorE3.cpp:47
GNEChange_Attribute.h
GNENet.h
GNEDetectorE3::GNEDetectorE3
GNEDetectorE3(const std::string &id, GNEViewNet *viewNet, Position pos, SUMOTime freq, const std::string &filename, const std::string &vehicleTypes, const std::string &name, SUMOTime timeThreshold, double speedThreshold, bool blockMovement)
GNEDetectorE3 Constructor.
Definition: GNEDetectorE3.cpp:36
GUIVisualizationSizeSettings::getExaggeration
double getExaggeration(const GUIVisualizationSettings &s, const GUIGlObject *o, double factor=20) const
return the drawing size including exaggeration and constantSize values
Definition: GUIVisualizationSettings.cpp:212
GNEAdditional::BlockIcon::offset
Position offset
The offSet of the block icon.
Definition: GNEAdditional.h:321
GNEHierarchicalChildElements::ChildConnections::connectionPositions
std::vector< PositionVector > connectionPositions
Matrix with the Vertex's positions of connections between parents an their children.
Definition: GNEHierarchicalChildElements.h:223
GNEUndoList.h
GNEDetectorE3::getAttribute
std::string getAttribute(SumoXMLAttr key) const
Definition: GNEDetectorE3.cpp:174
GNEDetectorE3::getPositionInView
Position getPositionInView() const
Returns position of additional in view.
Definition: GNEDetectorE3.cpp:67