42 }, {}, {}, {}, {}, {}, {}, {}, {}, {}),
51 GNEAdditional(id, viewNet,
GLO_CALIBRATOR,
SUMO_TAG_LANECALIBRATOR, name, false, {}, {lane}, {}, {}, {}, {}, {}, {}, {}, {}),
92 throw ProcessError(
"Both myEdge and myLane aren't defined");
101 return shape.front();
122 return getEdgeParents().front()->getLanes().at(0)->getMicrosimID();
124 throw ProcessError(
"Both myEdge and myLane aren't defined");
141 glTranslated(pos.
x(), pos.
y(),
getType());
142 glRotated(rot, 0, 0, 1);
144 glScaled(exaggeration, exaggeration, 1);
145 glPolygonMode(GL_FRONT_AND_BACK, GL_FILL);
153 glBegin(GL_TRIANGLES);
154 glVertex2d(0 - 1.4, 0);
155 glVertex2d(0 - 1.4, 6);
156 glVertex2d(0 + 1.4, 6);
157 glVertex2d(0 + 1.4, 0);
158 glVertex2d(0 - 1.4, 0);
159 glVertex2d(0 + 1.4, 6);
173 throw ProcessError(
"Both myEdge and myLane aren't defined");
268 if (canParse<double>(value)) {
270 double newPosition = parse<double>(value);
272 if ((newPosition < 0) || (newPosition > shape.length())) {
281 return canParse<SUMOTime>(value);
289 return canParse<bool>(value);
341 if (parse<bool>(value)) {
std::string myRouteProbe
ID to current RouteProbe.
GNEEdge * retrieveEdge(const std::string &id, bool failHard=true)
get edge by id
double scale
information about a lane's width (temporary, used for a single view)
static bool isValidAttribute(const std::string &value)
whether the given string is a valid attribute for a certain key (for example, a name) ...
GUIVisualizationTextSettings addName
std::vector< double > shapeRotations
The rotations of the single shape parts.
void setGenericParametersStr(const std::string &value)
set generic parameters in string format
const std::string & getAdditionalID() const
A calibrator placed over edge.
void commitGeometryMoving(GNEUndoList *undoList)
commit geometry changes in the attributes of an element after use of moveGeometry(...)
Stores the information about how to visualize structures.
double y() const
Returns the y-position.
std::string getAttribute(SumoXMLAttr key) const
~GNECalibrator()
Destructor.
std::string time2string(SUMOTime t)
SUMOTime myFrequency
Frequency of calibrator.
double x() const
Returns the x-position.
Position getPositionInView() const
Returns position of additional in view.
static void drawText(const std::string &text, const Position &pos, const double layer, const double size, const RGBColor &col=RGBColor::BLACK, const double angle=0, int align=0, double width=-1)
bool drawDetail(const double detail, const double exaggeration) const
check if details can be drawn for the given GUIVisualizationDetailSettings and current scale and exxa...
void unselectAttributeCarrier(bool changeFlag=true)
unselect attribute carrier using GUIGlobalSelection
void clearGeometry()
reset geometry
This lane is powered by an underlying GNEEdge and basically knows how to draw itself.
SumoXMLAttr
Numbers representing SUMO-XML - attributes.
RGBColor selectedAdditionalColor
additional selection color (busStops, Detectors...)
static const RGBColor BLACK
void setAttribute(SumoXMLAttr key, const std::string &value, GNEUndoList *undoList)
method for setting the attribute and letting the object perform additional changes ...
bool isAttributeCarrierSelected() const
check if attribute carrier is selected
void changeAdditionalID(const std::string &newID)
change ID of additional
A class that stores a 2D geometrical boundary.
void openAdditionalDialog()
open Calibrator Dialog
const std::vector< GNEEdge * > & getEdgeParents() const
get edge parents
GNEViewNet * myViewNet
The GNEViewNet this additional element belongs.
void p_add(GNEChange_Attribute *cmd)
special method, avoid empty changes, always execute
GUIVisualizationSizeSettings addSize
GNECalibrator(const std::string &id, GNEViewNet *viewNet, GNEEdge *edge, double pos, SUMOTime frequency, const std::string &name, const std::string &output, const std::string &routeprobe)
Constructor using edge.
GUIGlObjectType getType() const
Returns the type of the object as coded in GUIGlObjectType.
std::string myOutput
output of calibrator
std::string toString(const T &t, std::streamsize accuracy=gPrecision)
static void setColor(const RGBColor &c)
Sets the gl-color to this value.
bool isValid(SumoXMLAttr key, const std::string &value)
method for checking if the key and their conrrespond attribute are valids
A point in 2D or 3D with translation and scaling methods.
PositionVector shape
The shape of the additional element.
RGBColor selectionColor
basic selection color
std::string myAdditionalName
name of additional
static bool isGenericParametersValid(const std::string &value)
check if given string can be parsed to a map/list of generic parameters
friend class GNEChange_Attribute
declare friend class
void selectAttributeCarrier(bool changeFlag=true)
A calibrator placed over lane (used in netedit)
const std::vector< GNELane * > & getLaneParents() const
get lanes of VSS
void drawName(const Position &pos, const double scale, const GUIVisualizationTextSettings &settings, const double angle=0) const
draw name of item
Boundary & grow(double by)
extends the boundary by the given amount
const std::string getID() const
function to support debugging
static bool isValidNetID(const std::string &value)
whether the given string is a valid id for a network element
static void drawShapeDottedContourRectangle(const GUIVisualizationSettings &s, const int type, const Position ¢er, 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
A road/street connecting two junctions (netedit-version)
GUIVisualizationDetailSettings detailSettings
detail settings
Dialog for edit calibrators.
double myPositionOverLane
position over Lane
void changeLaneParents(GNEShape *elementChild, const std::string &newLaneIDs)
change edge parents of a shape
std::string getParentName() const
Returns the name of the parent object.
double length() const
Returns the length.
bool drawUsingSelectColor() const
check if attribute carrier must be drawn using selecting color.
An Element which don't belongs to GNENet but has influency in the simulation.
const GNEAttributeCarrier * getDottedAC() const
get AttributeCarrier under cursor
AdditionalGeometry myGeometry
geometry to be precomputed in updateGeometry(...)
const std::string & getTagStr() const
get tag assigned to this object in string format
std::string getGenericParametersStr() const
return generic parameters in string format
static const RGBColor calibrator
color for Calibrators
Boundary getCenteringBoundary() const
Returns the boundary to which the view shall be centered in order to show the object.
GNENet * getNet() const
get the net object
std::string getHierarchyName() const
get Hierarchy Name (Used in AC Hierarchy)
GUIGlID getGlID() const
Returns the numerical id of the object.
void changeEdgeParents(GNEShape *elementChild, const std::string &newEdgeIDs)
change edge parents of a shape
void moveGeometry(const Position &offset)
change the position of the element geometry without saving in undoList
void updateGeometry()
update pre-computed geometry information
void drawGL(const GUIVisualizationSettings &s) const
Draws the object.
static const double calibratorText
details for calibrator text
GUIVisualizationColorSettings colorSettings
color settings
bool isValidAdditionalID(const std::string &newID) const
check if a new additional ID is valid
Boundary getBoxBoundary() const
Returns a boundary enclosing this list of lines.
bool drawForSelecting
whether drawing is performed for the purpose of selecting objects
double getExaggeration(const GUIVisualizationSettings &s, const GUIGlObject *o, double factor=20) const
return the drawing size including exaggeration and constantSize values
std::string getPopUpID() const
get PopPup ID (Used in AC Hierarchy)
Position positionAtOffset(double pos, double lateralOffset=0) const
Returns the position at the given length.
static bool isValidFilename(const std::string &value)
whether the given string is a valid attribute for a filename (for example, a name) ...
GNELane * retrieveLane(const std::string &id, bool failHard=true, bool checkVolatileChange=false)
get lane by id