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