 |
Eclipse SUMO - Simulation of Urban MObility
|
Go to the documentation of this file.
45 MSLane*
const lane,
double positionInMeters,
46 const std::string& vTypes)
64 myDetector(detector), myPosition(pos) {
91 ret->
mkItem(
"lane",
false, myDetector.getLane()->getID());
101 glPushName(getGlID());
102 double width = (double) 2.0 * s.
scale;
108 glTranslated(0, 0, getType());
109 glTranslated(myFGPosition.x(), myFGPosition.y(), 0);
110 glRotated(myFGRotation, 0, 0, 1);
111 glScaled(exaggeration, exaggeration, 1);
113 glVertex2d(0 - 1.0, 2);
114 glVertex2d(-1.0, -2);
118 glTranslated(0, 0, .01);
120 glVertex2d(0, 2 - .1);
121 glVertex2d(0, -2 + .1);
125 if (width * exaggeration > 1) {
127 glPolygonMode(GL_FRONT_AND_BACK, GL_LINE);
129 glVertex2f(0 - 1.0, 2);
130 glVertex2f(-1.0, -2);
134 glPolygonMode(GL_FRONT_AND_BACK, GL_FILL);
138 if (width * exaggeration > 1) {
139 glRotated(90, 0, 0, -1);
147 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.
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