64 myPositionOverLane(pos / lane->getLaneParametricLength()),
67 myFriendlyPosition(friendlyPos) {
111 double lenghtDifference = 0;
double getLaneShapeLength() const
returns the length of the lane's shape
SumoXMLTag
Numbers representing SUMO-XML - element names.
GUIIcon
An enumeration of icons used by the gui applications.
double x() const
Returns the x-position.
GNELane * myLane
The lane this additional belongs.
double myFreq
The aggregation period the values the detector collects shall be summed up.
GNEDetector(const std::string &id, GNEViewNet *viewNet, SumoXMLTag tag, GUIIcon icon, GNELane *lane, double pos, double freq, const std::string &filename, bool friendlyPos)
Constructor.
This lane is powered by an underlying GNEEdge and basically knows how to draw itself.
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...
void commitGeometryMoving(const Position &oldPos, GNEUndoList *undoList)
commit geometry changes in the attributes of an element after use of moveGeometry(...)
~GNEDetector()
Destructor.
const std::string & getFilename() const
returns the path to the output file
GNEViewNet * myViewNet
The GNEViewNet this additional element belongs.
virtual const std::string & getMicrosimID() const
Returns the id of the object as known to microsim.
void p_add(GNEChange_Attribute *cmd)
special method, avoid empty changes, always execute
std::string toString(const T &t, std::streamsize accuracy=gPrecision)
void refreshAdditional(GNEAdditional *additional)
refreshes boundary information of an additional after a geometry update
void p_end()
End undo command sub-group. If the sub-group is still empty, it will be deleted; otherwise, the sub-group will be added as a new command into parent group. A matching begin() must have been called previously.
A point in 2D or 3D with translation and scaling methods.
virtual void updateGeometry()=0
update pre-computed geometry information
friend class GNEChange_Attribute
declare friend class
double length() const
Returns the length.
const std::string & getParentName() const
Returns the name of the parent object.
double getAbsolutePositionOverLane() const
get absolute position over Lane
std::string myFilename
The path to the output file.
const PositionVector & getShape() const
returns the shape of the lane
Position positionAtOffset(double pos, double lateralOffset=0) const
Returns the position at the given length.
void setFrequency(const double freq)
Set a new frequency in detector.
An Element which don't belongs to GNENet but has influency in the simulation.
void setFilename(const std::string &filename)
Set a new filename in detector.
double getFrequency() const
returns the aggregation period the values the detector collects shall be summed up.
GNENet * getNet() const
get the net object
SumoXMLTag getTag() const
get XML Tag assigned to this object
double getLaneParametricLength() const
returns the parameteric length of the lane
Position getPositionInView() const
Returns position of additional in view.
double myPositionOverLane
position of detector over Lane
void moveGeometry(const Position &newPosition)
change the position of the element geometry without saving in undoList