65 myFilename(filename) {
87 if (((offsetx > 0) && ((endPos + offsetx) <
myLane->
getLaneShapeLength())) || ((offsetx < 0) && ((startPos + offsetx) > 0))) {
169 glRotated(180, 0, 0, 1);
static void drawTexturedBox(int which, double size)
Draws a named texture as a box with the given size.
double getLaneShapeLength() const
returns the length of the lane's shape
void commmitAdditionalGeometryMoved(double oldPosx, double, GNEUndoList *undoList)
updated geometry changes in the attributes of additional
SumoXMLTag
Numbers representing SUMO-XML - element names.
void setFilename(std::string filename)
Set a new filename in detector.
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.
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...
std::string getFilename() const
returns the path to the output file
~GNEDetector()
Destructor.
void set(double x, double y)
set positions x and y
GNEDetector(const std::string &id, GNEViewNet *viewNet, SumoXMLTag tag, GUIIcon icon, GNELane *lane, double posOverLane, double freq, const std::string &filename)
Constructor.
void setPositionOverLane(double pos)
Set a new position of detector over lane.
#define UNUSED_PARAMETER(x)
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
virtual std::string getAttribute(SumoXMLAttr key) const =0
GUIGlObjectType getType() const
Returns the type of the object as coded in GUIGlObjectType.
std::string toString(const T &t, std::streamsize accuracy=gPrecision)
static bool hasAttribute(SumoXMLTag tag, SumoXMLAttr attr)
check if an element with certain tag has a certain attribute
void refreshAdditional(GNEAdditional *additional)
refreshes boundary information of an additional after a geometry update
PositionVector myShape
The shape of the additional element.
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
Position myDetectorLogoOffset
The position of detector.
friend class GNEChange_Attribute
declare friend class
double y() const
Returns the y-position.
const std::string & getParentName() const
Returns the name of the parent object (if any)
std::string myFilename
The path to the output file.
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.
double getFrequency() const
returns the aggregation period the values the detector collects shall be summed up.
GNENet * getNet() const
get the net object
void moveAdditionalGeometry(double offsetx, double offsety)
change the position of the additional geometry
Position getLineCenter() const
get line center
SumoXMLTag getTag() const
get XML Tag assigned to this object
Position myPosition
The position in which this additional element is located.
double getPositionOverLane() const
Returns the position of the detector over lane.
void drawDetectorIcon(const int GNELogoID, double sizex=0.5, double sizey=0.5) const
double myBlockIconRotation
The rotation of the block icon.