44 #ifdef CHECK_MEMORY_LEAKS 46 #endif // CHECK_MEMORY_LEAKS 56 SUMOReal position,
const std::string& vTypes)
95 std::vector<MSInductLoop::VehicleData>
136 ret->
mkItem(
"passed vehicles [#]",
true,
138 ret->
mkItem(
"speed [m/s]",
true,
140 ret->
mkItem(
"occupancy [%]",
true,
142 ret->
mkItem(
"vehicle length [m]",
true,
144 ret->
mkItem(
"empty time [s]",
true,
164 glScaled(exaggeration, exaggeration, 1);
166 glVertex2d(0 - 1.0, 2);
167 glVertex2d(-1.0, -2);
171 glTranslated(0, 0, .01);
173 glVertex2d(0, 2 - .1);
174 glVertex2d(0, -2 + .1);
178 if (width * exaggeration > 1) {
180 glPolygonMode(GL_FRONT_AND_BACK, GL_LINE);
182 glVertex2f(0 - 1.0, 2);
183 glVertex2f(-1.0, -2);
187 glPolygonMode(GL_FRONT_AND_BACK, GL_FILL);
191 if (width * exaggeration > 1) {
192 glRotated(90, 0, 0, -1);
void drawName(const Position &pos, const SUMOReal scale, const GUIVisualizationTextSettings &settings, const SUMOReal angle=0) const
draw name of item
void leaveDetectorByMove(SUMOVehicle &veh, SUMOReal leaveTimestep)
Processes a vehicle that leaves the detector.
GUIInductLoop(const std::string &id, MSLane *const lane, SUMOReal position, const std::string &vTypes)
Constructor.
MyWrapper(GUIInductLoop &detector, SUMOReal pos)
Constructor.
const MSLane * getLane() const
Returns the lane the reminder works on.
SUMOReal getTimestepsSinceLastDetection() const
Returns the time since the last vehicle left the detector.
Boundary myBoundary
The detector's boundary.
A MSInductLoop-visualiser.
void reset()
Resets all generated values to allow computation of next interval.
GUIVisualizationTextSettings addName
Stores the information about how to visualize structures.
virtual void reset()
Resets all generated values to allow computation of next interval.
SUMOReal myPosition
The position on the lane.
const PositionVector & getShape() const
Returns this lane's shape.
Position myFGPosition
The position in full-geometry mode.
SUMOReal getCurrentOccupancy() const
Returns the current occupancy.
GUIInductLoop & myDetector
The wrapped detector.
const std::string & getID() const
Returns the id.
GUIParameterTableWindow * getParameterWindow(GUIMainWindow &app, GUISUMOAbstractView &parent)
Returns an own parameter window.
const SUMOReal myPosition
Detector's position on lane [m].
A class that stores a 2D geometrical boundary.
SUMOReal scale
information about a lane's width (temporary, used for a single view)
MFXMutex myLock
Mutex preventing parallel read/write access to internal MSInductLoop state.
GUIVisualizationSizeSettings addSize
The gui-version of the MSInductLoop.
GUIGlObjectType getType() const
Returns the type of the object as coded in GUIGlObjectType.
Representation of a vehicle.
virtual GUIDetectorWrapper * buildDetectorGUIRepresentation()
Returns this detector's visualisation-wrapper.
virtual void enterDetectorByMove(SUMOVehicle &veh, SUMOReal entryTimestep)
Introduces a vehicle to the detector's map myVehiclesOnDet.
void enterDetectorByMove(SUMOVehicle &veh, SUMOReal entryTimestep)
Introduces a vehicle to the detector's map myVehiclesOnDet.
SUMOReal rotationDegreeAtOffset(SUMOReal pos) const
Returns the rotation at the given length.
SUMOReal x() const
Returns the x-position.
std::vector< VehicleData > collectVehiclesOnDet(SUMOTime t, bool leaveTime=false) const
Returns vehicle data for vehicles that have been on the detector starting at the given time...
Boundary getCenteringBoundary() const
Returns the boundary to which the view shall be centered in order to show the object.
int getCurrentPassedNumber() const
Returns the number of vehicles that have passed the detector.
Boundary & grow(SUMOReal by)
extends the boundary by the given amount
SUMOReal myFGRotation
The rotation in full-geometry mode.
void add(SUMOReal x, SUMOReal y, SUMOReal z=0)
Makes the boundary include the given coordinate.
A mutex encapsulator which locks/unlocks the given mutex on construction/destruction, respectively.
virtual void leaveDetectorByLaneChange(SUMOVehicle &veh, SUMOReal lastPos)
Removes a vehicle from the detector's map myVehiclesOnDet.
~GUIInductLoop()
Destructor.
GUIGlID getGlID() const
Returns the numerical id of the object.
virtual std::vector< VehicleData > collectVehiclesOnDet(SUMOTime t, bool leaveTime=false) const
Returns vehicle data for vehicles that have been on the detector starting at the given time...
SUMOReal getExaggeration(const GUIVisualizationSettings &s, SUMOReal factor=20) const
return the drawing size including exaggeration and constantSize values
GUIInductLoop & getLoop()
Returns the detector itself.
virtual void leaveDetectorByMove(SUMOVehicle &veh, SUMOReal leaveTimestep)
Processes a vehicle that leaves the detector.
SUMOReal getCurrentSpeed() const
Returns the speed of the vehicle on the detector.
SUMOReal y() const
Returns the y-position.
void mkItem(const char *name, bool dynamic, ValueSource< unsigned > *src)
Adds a row which obtains its value from an unsigned-ValueSource.
void closeBuilding()
Closes the building of the table.
Representation of a lane in the micro simulation.
A window containing a gl-object's parameter.
SUMOReal getCurrentLength() const
Returns the length of the vehicle on the detector.
const Position geometryPositionAtOffset(SUMOReal offset, SUMOReal lateralOffset=0) const
void drawGL(const GUIVisualizationSettings &s) const
Draws the object.
An unextended detector measuring at a fixed position on a fixed lane.
void leaveDetectorByLaneChange(SUMOVehicle &veh, SUMOReal lastPos)
Removes a vehicle from the detector's map myVehiclesOnDet.