47 const SUMOTime freq,
const std::string& filename,
const std::vector<std::string>& vehicleTypes,
48 const std::vector<std::string>& nextEdges,
const std::string& detectPersons,
const std::string& name,
52}, filename, vehicleTypes, nextEdges, detectPersons, name, friendlyPos, parameters) {
54 updateCenteringBoundary(
false);
90 const double len =
getParentLanes().front()->getParentEdge()->getNBEdge()->getFinalLength();
96 std::string errorPosition;
104 return errorPosition;
156 RGBColor mainColor, secondColor, textColor;
174 drawE1Shape(d, E1Exaggeration, mainColor, secondColor);
@ GLO_E1DETECTOR
a E1 detector
GUIIcon
An enumeration of icons used by the gui applications.
@ SUMO_TAG_INDUCTION_LOOP
alternative tag for e1 detector
SumoXMLAttr
Numbers representing SUMO-XML - attributes.
std::string toString(const T &t, std::streamsize accuracy=gPrecision)
static void popMatrix()
pop matrix
static void pushMatrix()
push matrix
static bool checkLanePosition(double pos, const double length, const double laneLength, const bool friendlyPos)
check if the given position over a lane is valid
static void fixLanePosition(double &pos, double &length, const double laneLength)
fix given position over lane
GNEContour myAdditionalContour
variable used for draw additional contours
GUIGeometry myAdditionalGeometry
geometry to be precomputed in updateGeometry(...)
void drawAdditionalID(const GUIVisualizationSettings &s) const
draw additional ID
double getExaggeration(const GUIVisualizationSettings &s) const
return exaggeration associated with this GLObject
void drawAdditionalName(const GUIVisualizationSettings &s) const
draw additional name
void drawParentChildLines(const GUIVisualizationSettings &s, const RGBColor &color, const bool onlySymbols=false) const
draw parent and child lines
const std::string getID() const
get ID (all Attribute Carriers have one)
bool isAttributeCarrierSelected() const
check if attribute carrier is selected
const std::string & getTagStr() const
get tag assigned to this object in string format
const GNETagProperties & getTagProperty() const
get tagProperty associated with this Attribute Carrier
bool drawUsingSelectColor() const
check if attribute carrier must be drawn using selecting color.
void drawInLayer(const double typeOrLayer, const double extraOffset=0) const
draw element in the given layer, or in front if corresponding flag is enabled
GNENet * myNet
pointer to net
bool drawDottedContours(const GUIVisualizationSettings &s, const GUIVisualizationSettings::Detail d, const GNEAttributeCarrier *AC, const double lineWidth, const bool addOffset) const
draw dotted contours (basics, select, delete, inspect...)
void calculateContourRectangleShape(const GUIVisualizationSettings &s, const GUIVisualizationSettings::Detail d, const GUIGlObject *glObject, const Position &pos, const double width, const double height, const double layer, const double offsetX, const double offsetY, const double rot, const double scale, const GUIGlObject *boundaryParent) const
calculate contour (for rectangled elements)
double myPositionOverLane
position of detector over Lane
bool isDetectorValid(SumoXMLAttr key, const std::string &value)
double getGeometryPositionOverLane() const
get position over lane that is applicable to the shape
void setDetectorAttribute(SumoXMLAttr key, const std::string &value, GNEUndoList *undoList)
void drawE1Shape(const GUIVisualizationSettings::Detail d, const double exaggeration, const RGBColor &mainColor, const RGBColor &secondColor) const
draw E1 shape
double getDetectorAttributeDouble(SumoXMLAttr key) const
void writeDetectorValues(OutputDevice &device) const
write additional element into a xml file
bool myFriendlyPosition
Flag for friendly position.
void updateCenteringBoundary(const bool updateGrid)
update centering boundary (implies change in RTREE)
std::string getDetectorAttribute(SumoXMLAttr key) const
void drawE1DetectorLogo(const GUIVisualizationSettings &s, const GUIVisualizationSettings::Detail d, const double exaggeration, const std::string &logo, const RGBColor &textColor) const
draw E1 detector Logo
const std::vector< GNELane * > & getParentLanes() const
get parent lanes
bool isValid(SumoXMLAttr key, const std::string &value)
method for checking if the key and their correspondent attribute are valids
void fixAdditionalProblem()
fix additional problem
void commitMoveShape(const GNEMoveResult &moveResult, GNEUndoList *undoList)
commit move shape
double getAttributeDouble(SumoXMLAttr key) const
~GNEInductionLoopDetector()
Destructor.
void drawGL(const GUIVisualizationSettings &s) const
Draws the object.
GNEInductionLoopDetector(GNENet *net)
default constructor
void writeAdditional(OutputDevice &device) const
write additional element into a xml file
bool isAdditionalValid() const
check if current additional is valid to be written into XML
void setMoveShape(const GNEMoveResult &moveResult)
set move shape
void updateGeometry()
update pre-computed geometry information
std::string getAttribute(SumoXMLAttr key) const
std::string getAdditionalProblem() const
return a string with the current additional problem
bool checkDrawRelatedContour() const
check if draw related contour (cyan)
void setAttribute(SumoXMLAttr key, const std::string &value, GNEUndoList *undoList)
method for setting the attribute and letting the object perform additional changes
This lane is powered by an underlying GNEEdge and basically knows how to draw itself.
double myMoveElementLateralOffset
move element lateral offset (used by elements placed over lanes
const GNELane * newFirstLane
new first Lane
double newFirstPos
new first position
double firstLaneOffset
lane offset
A NBNetBuilder extended by visualisation and editing capabilities.
GNEViewNet * getViewNet() const
get view net
GNETLSEditorFrame::TLSAttributes * getTLSAttributes() const
get module for TLS attributes
void end()
End undo command sub-group. If the sub-group is still empty, it will be deleted; otherwise,...
void begin(GUIIcon icon, const std::string &description)
Begin undo command sub-group with current supermode. This begins a new group of commands that are tre...
const GNEViewNetHelper::DataViewOptions & getDataViewOptions() const
get data view options
GNEViewParent * getViewParent() const
get the net object
GNEUndoList * getUndoList() const
get the undoList object
bool selectingDetectorsTLSMode() const
check if we're selecting detectors in TLS mode
GNETLSEditorFrame * getTLSEditorFrame() const
get frame for NETWORK_TLS
const std::vector< double > & getShapeRotations() const
The rotations of the single shape parts.
const PositionVector & getShape() const
The shape of the additional element.
void updateGeometry(const PositionVector &shape)
update entire geometry
GUIGlObjectType getType() const
Returns the type of the object as coded in GUIGlObjectType.
Stores the information about how to visualize structures.
bool checkDrawAdditional(Detail d, const bool selected) const
check if draw additionals
Detail getDetailLevel(const double exaggeration) const
return the detail level
GUIVisualizationColorSettings colorSettings
color settings
GUIVisualizationDottedContourSettings dottedContourSettings
dotted contour settings
GUIVisualizationAdditionalSettings additionalSettings
Additional settings.
GUIVisualizationDetectorSettings detectorSettings
Detector settings.
Static storage of an output device and its base (abstract) implementation.
OutputDevice & writeAttr(const SumoXMLAttr attr, const T &val)
writes a named attribute
OutputDevice & openTag(const std::string &xmlElement)
Opens an XML tag.
bool closeTag(const std::string &comment="")
Closes the most recently opened tag and optionally adds a comment.
std::map< std::string, std::string > Map
parameters map
void writeParams(OutputDevice &device) const
write Params in the given outputdevice
Position getCentroid() const
Returns the centroid (closes the polygon if unclosed)
static const RGBColor WHITE
static const RGBColor BLACK
RGBColor changedBrightness(int change, int toChange=3) const
Returns a new color with altered brightness.
bool showAdditionals() const
check if additionals has to be drawn
static void drawLockIcon(const GUIVisualizationSettings::Detail d, const GNEAttributeCarrier *AC, GUIGlObjectType type, const Position position, const double exaggeration, const double size=0.5, const double offsetx=0, const double offsety=0)
draw lock icon
static const RGBColor connectionColor
connection color
RGBColor selectedAdditionalColor
additional selection color (busStops, Detectors...)
static const RGBColor E1Color
color for E1 detectors
static const double segmentWidth
width of dotted contour segments