public class RoadBasedIntersection extends Object implements Intersection
| Modifier and Type | Field and Description |
|---|---|
static double |
EXPANSION_DISTANCE
The distance outside of the strict intersection that the
IntersectionManager will control, in meters.
|
| Constructor and Description |
|---|
RoadBasedIntersection(List<Road> roads)
Basic class constructor.
|
| Modifier and Type | Method and Description |
|---|---|
Constants.TurnDirection |
calcTurnDirection(Lane currentLane,
Lane departureLane)
Get the turn direction of the vehicle at the next intersection.
|
Area |
getArea()
Get the Area controlled by this intersection manager.
|
Area |
getAreaPlus()
Get the area slightly larger than the area controlled
by this intersection manager.
|
Rectangle2D |
getBoundingBox()
Get the minimal rectangular region that encloses the intersection.
|
Point2D |
getCentroid()
Get the centroid of the intersection manager.
|
List<Path2D> |
getEdges()
Get the list of edges.
|
double |
getEntryHeading(Lane l)
Get the heading at which the given lane enters the intersection.
|
List<Lane> |
getEntryLanes()
Get the Lanes that enter the space governed by this intersection manager.
|
WayPoint |
getEntryPoint(Lane l)
Get the Point at which the given Lane enters the intersection.
|
List<Road> |
getEntryRoads()
Get the Roads that enter the space governed by this intersection manager.
|
double |
getExitHeading(Lane l)
Get the heading at which the given Lane exits the intersection.
|
List<Lane> |
getExitLanes()
Get the Lanes that exit the space governed by this intersection manager.
|
WayPoint |
getExitPoint(Lane l)
Get the Point at which the given Lane exits the intersection.
|
List<Road> |
getExitRoads()
Get the Roads that exit the space governed by this intersection manager.
|
List<Lane> |
getLanes()
Get the Lanes incident to the space governed by this intersection.
|
List<Road> |
getRoads()
Get the Roads incident to the space governed by this intersection.
|
boolean |
isEnteredBy(Lane l)
Whether the given Lane enters this intersection.
|
boolean |
isExitedBy(Lane l)
Whether the given Lane leaves this intersection.
|
public static final double EXPANSION_DISTANCE
public List<Road> getRoads()
getRoads in interface Intersectionpublic List<Lane> getLanes()
getLanes in interface Intersectionpublic Area getArea()
getArea in interface Intersectionpublic Area getAreaPlus()
getAreaPlus in interface Intersectionpublic Point2D getCentroid()
getCentroid in interface Intersectionpublic Rectangle2D getBoundingBox()
getBoundingBox in interface Intersectionpublic List<Road> getEntryRoads()
getEntryRoads in interface Intersectionpublic List<Lane> getEntryLanes()
getEntryLanes in interface Intersectionpublic boolean isEnteredBy(Lane l)
isEnteredBy in interface Intersectionl - the Lane to considerpublic WayPoint getEntryPoint(Lane l)
getEntryPoint in interface Intersectionl - the Lanenull if it does notpublic double getEntryHeading(Lane l)
getEntryHeading in interface Intersectionl - the Lanepublic List<Road> getExitRoads()
getExitRoads in interface Intersectionpublic List<Lane> getExitLanes()
getExitLanes in interface Intersectionpublic boolean isExitedBy(Lane l)
isExitedBy in interface Intersectionl - the Lane to considerpublic WayPoint getExitPoint(Lane l)
getExitPoint in interface Intersectionl - the Lanenull if it does notpublic double getExitHeading(Lane l)
getExitHeading in interface Intersectionl - the Lanepublic Constants.TurnDirection calcTurnDirection(Lane currentLane, Lane departureLane)
calcTurnDirection in interface IntersectioncurrentLane - the current lane.departureLane - the departure lane.Copyright © 2013. All rights reserved.