44 const std::string name,
const std::string& vTypes,
45 const std::string& nextEdges,
48 MEInductLoop(id, s, position, name, vTypes, nextEdges, detectPersons)
66 myDetector(detector), myPosition(pos) {
117 ret->
mkItem(
"lane",
false, myDetector.mySegment->getID());
127 glPolygonOffset(0, -2);
128 double width = (double) 2.0 * s.
scale;
130 const double exaggeration = getExaggeration(s);
134 glTranslated(myFGPosition.x(), myFGPosition.y(), getType());
135 glRotated(myFGRotation, 0, 0, 1);
136 glScaled(exaggeration, exaggeration, exaggeration);
138 glVertex2d(0 - 1.0, 2);
139 glVertex2d(-1.0, -2);
146 glVertex2d(0, 2 - .1);
147 glVertex2d(0, -2 + .1);
151 if (width * exaggeration > 1) {
153 glPolygonMode(GL_FRONT_AND_BACK, GL_LINE);
155 glVertex2d(0 - 1.0, 2);
156 glVertex2d(-1.0, -2);
160 glPolygonMode(GL_FRONT_AND_BACK, GL_FILL);
164 if (width * exaggeration > 1) {
165 glRotated(90, 0, 0, -1);
173 drawName(getCenteringBoundary().getCenter(), s.
scale, s.
addName);
@ GLO_E1DETECTOR_ME
a E1 detector
GUIIcon
An enumeration of icons used by the gui applications.
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
double getExaggeration(const GUIVisualizationSettings &s) const
return exaggeration associated with this GLObject
Boundary myBoundary
The detector's boundary.
Position myFGPosition
The position in full-geometry mode.
GUIParameterTableWindow * getParameterWindow(GUIMainWindow &app, GUISUMOAbstractView &parent)
Returns an own parameter window.
Boundary getCenteringBoundary() const
Returns the boundary to which the view shall be centered in order to show the object.
GUIMEInductLoop & getLoop()
Returns the detector itself.
double myFGRotation
The rotation in full-geometry mode.
MyWrapper(GUIMEInductLoop &detector, double pos)
Constructor.
void drawGL(const GUIVisualizationSettings &s) const
Draws the object.
GUIMEInductLoop(const std::string &id, MESegment *s, double position, const std::string name, const std::string &vTypes, const std::string &nextEdges, int detectPersons, bool show)
Construtor.
virtual GUIDetectorWrapper * buildDetectorGUIRepresentation()
Returns this detector's visualisation-wrapper.
~GUIMEInductLoop()
Destructor.
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 induction loop for mesoscopic simulation.
MESegment *const mySegment
mesoscopic edge segment the loop lies on
const double myPosition
position from the start of the edge / lane
A single mesoscopic segment (cell)
const MSEdge & getEdge() const
Returns the edge this segment belongs to.
const std::vector< MSLane * > & getLanes() const
Returns this edge's lanes.
Representation of a lane in the micro simulation.
virtual const PositionVector & getShape(bool) const
const Position geometryPositionAtOffset(double offset, double lateralOffset=0) const
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