|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectaim4.im.RoadBasedIntersection
public class RoadBasedIntersection
An intersection that is defined by the intersection of a set of roads.
| Field Summary | |
|---|---|
static double |
EXPANSION_DISTANCE
The distance outside of the strict intersection that the IntersectionManager will control, in meters. |
| Constructor Summary | |
|---|---|
RoadBasedIntersection(List<Road> roads)
Basic class constructor. |
|
| Method Summary | |
|---|---|
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. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final double EXPANSION_DISTANCE
| Constructor Detail |
|---|
public RoadBasedIntersection(List<Road> roads)
roads - a list of Roads whose intersection this IntersectionManager
will manage| Method Detail |
|---|
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<Path2D> getEdges()
public 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 consider
public WayPoint getEntryPoint(Lane l)
getEntryPoint in interface Intersectionl - the Lane
null if it does notpublic double getEntryHeading(Lane l)
getEntryHeading in interface Intersectionl - the Lane
public 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 consider
public WayPoint getExitPoint(Lane l)
getExitPoint in interface Intersectionl - the Lane
null if it does notpublic double getExitHeading(Lane l)
getExitHeading in interface Intersectionl - the Lane
public Constants.TurnDirection calcTurnDirection(Lane currentLane,
Lane departureLane)
calcTurnDirection in interface IntersectioncurrentLane - the current lane.departureLane - the departure lane.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||