Package org.opentrafficsim.base.geometry
Interface DynamicSpatialObject
- All Superinterfaces:
SpatialObject
DynamicSpatialObject has two shapes: the shape that is registered in the Map is the shape that indicates where the object
can be present for the time frame for which intersections can be calculated. This is, for instance, a contour that
indicates the Minkowski sum of the locations of a GTU for the next time step. This contour IS registered in the spatial tree.
The getShape(time), however, provides the exact shape of the GTU at a fixed time instant. This contour is NOT registered in
the spatial tree.
Copyright (c) 2022-2024 Delft University of Technology, PO Box 5, 2600 AA, Delft, the Netherlands. All rights reserved.
BSD-style license. See OpenTrafficSim License.
- Author:
- Alexander Verbraeck, Peter Knoppers, Wouter Schakel
-
Method Summary
Modifier and TypeMethodDescriptionorg.djutils.draw.line.Polygon2d
getContour
(org.djunits.value.vdouble.scalar.Time time) Return the contour of a dynamic object at time 'time' in world coordinates.Methods inherited from interface org.opentrafficsim.base.geometry.SpatialObject
getContour
-
Method Details
-
getContour
org.djutils.draw.line.Polygon2d getContour(org.djunits.value.vdouble.scalar.Time time) Return the contour of a dynamic object at time 'time' in world coordinates. Note that the getContour() method without a time returns the Minkowski sum of all shapes of the spatial object for a validity time window, e.g., a contour that describes all locations of a GTU for the next time step, i.e., the contour of the GTU belonging to the next operational plan.- Parameters:
time
- the time for which we want the shape- Returns:
- the shape of the object at time 'time'
-