58 #ifdef CHECK_MEMORY_LEAKS 69 myFilename(filename) {
91 if (((offsetx > 0) && ((endPos + offsetx) <
myLane->
getLaneShapeLenght())) || ((offsetx < 0) && ((startPos + offsetx) > 0))) {
173 glRotated(180, 0, 0, 1);
SumoXMLTag
Numbers representing SUMO-XML - element names.
std::string getFilename() const
returns the path to the output file
void setFilename(std::string filename)
Set a new filename in detector.
SUMOReal getPositionOverLane() const
Returns the position of the detector over lane.
GNELane * myLane
The lane this additional belongs NULL if additional doesnt' belongs to a lane.
void commmitAdditionalGeometryMoved(SUMOReal oldPosx, SUMOReal, GNEUndoList *undoList)
updated geometry changes in the attributes of additional
GNEDetector(const std::string &id, GNEViewNet *viewNet, SumoXMLTag tag, GNELane *lane, SUMOReal posOverLane, int freq, const std::string &filename, bool blocked=false, GNEAdditionalSet *parent=NULL)
Constructor.
const std::string & getParentName() const
Returns the name of the parent object (if any)
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 setFrequency(int freq)
Set a new frequency in detector.
~GNEDetector()
Destructor.
An Element wich group additionalSet elements.
#define UNUSED_PARAMETER(x)
Position getLineCenter() const
get line center
GNEViewNet * myViewNet
The GNEViewNet this additional element belongs.
void setPositionOverLane(SUMOReal pos)
Set a new position of detector over lane.
void p_add(GNEChange_Attribute *cmd)
special method, avoid empty changes, always execute
GUIGlObjectType getType() const
Returns the type of the object as coded in GUIGlObjectType.
SUMOReal getLaneShapeLenght() const
returns the length of the lane's shape
static bool hasAttribute(SumoXMLTag tag, SumoXMLAttr attr)
check if a element with certain tag has a certain attribute
SUMOReal myBlockIconRotation
The rotation of the block icon.
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
SUMOReal x() const
Returns the x-position.
int getFrequency() const
returns the aggregation period the values the detector collects shall be summed up.
virtual const std::string & getMicrosimID() const
Returns the id of the object as known to microsim.
std::string toString(const T &t, std::streamsize accuracy=OUTPUT_ACCURACY)
void drawDetectorIcon(const int GNELogoID, SUMOReal sizex=0.5, SUMOReal sizey=0.5) const
std::string myFilename
The path to the output file.
An Element which don't belongs to GNENet but has influency in the simulation.
void moveAdditionalGeometry(SUMOReal offsetx, SUMOReal offsety)
change the position of the additional geometry
void set(SUMOReal x, SUMOReal y)
GNENet * getNet() const
get the net object
Position myPosition
The position in which this additional element is located.
SUMOReal y() const
Returns the y-position.
static void drawTexturedBox(int which, SUMOReal size)
Draws a named texture as a box with the given size.
int myFreq
The aggregation period the values the detector collects shall be summed up.
virtual std::string getAttribute(SumoXMLAttr key) const =0
SumoXMLTag getTag() const
get Tag assigned to this object