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 Intersection
public List<Lane> getLanes()
getLanes
in interface Intersection
public Area getArea()
getArea
in interface Intersection
public Area getAreaPlus()
getAreaPlus
in interface Intersection
public Point2D getCentroid()
getCentroid
in interface Intersection
public Rectangle2D getBoundingBox()
getBoundingBox
in interface Intersection
public List<Road> getEntryRoads()
getEntryRoads
in interface Intersection
public List<Lane> getEntryLanes()
getEntryLanes
in interface Intersection
public boolean isEnteredBy(Lane l)
isEnteredBy
in interface Intersection
l
- the Lane to considerpublic WayPoint getEntryPoint(Lane l)
getEntryPoint
in interface Intersection
l
- the Lanenull
if it does notpublic double getEntryHeading(Lane l)
getEntryHeading
in interface Intersection
l
- the Lanepublic List<Road> getExitRoads()
getExitRoads
in interface Intersection
public List<Lane> getExitLanes()
getExitLanes
in interface Intersection
public boolean isExitedBy(Lane l)
isExitedBy
in interface Intersection
l
- the Lane to considerpublic WayPoint getExitPoint(Lane l)
getExitPoint
in interface Intersection
l
- the Lanenull
if it does notpublic double getExitHeading(Lane l)
getExitHeading
in interface Intersection
l
- the Lanepublic Constants.TurnDirection calcTurnDirection(Lane currentLane, Lane departureLane)
calcTurnDirection
in interface Intersection
currentLane
- the current lane.departureLane
- the departure lane.Copyright © 2013. All rights reserved.