38 #include <osg/Geometry> 65 myJunction(junction) {
76 if (!(*it)->isInternal() && !
isWaterway((*it)->getPermissions())) {
82 if (!(*it)->isInternal() && !
isWaterway((*it)->getPermissions())) {
135 glGetFloatv(GL_CURRENT_COLOR, color);
140 if (exaggeration > 1) {
149 #ifdef GUIJunctionWrapper_DEBUG_DRAW_NODE_SHAPE_VERTICES 221 osg::Vec4ubArray* colors =
dynamic_cast<osg::Vec4ubArray*
>(myGeom->getColorArray());
223 myGeom->setColorArray(colors);
GUIVisualizationSizeSettings junctionSize
GUIVisualizationTextSettings junctionName
double scale
information about a lane's width (temporary, used for a single view)
void buildNameCopyPopupEntry(GUIGLObjectPopupMenu *ret, bool addSeparator=true)
Builds entries which allow to copy the name / typed name into the clipboard.
unsigned char alpha() const
Returns the alpha-amount of the color.
Stores the information about how to visualize structures.
The base class for an intersection.
static void debugVertices(const PositionVector &shape, double size, double layer=256)
draw vertex numbers for the given shape (in a random color)
double y() const
Returns the y-position.
double getColorValue(const GUIVisualizationSettings &s) const
double x() const
Returns the x-position.
void buildCenterPopupEntry(GUIGLObjectPopupMenu *ret, bool addSeparator=true)
Builds an entry which allows to center to the object.
void drawGL(const GUIVisualizationSettings &s) const
Draws the object.
double getWidth() const
Returns the width of the boudary (x-axis)
bool isSelected(GUIGlObjectType type, GUIGlID id)
Returns the information whether the object with the given type and id is selected.
static void drawFilledPoly(const PositionVector &v, bool close)
Draws a filled polygon described by the list of points.
unsigned char blue() const
Returns the blue-amount of the color.
bool myAmWaterway
whether this junction has only waterways as incoming and outgoing edges
void buildPositionCopyEntry(GUIGLObjectPopupMenu *ret, bool addSeparator=true)
Builds an entry which allows to copy the cursor position if geo projection is used, also builds an entry for copying the geo-position.
A class that stores a 2D geometrical boundary.
static void drawFilledPolyTesselated(const PositionVector &v, bool close)
Draws a filled polygon described by the list of points.
GUIJunctionWrapper(MSJunction &junction)
Constructor.
GUIGlObjectType getType() const
Returns the type of the object as coded in GUIGlObjectType.
static void setColor(const RGBColor &c)
Sets the gl-color to this value.
double minSize
The minimum size to draw this object.
A point in 2D or 3D with translation and scaling methods.
bool isWaterway(SVCPermissions permissions)
Returns whether an edge with the given permission is a waterway edge.
const ConstMSEdgeVector & getIncoming() const
const Position & getPosition() const
void drawName(const Position &pos, const double scale, const GUIVisualizationTextSettings &settings, const double angle=0) const
draw name of item
GUIVisualizationTextSettings internalJunctionName
Boundary & grow(double by)
extends the boundary by the given amount
GUIColorer junctionColorer
The junction colorer.
const T getColor(const double value) const
virtual ~GUIJunctionWrapper()
Destructor.
double myMaxSize
The maximum size (in either x-, or y-dimension) for determining whether to draw or not...
const ConstMSEdgeVector & getOutgoing() const
GUIGLObjectPopupMenu * getPopUpMenu(GUIMainWindow &app, GUISUMOAbstractView &parent)
Returns an own popup-menu.
GUIParameterTableWindow * getParameterWindow(GUIMainWindow &app, GUISUMOAbstractView &parent)
Returns an own parameter window.
double getHeight() const
Returns the height of the boundary (y-axis)
unsigned char green() const
Returns the green-amount of the color.
void scaleRelative(double factor)
enlarges/shrinks the polygon by a factor based at the centroid
Boundary myBoundary
The represented junction's boundary.
void buildSelectionPopupEntry(GUIGLObjectPopupMenu *ret, bool addSeparator=true)
Builds an entry which allows to (de)select the object.
Boundary getCenteringBoundary() const
Returns the boundary to which the view shall be centered in order to show the object.
MSJunction & myJunction
A reference to the represented junction.
GUIGlID getGlID() const
Returns the numerical id of the object.
double getExaggeration(const GUIVisualizationSettings &s, double factor=20) const
return the drawing size including exaggeration and constantSize values
unsigned char red() const
Returns the red-amount of the color.
bool drawJunctionShape
whether the shape of the junction should be drawn
Boundary getBoxBoundary() const
Returns a boundary enclosing this list of lines.
void closePolygon()
ensures that the last position equals the first
GUISelectedStorage gSelected
A global holder of selected objects.
A window containing a gl-object's parameter.
const PositionVector & getShape() const
Returns this junction's shape.
bool myIsInner
whether this wraps an instance of MSInternalJunction
void buildPopupHeader(GUIGLObjectPopupMenu *ret, GUIMainWindow &app, bool addSeparator=true)
Builds the header.
SumoXMLNodeType getType() const
return the type of this Junction