Public Member Functions | |
| TrafficLight (Junction junction) | |
| TrafficLight (double redPhaseLength, double yellowPhaseLength, double greenPhaseLength, Junction junction) | |
| void | changePhases (int timePerStep) |
| void | calculateTrafficLightPosition (Street tmpStreet) |
| double | getGreenPhaseLength () |
| void | setGreenPhaseLength (double greenPhaseLength) |
| void | setYellowPhaseLength (double yellowPhaseLength) |
| double | getYellowPhaseLength () |
| void | setRedPhaseLength (double redPhaseLength) |
| double | getRedPhaseLength () |
| void | setState (int state) |
| int | getState () |
| Street[] | getStreets_ () |
| void | setStreets_ (Street[] streets_) |
This class represents a traffic light at a junction.
|
inline |
Constructor.
|
inline |
Constructor.
|
inline |
Calculates Traffic light position for drawing
|
inline |
This function should change the states of the traffic lights if necessary. Should be called after the first greenphase
|
inline |
Gets the length of the green phase.
|
inline |
Gets the length of the red phase.
|
inline |
|
inline |
|
inline |
Gets the length of the yellow phase.
|
inline |
Sets the length for the green Phase.
| greenPhaseLength | the length for the green phase |
|
inline |
Sets the length of the red phase.
| redPhaseLength | the length of the red phase |
|
inline |
| state | the state to set |
|
inline |
| streets_ | the streets_ to set |
|
inline |
Sets the length of the yellow phase.
| yellowPhaseLength | the length of the yellow phase |
1.8.3.1