44 MSLane*
const lane,
double positionInMeters,
45 const std::string name,
const std::string& vTypes,
46 const std::string& nextEdges) :
64 myDetector(detector), myPosition(pos) {
96 ret->
mkItem(
TL(
"name"),
false, myDetector.myName);
98 ret->
mkItem(
TL(
"lane"),
false, myDetector.getLane()->getID());
99 if (myDetector.isTyped()) {
112 double width = (double) 2.0 * s.
scale;
114 const double exaggeration = getExaggeration(s);
119 glTranslated(myFGPosition.x(), myFGPosition.y(), 0);
120 glRotated(myFGRotation, 0, 0, 1);
121 glScaled(exaggeration, exaggeration, 1);
123 glVertex2d(0 - 1.0, 2);
124 glVertex2d(-1.0, -2);
128 glTranslated(0, 0, .01);
130 glVertex2d(0, 2 - .1);
131 glVertex2d(0, -2 + .1);
135 if (width * exaggeration > 1) {
137 glPolygonMode(GL_FRONT_AND_BACK, GL_LINE);
139 glVertex2d(0 - 1.0, 2);
140 glVertex2d(-1.0, -2);
144 glPolygonMode(GL_FRONT_AND_BACK, GL_FILL);
148 if (width * exaggeration > 1) {
149 glRotated(90, 0, 0, -1);
157 drawName(getCenteringBoundary().getCenter(), s.
scale, s.
addName);
@ GLO_E1DETECTOR_INSTANT
a E1 detector
GUIIcon
An enumeration of icons used by the gui applications.
std::string toString(const T &t, std::streamsize accuracy=gPrecision)
A class that stores a 2D geometrical boundary.
void add(double x, double y, double z=0)
Makes the boundary include the given coordinate.
Boundary & grow(double by)
extends the boundary by the given amount
static void pushName(unsigned int name)
push Name
static void popMatrix()
pop matrix
static void popName()
pop Name
static void pushMatrix()
push matrix
A MSInductLoop-visualiser.
Position myFGPosition
The position in full-geometry mode.
double getExaggeration(const GUIVisualizationSettings &s) const
return exaggeration associated with this GLObject
MyWrapper(GUIInstantInductLoop &detector, double pos)
Constructor.
Boundary myBoundary
The detector's boundary.
Boundary getCenteringBoundary() const
Returns the boundary to which the view shall be centered in order to show the object.
GUIParameterTableWindow * getParameterWindow(GUIMainWindow &app, GUISUMOAbstractView &parent)
Returns an own parameter window.
double myFGRotation
The rotation in full-geometry mode.
void drawGL(const GUIVisualizationSettings &s) const
Draws the object.
GUIInstantInductLoop & getLoop()
Returns the detector itself.
The gui-version of the MSInstantInductLoop.
~GUIInstantInductLoop()
Destructor.
GUIInstantInductLoop(const std::string &id, OutputDevice &od, MSLane *const lane, double positionInMeters, const std::string name, const std::string &vTypes, const std::string &nextEdges)
Constructor.
virtual GUIDetectorWrapper * buildDetectorGUIRepresentation()
Returns this detector's visualisation-wrapper.
A window containing a gl-object's parameter.
void mkItem(const char *name, bool dynamic, ValueSource< T > *src)
Adds a row which obtains its value from a ValueSource.
void closeBuilding(const Parameterised *p=0)
Closes the building of the table.
Stores the information about how to visualize structures.
GUIVisualizationTextSettings addName
GUIVisualizationSizeSettings addSize
double scale
information about a lane's width (temporary, used for a single view)
An instantaneous induction loop.
const double myPosition
Detector's position on lane [m].
Representation of a lane in the micro simulation.
virtual const PositionVector & getShape(bool) const
const Position geometryPositionAtOffset(double offset, double lateralOffset=0) const
const MSLane * getLane() const
Returns the lane the reminder works on.
Static storage of an output device and its base (abstract) implementation.
double x() const
Returns the x-position.
double y() const
Returns the y-position.
double rotationDegreeAtOffset(double pos) const
Returns the rotation at the given length.
double getExaggeration(const GUIVisualizationSettings &s, const GUIGlObject *o, double factor=20) const
return the drawing size including exaggeration and constantSize values