-
Notifications
You must be signed in to change notification settings - Fork 0
Network.java
Raphael Lutz edited this page Jul 12, 2018
·
7 revisions
Represents the road network. Builds the network, roads, round-abouts and crossroads.
-
Simulation sim
: contains a link to the Simulation instance (managing the simulation itself) -
ArrayList<Road> roads = new ArrayList<Road>()
: contains all Roads of the network. -
ArrayList<RoundAbout> roundAbouts = new ArrayList<RoundAbout>()
: contains all RoundAbouts of the network. -
ArrayList<CrossRoad> crossRoads = new ArrayList<CrossRoad>()
: contains all CrossRoads of the network. -
int cellWidth=10, cellHeight=cellWidth
: dimensions of a Cell in the simulation. -
boolean drawWire = true
: tells if cells borders are rendered -
boolean drawColors = true
: tells if color codes are rendered -
boolean drawRoadID = false
: tells if roads IDs are rendered
-
Network(Simulation sim)
: constructor of the Network, create the whole network -
void switchDrawWire()
: switch the value ofdrawWire
-
void switchDrawColors()
: switch the value ofdrawColors
-
void switchDrawRoadID()
: switch the value ofdrawRoadID
-
Simulation getSimulation()
: getter forsim
-
ArrayList<CrossRoad> getCrossRoads()
: getter forcrossRoads
-
ArrayList<Road> getRoads()
: getter forroads
-
ArrayList<RoundAbout> getRoundAbouts()
: getter forroundAbouts
-
boolean getDrawWire()
: getter fordrawWire
-
boolean getDrawColors()
: getter fordrawColors
-
boolean getDrawRoadID()
: getter fordrawRoadID
-
void addRoadtoRoads(Road r)
: add the roadr
to the array listroads
-
int getCellWidth()
: getter forcellWidth
-
void setCellWidth(int cellWidth)
: setter forcellWidth
-
int getCellHeight()
: getter forcellHeight
-
void setCellHeight(int cellHeight)
: setter forcellHeight
- data/
- DataManager.java (TODO)
- ExpVarCalculator.java (TODO)
- VehicleCounter.java (TODO)
- elements/
- Cell.java (TODO)
- Connection.java (TODO)
- CrossRoad.java (empty) (TODO)
- Direction.java (TODO)
- MaxVehicleOutflow.java (TODO)
- MultiLaneRoundAbout.java (TODO)
- Phase.java (TODO)
- Ride.java (TODO)
- Road.java (empty) (TODO)
- RoundAbout.java (empty) (TODO)
- TrafficLightsSystem.java (TODO)
- Vehicle.java (TODO)
- graphics/
- Assets.java (TODO)
- Display.java (TODO)
- ImageLoader.java (TODO)
- SpriteSheet.java (TODO)
- Text.java (TODO)
- input/
- KeyManager.java (TODO)
- MouseManager.java (TODO)
- main/
- Main.java (TODO)
- Simulation.java (TODO)
- network/
- AllNetworkRides.java (empty) (TODO)
- Network.java (TODO)
- NetworkComputing.java (TODO)
- NetworkRendering.java (TODO)
- states/
- MenuState.java (TODO)
- SimSettingsState.java (TODO)
- SimState.java (TODO)
- State.java (TODO)
- ui/
- ClickListener.java (TODO)
- UIImageButton.java (TODO)
- UIManager.java (TODO)
- UIObject.java (TODO)
- UISlider.java (TODO)
- UISliderDouble.java (TODO)
- UISliderTriple.java (TODO)
- UITextButton.java (TODO)
- UITextSwitch.java (TODO)
- utils/
- Defaults.java (TODO)
- OriginDestinationCalculator.java (TODO)
- SortByPos.java (TODO)
- Utils.java (TODO)