 |
Eclipse SUMO - Simulation of Urban MObility
|
Go to the documentation of this file.
44 MSLane*
const lane,
double positionInMeters,
45 const std::string& vTypes)
63 myDetector(detector), myPosition(pos) {
90 ret->
mkItem(
"lane",
false, myDetector.getLane()->getID());
100 glPushName(getGlID());
101 double width = (double) 2.0 * s.
scale;
107 glTranslated(0, 0, getType());
108 glTranslated(myFGPosition.x(), myFGPosition.y(), 0);
109 glRotated(myFGRotation, 0, 0, 1);
110 glScaled(exaggeration, exaggeration, 1);
112 glVertex2d(0 - 1.0, 2);
113 glVertex2d(-1.0, -2);
117 glTranslated(0, 0, .01);
119 glVertex2d(0, 2 - .1);
120 glVertex2d(0, -2 + .1);
124 if (width * exaggeration > 1) {
126 glPolygonMode(GL_FRONT_AND_BACK, GL_LINE);
128 glVertex2f(0 - 1.0, 2);
129 glVertex2f(-1.0, -2);
133 glPolygonMode(GL_FRONT_AND_BACK, GL_FILL);
137 if (width * exaggeration > 1) {
138 glRotated(90, 0, 0, -1);
146 drawName(getCenteringBoundary().getCenter(), s.
scale, s.
addName);
GUIParameterTableWindow * getParameterWindow(GUIMainWindow &app, GUISUMOAbstractView &parent)
Returns an own parameter window.
A window containing a gl-object's parameter.
Representation of a lane in the micro simulation.
Static storage of an output device and its base (abstract) implementation.
const double myPosition
Detector's position on lane [m].
void closeBuilding(const Parameterised *p=0)
Closes the building of the table.
The gui-version of the MSInstantInductLoop.
Position myFGPosition
The position in full-geometry mode.
GUIVisualizationTextSettings addName
GUIInstantInductLoop & getLoop()
Returns the detector itself.
virtual GUIDetectorWrapper * buildDetectorGUIRepresentation()
Returns this detector's visualisation-wrapper.
GUIInstantInductLoop(const std::string &id, OutputDevice &od, MSLane *const lane, double positionInMeters, const std::string &vTypes)
Constructor.
void mkItem(const char *name, bool dynamic, ValueSource< T > *src)
Adds a row which obtains its value from a ValueSource.
@ GLO_E1DETECTOR_INSTANT
a E1 detector
double rotationDegreeAtOffset(double pos) const
Returns the rotation at the given length.
A class that stores a 2D geometrical boundary.
double scale
information about a lane's width (temporary, used for a single view)
double x() const
Returns the x-position.
void add(double x, double y, double z=0)
Makes the boundary include the given coordinate.
void drawGL(const GUIVisualizationSettings &s) const
Draws the object.
A MSInductLoop-visualiser.
An instantaneous induction loop.
const MSLane * getLane() const
Returns the lane the reminder works on.
const PositionVector & getShape() const
Returns this lane's shape.
double y() const
Returns the y-position.
~GUIInstantInductLoop()
Destructor.
GUIVisualizationSizeSettings addSize
Boundary & grow(double by)
extends the boundary by the given amount
const Position geometryPositionAtOffset(double offset, double lateralOffset=0) const
Boundary getCenteringBoundary() const
Returns the boundary to which the view shall be centered in order to show the object.
Stores the information about how to visualize structures.
double myFGRotation
The rotation in full-geometry mode.
Boundary myBoundary
The detector's boundary.
MyWrapper(GUIInstantInductLoop &detector, double pos)
Constructor.
double getExaggeration(const GUIVisualizationSettings &s, const GUIGlObject *o, double factor=20) const
return the drawing size including exaggeration and constantSize values