74 myStateTarget(myState),
78 int segments = (int)
myShape.size() - 1;
82 for (
int i = 0; i < segments; ++i) {
110 if (FXSELTYPE(sel) == SEL_COMMAND) {
164 for (std::vector<std::string>::const_iterator it = names.begin(); it != names.end(); it++) {
167 FXMenuRadio* mc =
new FXMenuRadio(
myPopup, (*it + origHint).c_str(),
this, FXDataTarget::ID_OPTION + state);
203 std::cout <<
"invalid link state='" << state <<
"'\n";
The link has green light, may pass.
double scale
information about a lane's width (temporary, used for a single view)
void closeBuilding(const Parameterised *p=0)
Closes the building of the table.
static void drawBoxLines(const PositionVector &geom, const std::vector< double > &rots, const std::vector< double > &lengths, double width, int cornerDetail=0, double offset=0)
Draws thick lines.
GUIParameterTableWindow * getParameterWindow(GUIMainWindow &app, GUISUMOAbstractView &parent)
Returns an own parameter window.
double distanceTo2D(const Position &p2) const
returns the euclidean distance in the x-y-plane
The link has green light, has to brake.
Stores the information about how to visualize structures.
This is an uncontrolled, minor link, has to stop.
double y() const
Returns the y-position.
static RGBColor colorForLinksState(FXuint state)
return the color for each linkstate
This object is responsible for drawing a shape and for supplying a a popup menu. Messages are routete...
double x() const
Returns the x-position.
int myTlIndex
the tl-index of this lane
const PositionVector myShape
the shape of the edge
static StringBijection< FXuint >::Entry linkStateNamesValues[]
linkstates names values
static const RGBColor BLACK
The link is controlled by a tls which is off, not blinking, may pass.
LinkState getLinkState() const
whether link state has been modfied
A class that stores a 2D geometrical boundary.
std::vector< std::string > getStrings() const
FXDataTarget myStateTarget
LinkState myOrigState
the original state of the link (used for tracking modification)
Boundary getCenteringBoundary() const
Returns the boundary to which the view shall be centered in order to show the object.
std::vector< double > myShapeRotations
static void setColor(const RGBColor &c)
Sets the gl-color to this value.
A point in 2D or 3D with translation and scaling methods.
T get(const std::string &str) const
LinkState
The right-of-way state of a link between two lanes used when constructing a NBTrafficLightLogic, in MSLink and GNEInternalLane.
void handleChange(GNEInternalLane *lane)
update phase definition for the current traffic light and phase
int getTLIndex() const
get Traffic Light index
Boundary & grow(double by)
extends the boundary by the given amount
static void drawLine(const Position &beg, double rot, double visLength)
Draws a thin line.
GNETLSEditorFrame * myEditor
the editor to inform about changes
void destroyPopup()
destoys the popup
long onDefault(FXObject *, FXSelector, void *)
multiplexes message to two targets
virtual ~GNEInternalLane()
Destructor.
std::vector< double > myShapeLengths
The lengths of the shape parts.
The link has yellow light, may pass.
void drawGL(const GUIVisualizationSettings &s) const
Draws the object.
The link is controlled by a tls which is off and blinks, has to brake.
The link has red light (must brake)
void setLinkState(LinkState state)
set the linkState (controls drawing color)
GUIGLObjectPopupMenu * myPopup
the created popup
static const StringBijection< FXuint > LinkStateNames
long names for link states
static FXColor getFXColor(const RGBColor &col)
converts FXColor to RGBColor
GUIGlID getGlID() const
Returns the numerical id of the object.
GUIGLObjectPopupMenu * getPopUpMenu(GUIMainWindow &app, GUISUMOAbstractView &parent)
Returns an own popup-menu.
Boundary getBoxBoundary() const
Returns a boundary enclosing this list of lines.
GNEInternalLane()
FOX needs this.
The link has yellow light, has to brake anyway.
A window containing a gl-object's parameter.
static const RGBColor & getLinkColor(const LinkState &ls)
map from LinkState to color constants
The link has red light (must brake) but indicates upcoming green.
FXuint myState
the state of the link (used for visualization)
void buildPopupHeader(GUIGLObjectPopupMenu *ret, GUIMainWindow &app, bool addSeparator=true)
Builds the header.