43 double position,
const std::string& vTypes,
64 myDetector(detector), myPosition(pos) {
115 ret->
mkItem(
"lane",
false, myDetector.mySegment->getID());
125 glPolygonOffset(0, -2);
126 double width = (double) 2.0 * s.
scale;
128 const double exaggeration = getExaggeration(s);
132 glTranslated(myFGPosition.x(), myFGPosition.y(), getType());
133 glRotated(myFGRotation, 0, 0, 1);
134 glScaled(exaggeration, exaggeration, exaggeration);
136 glVertex2d(0 - 1.0, 2);
137 glVertex2d(-1.0, -2);
144 glVertex2d(0, 2 - .1);
145 glVertex2d(0, -2 + .1);
149 if (width * exaggeration > 1) {
151 glPolygonMode(GL_FRONT_AND_BACK, GL_LINE);
153 glVertex2d(0 - 1.0, 2);
154 glVertex2d(-1.0, -2);
158 glPolygonMode(GL_FRONT_AND_BACK, GL_FILL);
162 if (width * exaggeration > 1) {
163 glRotated(90, 0, 0, -1);
171 drawName(getCenteringBoundary().getCenter(), s.
scale, s.
addName);
@ GLO_E1DETECTOR_ME
a E1 detector
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 asociated 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 &vTypes, 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.
const PositionVector & getShape() const
Returns this lane's shape.
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