45 double position,
const std::string& vTypes)
84 std::vector<MSInductLoop::VehicleData>
125 ret->
mkItem(
"passed vehicles [#]",
true,
127 ret->
mkItem(
"speed [m/s]",
true,
129 ret->
mkItem(
"occupancy [%]",
true,
131 ret->
mkItem(
"vehicle length [m]",
true,
133 ret->
mkItem(
"empty time [s]",
true,
144 double width = (double) 2.0 * s.
scale;
153 glScaled(exaggeration, exaggeration, 1);
155 glVertex2d(0 - 1.0, 2);
156 glVertex2d(-1.0, -2);
160 glTranslated(0, 0, .01);
162 glVertex2d(0, 2 - .1);
163 glVertex2d(0, -2 + .1);
167 if (width * exaggeration > 1) {
169 glPolygonMode(GL_FRONT_AND_BACK, GL_LINE);
171 glVertex2f(0 - 1.0, 2);
172 glVertex2f(-1.0, -2);
176 glPolygonMode(GL_FRONT_AND_BACK, GL_FILL);
180 if (width * exaggeration > 1) {
181 glRotated(90, 0, 0, -1);
const double myPosition
Detector's position on lane [m].
const MSLane * getLane() const
Returns the lane the reminder works on.
double rotationDegreeAtOffset(double pos) const
Returns the rotation at the given length.
double scale
information about a lane's width (temporary, used for a single view)
Boundary myBoundary
The detector's boundary.
void closeBuilding(const Parameterised *p=0)
Closes the building of the table.
A MSInductLoop-visualiser.
void reset()
Resets all generated values to allow computation of next interval.
GUIVisualizationTextSettings addName
MyWrapper(GUIInductLoop &detector, double pos)
Constructor.
Stores the information about how to visualize structures.
double y() const
Returns the y-position.
virtual void leaveDetectorByLaneChange(SUMOVehicle &veh, double lastPos)
Removes a vehicle from the detector's map myVehiclesOnDet.
virtual void reset()
Resets all generated values to allow computation of next interval.
virtual void leaveDetectorByMove(SUMOVehicle &veh, double leaveTimestep)
Processes a vehicle that leaves the detector.
void mkItem(const char *name, bool dynamic, ValueSource< T > *src)
Adds a row which obtains its value from a ValueSource.
double x() const
Returns the x-position.
double getCurrentLength() const
Returns the length of the vehicle on the detector.
const PositionVector & getShape() const
Returns this lane's shape.
Position myFGPosition
The position in full-geometry mode.
GUIInductLoop & myDetector
The wrapped detector.
const std::string & getID() const
Returns the id.
GUIParameterTableWindow * getParameterWindow(GUIMainWindow &app, GUISUMOAbstractView &parent)
Returns an own parameter window.
A class that stores a 2D geometrical boundary.
MFXMutex myLock
Mutex preventing parallel read/write access to internal MSInductLoop state.
GUIVisualizationSizeSettings addSize
GUIInductLoop(const std::string &id, MSLane *const lane, double position, const std::string &vTypes)
Constructor.
The gui-version of the MSInductLoop.
double myPosition
The position on the lane.
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, double entryTimestep)
Introduces a vehicle to the detector's map myVehiclesOnDet.
double getCurrentSpeed() const
Returns the speed of the vehicle on the detector.
void drawName(const Position &pos, const double scale, const GUIVisualizationTextSettings &settings, const double angle=0) const
draw name of item
Boundary & grow(double by)
extends the boundary by the given amount
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...
double getTimeSinceLastDetection() const
Returns the time since the last vehicle left the detector.
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.
void enterDetectorByMove(SUMOVehicle &veh, double entryTimestep)
Introduces a vehicle to the detector's map myVehiclesOnDet.
A mutex encapsulator which locks/unlocks the given mutex on construction/destruction, respectively.
const Position geometryPositionAtOffset(double offset, double lateralOffset=0) const
~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...
void leaveDetectorByLaneChange(SUMOVehicle &veh, double lastPos)
Removes a vehicle from the detector's map myVehiclesOnDet.
GUIInductLoop & getLoop()
Returns the detector itself.
void leaveDetectorByMove(SUMOVehicle &veh, double leaveTimestep)
Processes a vehicle that leaves the detector.
double myFGRotation
The rotation in full-geometry mode.
void add(double x, double y, double z=0)
Makes the boundary include the given coordinate.
double getExaggeration(const GUIVisualizationSettings &s, const GUIGlObject *o, double factor=20) const
return the drawing size including exaggeration and constantSize values
double getCurrentOccupancy() const
Returns the current occupancy.
Representation of a lane in the micro simulation.
A window containing a gl-object's parameter.
void drawGL(const GUIVisualizationSettings &s) const
Draws the object.
An unextended detector measuring at a fixed position on a fixed lane.