|
| Street (String name, Node startNode, Node endNode, String streetType, int oneway, int lanes, Color displayColor, Region mainRegion, int maxSpeed) |
|
double | getLength () |
|
double | getXFactor () |
|
double | getYFactor () |
|
int | getSpeed () |
|
void | setSpeed (int maxSpeed) |
|
void | changeOneWay (int oneway) |
|
int | getLanesCount () |
|
void | setLanesCount (int laneCount) |
|
LaneObject | getFirstLaneObject (boolean direction) |
|
LaneObject | getLastLaneObject (boolean direction) |
|
void | addLaneObject (LaneObject object, boolean direction) |
|
void | delLaneObject (LaneObject object, boolean direction) |
|
void | updateLaneObject (LaneObject object, boolean direction, double newPosition) |
|
void | clearLanes () |
|
void | addBridgePaintLine (double x1, double y1, double x2, double y2) |
|
void | addBridgePaintPolygon (double x1, double y1, double x2, double y2, double x3, double y3, double x4, double y4) |
|
ArrayList< Point2D.Double > | getBridgePaintLines () |
|
ArrayList< Point2D.Double > | getBridgePaintPolygons () |
|
Node | getStartNode () |
|
void | setStartNode (Node startNode) |
|
Node | getEndNode () |
|
void | setEndNode (Node endNode) |
|
Color | getDisplayColor () |
|
void | setDisplayColor (Color displayColor) |
|
Region | getMainRegion () |
|
void | setName (String name) |
|
String | getName () |
|
boolean | isOneway () |
|
boolean | equals (Object other) |
|
int | hashCode () |
|
String | getStreetType_ () |
|
void | setStreetType_ (String streetType_) |
|
int | getStartNodeTrafficLightState () |
|
void | setStartNodeTrafficLightState (int startNodeTrafficLightState_) |
|
int | getEndNodeTrafficLightState () |
|
void | setEndNodeTrafficLightState (int endNodeTrafficLightState_) |
|
void | updateStartNodeTrafficLightState () |
|
void | updateEndNodeTrafficLightState () |
|
void | setTrafficLightEndX_ (int trafficLightEndX_) |
|
int | getTrafficLightEndX_ () |
|
void | setTrafficLightStartX_ (int trafficLightStartX_) |
|
int | getTrafficLightStartX_ () |
|
void | setTrafficLightStartY_ (int trafficLightStartY_) |
|
int | getTrafficLightStartY_ () |
|
void | setTrafficLightEndY_ (int trafficLightEndY_) |
|
int | getTrafficLightEndY_ () |
|
void | setPriorityOnEndNode (boolean priorityOnEndNode) |
|
boolean | isPriorityOnEndNode () |
|
void | setPriorityOnStartNode (boolean priorityOnStartNode) |
|
boolean | isPriorityOnStartNode () |
|
vanetsim.map.Street.Street |
( |
String |
name, |
|
|
Node |
startNode, |
|
|
Node |
endNode, |
|
|
String |
streetType, |
|
|
int |
oneway, |
|
|
int |
lanes, |
|
|
Color |
displayColor, |
|
|
Region |
mainRegion, |
|
|
int |
maxSpeed |
|
) |
| |
|
inline |
Instantiates a new street.
- Parameters
-
name | the name of this street |
startNode | the start node |
endNode | the end node |
streetType | type of the street |
oneway | 0 =twoway-street, 1 =oneway from startNode to endNode, else: oneway from endNode to startNode |
lanes | the number of lanes on this street in one direction (!). Normal streets should have 1 here, motorways 2 or more! |
displayColor | the color in which to paint this street |
mainRegion | the main region |
maxSpeed | the maximum speed allowed on this street |
void vanetsim.map.Street.addBridgePaintLine |
( |
double |
x1, |
|
|
double |
y1, |
|
|
double |
x2, |
|
|
double |
y2 |
|
) |
| |
|
inline |
Adds a line for painting a bridge.
- Parameters
-
x1 | the x coordinate of the start point |
y1 | the y coordinate of the start point |
x2 | the x coordinate of the end point |
y2 | the y coordinate of the end point |
void vanetsim.map.Street.addBridgePaintPolygon |
( |
double |
x1, |
|
|
double |
y1, |
|
|
double |
x2, |
|
|
double |
y2, |
|
|
double |
x3, |
|
|
double |
y3, |
|
|
double |
x4, |
|
|
double |
y4 |
|
) |
| |
|
inline |
Adds a polygon for painting a bridge.
- Parameters
-
x1 | the x coordinate of the first point |
y1 | the y coordinate of the first point |
x2 | the x coordinate of the second point |
y2 | the y coordinate of the second point |
x3 | the x coordinate of the third point |
y3 | the y coordinate of the third point |
x4 | the x coordinate of the fourth point |
y4 | the y coordinate of the fourth point |
void vanetsim.map.Street.addLaneObject |
( |
LaneObject |
object, |
|
|
boolean |
direction |
|
) |
| |
|
inline |
Adds a lane object. The underlying lane container is synchronized during this operation.
- Parameters
-
object | the object to add |
direction | true in the direction from startNode to endNode, false seen from endNode to startNode |
void vanetsim.map.Street.changeOneWay |
( |
int |
oneway | ) |
|
|
inline |
Changes if this street is a oneway street or not.
- Parameters
-
oneway | 0 =twoway-street, 1 =oneway from startNode to endNode, else: oneway from endNode to startNode |
void vanetsim.map.Street.clearLanes |
( |
| ) |
|
|
inline |
Clears all objects from the lanes container.
void vanetsim.map.Street.delLaneObject |
( |
LaneObject |
object, |
|
|
boolean |
direction |
|
) |
| |
|
inline |
Removes a lane object. The underlying lane container is synchronized during this operation.
- Parameters
-
object | the object to remove |
direction | true in the direction from startNode to endNode, false seen from endNode to startNode |
boolean vanetsim.map.Street.equals |
( |
Object |
other | ) |
|
|
inline |
Checks if this object is equal to another.
- Parameters
-
other | the object to compare to |
- Returns
true
, if equals
- See Also
- java.lang.Object::equals(java.lang.Object)
ArrayList<Point2D.Double> vanetsim.map.Street.getBridgePaintLines |
( |
| ) |
|
|
inline |
Gets the lines to paint a bridge.
- Returns
- the
ArrayList
with all lines to paint (two successive points are a line)
ArrayList<Point2D.Double> vanetsim.map.Street.getBridgePaintPolygons |
( |
| ) |
|
|
inline |
Gets the polygons to paint a bridge.
- Returns
- the
ArrayList
with all lines to paint (two successive points are a line)
Color vanetsim.map.Street.getDisplayColor |
( |
| ) |
|
|
inline |
Gets the display color of this street.
- Returns
- the display color
Node vanetsim.map.Street.getEndNode |
( |
| ) |
|
|
inline |
Gets the end node of this street.
- Returns
- the end node
int vanetsim.map.Street.getEndNodeTrafficLightState |
( |
| ) |
|
|
inline |
Gets the state of the traffic light.
- Returns
- the state of the traffic light
LaneObject vanetsim.map.Street.getFirstLaneObject |
( |
boolean |
direction | ) |
|
|
inline |
Gets the first lane object. You may iterate through the objects using getNext()
and getPrevious()
. Note that the lane might change while you're iterating as it's not synchronized!
- Parameters
-
direction | true in the direction from startNode to endNode, false seen from endNode to startNode |
- Returns
- the first lane object
int vanetsim.map.Street.getLanesCount |
( |
| ) |
|
|
inline |
Gets the amount of lanes in one direction. If this is a twoway street, you need to multiply by 2 to get the total amount of lanes.
- Returns
- the number of lanes per direction
LaneObject vanetsim.map.Street.getLastLaneObject |
( |
boolean |
direction | ) |
|
|
inline |
Gets the last lane object. You may iterate through the objects using getNext()
and getPrevious()
. Note that the lane might change while you're iterating as it's not synchronized!
- Parameters
-
direction | true in the direction from startNode to endNode, false seen from endNode to startNode |
- Returns
- the last lane object
double vanetsim.map.Street.getLength |
( |
| ) |
|
|
inline |
Gets the length of the street.
- Returns
- the length of the street
Region vanetsim.map.Street.getMainRegion |
( |
| ) |
|
|
inline |
Gets the region to which this street is primarily assigned to.
- Returns
- the region
String vanetsim.map.Street.getName |
( |
| ) |
|
|
inline |
Gets the name of this street.
- Returns
- the name
int vanetsim.map.Street.getSpeed |
( |
| ) |
|
|
inline |
Gets the speed.
- Returns
- the speed
Node vanetsim.map.Street.getStartNode |
( |
| ) |
|
|
inline |
Gets the start node of this street.
- Returns
- the start node
int vanetsim.map.Street.getStartNodeTrafficLightState |
( |
| ) |
|
|
inline |
Gets the state of the traffic light.
- Returns
- the state of the traffic light
String vanetsim.map.Street.getStreetType_ |
( |
| ) |
|
|
inline |
Gets the type of this street.
- Returns
- the street-type
int vanetsim.map.Street.getTrafficLightEndX_ |
( |
| ) |
|
|
inline |
- Returns
- the trafficLightEndX_
int vanetsim.map.Street.getTrafficLightEndY_ |
( |
| ) |
|
|
inline |
- Returns
- the trafficLightEndY_
int vanetsim.map.Street.getTrafficLightStartX_ |
( |
| ) |
|
|
inline |
- Returns
- the trafficLightStartX_
int vanetsim.map.Street.getTrafficLightStartY_ |
( |
| ) |
|
|
inline |
- Returns
- the trafficLightStartY_
double vanetsim.map.Street.getXFactor |
( |
| ) |
|
|
inline |
Gets the x correction factor of one lane for position calculation (in cm). Only valid if going from startNode to endNode (else you need to take the negative).
- Returns
- the x correction factor
double vanetsim.map.Street.getYFactor |
( |
| ) |
|
|
inline |
Gets the x correction factor of one lane for position calculation (in cm). Only valid if going from startNode to endNode (else you need to take the negative).
- Returns
- the y correction factor
int vanetsim.map.Street.hashCode |
( |
| ) |
|
|
inline |
Creates a hash code (needed for HashMaps or similar structures).
- Returns
- an Integer
- See Also
- java.lang.Object::hashCode()
boolean vanetsim.map.Street.isOneway |
( |
| ) |
|
|
inline |
Indicates if this is a oneway-street or not. Oneway-streets always go from the StartNode to the EndNode!
- Returns
true
if it's oneway, else false
boolean vanetsim.map.Street.isPriorityOnEndNode |
( |
| ) |
|
|
inline |
- Returns
- the priorityOnEndNode
boolean vanetsim.map.Street.isPriorityOnStartNode |
( |
| ) |
|
|
inline |
- Returns
- the priorityOnStartNode
void vanetsim.map.Street.setDisplayColor |
( |
Color |
displayColor | ) |
|
|
inline |
Sets the display color of this street.
- Parameters
-
displayColor | the new display color |
void vanetsim.map.Street.setEndNodeTrafficLightState |
( |
int |
endNodeTrafficLightState_ | ) |
|
|
inline |
Sets the status of the traffic light
- Parameters
-
endNodeTrafficLightState_ | the status of the traffic light |
void vanetsim.map.Street.setLanesCount |
( |
int |
laneCount | ) |
|
|
inline |
Sets the amount of lanes.
- Parameters
-
laneCount | the number of lanes per direction |
void vanetsim.map.Street.setName |
( |
String |
name | ) |
|
|
inline |
Sets the name of this street.
- Parameters
-
void vanetsim.map.Street.setPriorityOnEndNode |
( |
boolean |
priorityOnEndNode | ) |
|
|
inline |
- Parameters
-
priorityOnEndNode | the priorityOnEndNode to set |
void vanetsim.map.Street.setPriorityOnStartNode |
( |
boolean |
priorityOnStartNode | ) |
|
|
inline |
- Parameters
-
priorityOnStartNode | the priorityOnStartNode to set |
void vanetsim.map.Street.setSpeed |
( |
int |
maxSpeed | ) |
|
|
inline |
Sets the maximum speed.
- Parameters
-
void vanetsim.map.Street.setStartNodeTrafficLightState |
( |
int |
startNodeTrafficLightState_ | ) |
|
|
inline |
Sets the status of the traffic light
- Parameters
-
startNodeTrafficLightState_ | the status of the traffic light |
void vanetsim.map.Street.setStreetType_ |
( |
String |
streetType_ | ) |
|
|
inline |
Sets the type of this street.
- Parameters
-
streetType_ | the type of the street |
void vanetsim.map.Street.setTrafficLightEndX_ |
( |
int |
trafficLightEndX_ | ) |
|
|
inline |
- Parameters
-
trafficLightEndX_ | the trafficLightEndX_ to set |
void vanetsim.map.Street.setTrafficLightEndY_ |
( |
int |
trafficLightEndY_ | ) |
|
|
inline |
- Parameters
-
trafficLightEndY_ | the trafficLightEndY_ to set |
void vanetsim.map.Street.setTrafficLightStartX_ |
( |
int |
trafficLightStartX_ | ) |
|
|
inline |
- Parameters
-
trafficLightStartX_ | the trafficLightStartX_ to set |
void vanetsim.map.Street.setTrafficLightStartY_ |
( |
int |
trafficLightStartY_ | ) |
|
|
inline |
- Parameters
-
trafficLightStartY_ | the trafficLightStartY_ to set |
void vanetsim.map.Street.updateEndNodeTrafficLightState |
( |
| ) |
|
|
inline |
Updates the state of the traffic light.
void vanetsim.map.Street.updateLaneObject |
( |
LaneObject |
object, |
|
|
boolean |
direction, |
|
|
double |
newPosition |
|
) |
| |
|
inline |
Updates a lane object. The underlying lane container is synchronized during this operation.
- Parameters
-
object | the object to check for updates |
direction | true in the direction from startNode to endNode, false seen from endNode to startNode |
newPosition | the new position of the object |
void vanetsim.map.Street.updateStartNodeTrafficLightState |
( |
| ) |
|
|
inline |
Updates the state of the traffic light.
The documentation for this class was generated from the following file:
- /Users/andreastomandl/Desktop/Vanet-Sim/Simulator/src/vanetsim/map/Street.java