- java.lang.Object
-
- org.arakhne.afc.gis.road.path.CrossRoad
-
- All Implemented Interfaces:
Comparable<CrossRoad>
public class CrossRoad extends Object implements Comparable<CrossRoad>
This class describes a cross road or a cul-de-sac in a road path.- Since:
- 14.0
- Version:
- 17.0 2020-01-04 14:41:55
- Author:
- Stéphane GALLAND
- Maven Group Id:
- org.arakhne.afc.gis
- Maven Artifact Id:
- gisroad
-
-
Field Summary
Fields Modifier and Type Field Description RoadConnection
connectionPoint
This is the cross-road point.double
distance
This is the distance along the path to the cross-road.double
distanceFromPreviousCrossRoad
This is the distance along the path to the cross-road from the previous croos road in the path.RoadSegment
enteringSegment
This is the segment that permits to reach the cross-road.int
enteringSegmentIndex
This is the position in the path of the segment that permits to reach the cross-road.RoadSegment
exitingSegment
This is the segment that permits to quit the cross-road.int
exitingSegmentIndex
This is the position in the path of the segment that permits to quit the cross-road.
-
Constructor Summary
Constructors Constructor Description CrossRoad(RoadConnection connectionPoint, RoadSegment enteringSegment, int enteringIndex, RoadSegment exitingSegment, int exitingIndex, double distance, double distancePrev)
Constructor.
-
-
-
Field Detail
-
connectionPoint
public final RoadConnection connectionPoint
This is the cross-road point.
-
distance
public final double distance
This is the distance along the path to the cross-road.
-
distanceFromPreviousCrossRoad
public final double distanceFromPreviousCrossRoad
This is the distance along the path to the cross-road from the previous croos road in the path.
-
enteringSegment
public final RoadSegment enteringSegment
This is the segment that permits to reach the cross-road.
-
exitingSegment
public final RoadSegment exitingSegment
This is the segment that permits to quit the cross-road.
-
enteringSegmentIndex
public final int enteringSegmentIndex
This is the position in the path of the segment that permits to reach the cross-road.
-
exitingSegmentIndex
public final int exitingSegmentIndex
This is the position in the path of the segment that permits to quit the cross-road.
-
-
Constructor Detail
-
CrossRoad
CrossRoad(RoadConnection connectionPoint, RoadSegment enteringSegment, int enteringIndex, RoadSegment exitingSegment, int exitingIndex, double distance, double distancePrev)
Constructor.- Parameters:
connectionPoint
- is the connection of the cross roadenteringSegment
- is the enter segment on the cross roadenteringIndex
- is the position of the entering segment in the path.exitingSegment
- is the exit segment from the cross roadexitingIndex
- is the position of the exiting segment in the path.distance
- is the distance to the cross road.distancePrev
- is the distance to the cross road from the previous one.
-
-
Method Detail
-
compareTo
@Pure public int compareTo(CrossRoad other)
- Specified by:
compareTo
in interfaceComparable<CrossRoad>
-
-