 |
Eclipse SUMO - Simulation of Urban MObility
|
Go to the documentation of this file.
31 #include <osg/Geometry>
73 if (!(*it)->isInternal()) {
77 if (!
isRailway((*it)->getPermissions())) {
83 if (!(*it)->isInternal()) {
87 if (!
isRailway((*it)->getPermissions())) {
145 if (color.alpha() != 0) {
148 if (exaggeration > 1) {
157 #ifdef GUIJunctionWrapper_DEBUG_DRAW_NODE_SHAPE_VERTICES
190 switch (activeScheme) {
248 osg::Vec4ubArray* colors = dynamic_cast<osg::Vec4ubArray*>(myGeom->getColorArray());
249 (*colors)[0].set(col.red(), col.green(), col.blue(), col.alpha());
250 myGeom->setColorArray(colors);
GUIGlObjectType getType() const
Returns the type of the object as coded in GUIGlObjectType.
static void debugVertices(const PositionVector &shape, double size, double layer=256)
draw vertex numbers for the given shape (in a random color)
static void drawTextSettings(const GUIVisualizationTextSettings &settings, const std::string &text, const Position &pos, const double scale, const double angle=0, const double layer=2048)
A window containing a gl-object's parameter.
GUIVisualizationSizeSettings junctionSize
GUIVisualizationTextSettings tlsPhaseIndex
The base class for an intersection.
void drawName(const Position &pos, const double scale, const GUIVisualizationTextSettings &settings, const double angle=0) const
draw name of item
double angle
The current view rotation angle.
double z() const
Returns the z-position.
void buildSelectionPopupEntry(GUIGLObjectPopupMenu *ret, bool addSeparator=true)
Builds an entry which allows to (de)select the object.
bool myIsInternal
whether this wraps an instance of MSInternalJunction
void scaleRelative(double factor)
enlarges/shrinks the polygon by a factor based at the centroid
virtual int getCurrentPhaseIndex() const =0
Returns the current index within the program.
double getHeight() const
Returns the height of the boundary (y-axis)
GUIJunctionWrapper(MSJunction &junction, const std::string &tllID)
Constructor.
static void drawFilledPoly(const PositionVector &v, bool close)
Draws a filled polygon described by the list of points.
static void setColor(const RGBColor &c)
Sets the gl-color to this value.
Boundary getBoxBoundary() const
Returns a boundary enclosing this list of lines.
void closeBuilding(const Parameterised *p=0)
Closes the building of the table.
const ConstMSEdgeVector & getIncoming() const
MSTrafficLightLogic * getActive(const std::string &id) const
Returns the active program of a named tls.
double scaledSize(double scale, double constFactor=0.1) const
get scale size
const ConstMSEdgeVector & getOutgoing() const
GUIVisualizationTextSettings junctionName
GUIColorer junctionColorer
The junction colorer.
static void drawFilledCircle(double width, int steps=8)
Draws a filled circle around (0,0)
const std::map< std::string, std::string > & getParametersMap() const
Returns the inner key/value map.
void buildNameCopyPopupEntry(GUIGLObjectPopupMenu *ret, bool addSeparator=true)
Builds entries which allow to copy the name / typed name into the clipboard.
GUIGLObjectPopupMenu * getPopUpMenu(GUIMainWindow &app, GUISUMOAbstractView &parent)
Returns an own popup-menu.
bool myAmWaterway
whether this junction has only waterways as incoming and outgoing edges
void mkItem(const char *name, bool dynamic, ValueSource< T > *src)
Adds a row which obtains its value from a ValueSource.
bool isWaterway(SVCPermissions permissions)
Returns whether an edge with the given permission is a waterway edge.
void closePolygon()
ensures that the last position equals the first
GUIGlID getGlID() const
Returns the numerical id of the object.
A class that stores a 2D geometrical boundary.
double getWidth() const
Returns the width of the boudary (x-axis)
double scale
information about a lane's width (temporary, used for a single view)
double getColorValue(const GUIVisualizationSettings &s, int activeScheme) const
bool isRailway(SVCPermissions permissions)
Returns whether an edge with the given permission is a railway edge.
A point in 2D or 3D with translation and scaling methods.
double x() const
Returns the x-position.
static void drawFilledPolyTesselated(const PositionVector &v, bool close)
Draws a filled polygon described by the list of points.
SumoXMLNodeType getType() const
return the type of this Junction
The parent class for traffic light logics.
GUIParameterTableWindow * getParameterWindow(GUIMainWindow &app, GUISUMOAbstractView &parent)
Returns an own parameter window.
GUIVisualizationTextSettings internalJunctionName
const Position & getPosition() const
double minSize
The minimum size to draw this object.
void buildPopupHeader(GUIGLObjectPopupMenu *ret, GUIMainWindow &app, bool addSeparator=true)
Builds the header.
MSJunction & myJunction
A reference to the represented junction.
const std::string myTLLID
the associated traffic light or ""
MSTLLogicControl & getTLSControl()
Returns the tls logics control.
std::string toString(const T &t, std::streamsize accuracy=gPrecision)
static MSNet * getInstance()
Returns the pointer to the unique instance of MSNet (singleton).
double y() const
Returns the y-position.
virtual ~GUIJunctionWrapper()
Destructor.
void buildShowParamsPopupEntry(GUIGLObjectPopupMenu *ret, bool addSeparator=true)
Builds an entry which allows to open the parameter window.
GUISelectedStorage gSelected
A global holder of selected objects.
void buildCenterPopupEntry(GUIGLObjectPopupMenu *ret, bool addSeparator=true)
Builds an entry which allows to center to the object.
void buildPositionCopyEntry(GUIGLObjectPopupMenu *ret, bool addSeparator=true)
Builds an entry which allows to copy the cursor position if geo projection is used,...
const PositionVector & getShape() const
Returns this junction's shape.
Boundary & grow(double by)
extends the boundary by the given amount
double myMaxSize
The maximum size (in either x-, or y-dimension) for determining whether to draw or not.
bool drawJunctionShape
whether the shape of the junction should be drawn
Stores the information about how to visualize structures.
Boundary myBoundary
The represented junction's boundary.
const T getColor(const double value) const
Boundary getCenteringBoundary() const
Returns the boundary to which the view shall be centered in order to show the object.
double getExaggeration(const GUIVisualizationSettings &s, const GUIGlObject *o, double factor=20) const
return the drawing size including exaggeration and constantSize values
virtual const MSPhaseDefinition & getCurrentPhaseDef() const =0
Returns the definition of the current phase.
void drawGL(const GUIVisualizationSettings &s) const
Draws the object.
bool myAmRailway
whether this junction has only railways as incoming and outgoing edges
bool isSelected(GUIGlObjectType type, GUIGlID id)
Returns the information whether the object with the given type and id is selected.
const std::string & getName() const