aim4.im
Interface Intersection

All Known Implementing Classes:
RoadBasedIntersection

public interface Intersection

The interface of an intersection


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 IntersectionManager.
 Area getAreaPlus()
          Get the area slightly larger than the area controlled by this IntersectionManager.
 Rectangle2D getBoundingBox()
          Get the minimal rectangular region that encloses the intersection.
 Point2D getCentroid()
          Get the centroid of the IntersectionManager.
 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 IntersectionManager.
 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 IntersectionManager.
 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 IntersectionManager.
 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 IntersectionManager.
 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.
 

Method Detail

getArea

Area getArea()
Get the Area controlled by this IntersectionManager.

Returns:
the Area controlled by this IntersectionManager

getAreaPlus

Area getAreaPlus()
Get the area slightly larger than the area controlled by this IntersectionManager.

Returns:
the Area controlled by this IntersectionManager

getCentroid

Point2D getCentroid()
Get the centroid of the IntersectionManager.

Returns:
the centroid of the IntersectionManager

getBoundingBox

Rectangle2D getBoundingBox()
Get the minimal rectangular region that encloses the intersection.

Returns:
the minimal rectangular region that encloses the intersection

getRoads

List<Road> getRoads()
Get the Roads incident to the space governed by this intersection.

Returns:
the roads managed by this intersection.

getLanes

List<Lane> getLanes()
Get the Lanes incident to the space governed by this intersection.

Returns:
the lanes managed by this intersection.

getEntryRoads

List<Road> getEntryRoads()
Get the Roads that enter the space governed by this IntersectionManager.

Returns:
the Roads that enter the space governed by this IntersectionManager

getEntryLanes

List<Lane> getEntryLanes()
Get the Lanes that enter the space governed by this IntersectionManager.

Returns:
the Lanes that enter the space governed by this IntersectionManager

isEnteredBy

boolean isEnteredBy(Lane l)
Whether the given Lane enters this intersection.

Parameters:
l - the Lane to consider
Returns:
whether the Lane enters this intersection

getEntryPoint

WayPoint getEntryPoint(Lane l)
Get the Point at which the given Lane enters the intersection.

Parameters:
l - the Lane
Returns:
the Point at which the given Lane enters the intersection, or null if it does not

getEntryHeading

double getEntryHeading(Lane l)
Get the heading at which the given Lane enters the intersection.

Parameters:
l - the Lane
Returns:
the heading at which the Lane enters the intersection

getExitRoads

List<Road> getExitRoads()
Get the Roads that exit the space governed by this IntersectionManager.

Returns:
the Roads that exit the space governed by this IntersectionManager

getExitLanes

List<Lane> getExitLanes()
Get the Lanes that exit the space governed by this IntersectionManager.

Returns:
the Lanes that exit the space governed by this IntersectionManager

isExitedBy

boolean isExitedBy(Lane l)
Whether the given Lane leaves this intersection.

Parameters:
l - the Lane to consider
Returns:
whether the Lane exits this intersection

getExitPoint

WayPoint getExitPoint(Lane l)
Get the Point at which the given Lane exits the intersection.

Parameters:
l - the Lane
Returns:
the Point at which the given Lane exits the intersection, or null if it does not

getExitHeading

double getExitHeading(Lane l)
Get the heading at which the given Lane exits the intersection.

Parameters:
l - the Lane
Returns:
the heading at which the Lane exits the intersection

calcTurnDirection

Constants.TurnDirection calcTurnDirection(Lane currentLane,
                                          Lane departureLane)
Get the turn direction of the vehicle at the next intersection.

Parameters:
currentLane - the current lane.
departureLane - the departure lane.
Returns:
the turn direction of the vehicle at the next intersection


Copyright © 2011. All Rights Reserved.