@@ -72,7 +117,46 @@ public class RealWorldMovementPoints {
publicPositionVectorgetDestination(){
returndestination;
}
@Override
publicLocationgetTargetLocation(){
returndestination;
}
@Override
publicbooleanhasSegmentInformation(){
returnrouteSegmentsLength!=0;
}
@Override
publicRouteSegmentgetCurrentSegment(){
if(!hasSegmentInformation()){
thrownewUnsupportedOperationException(
"To access segments within a Route, you need to enable the respective functionality in the local movement strategy (usually: calculateRouteSegments=true)");
}
returnrouteSegments.get(currentSegmentIndex);
}
@Override
publicList<RouteSegment>getSegmentsAhead(){
if(!hasSegmentInformation()){
thrownewUnsupportedOperationException(
"To access segments within a Route, you need to enable the respective functionality in the local movement strategy (usually: calculateRouteSegments=true)");
"To access segments within a Route, you need to enable the respective functionality in the local movement strategy (usually: calculateRouteSegments=true)");
}
returnCollections.unmodifiableList(routeSegments
.subList(0,currentSegmentIndex));
}
/**
* Update the internal location with the given movement speed
*
...
...
@@ -80,24 +164,31 @@ public class RealWorldMovementPoints {