Package org.opentrafficsim.base.geometry
Class PolygonShape
java.lang.Object
org.opentrafficsim.base.geometry.PolygonShape
Shape defined by a polygon.
Copyright (c) 2024-2024 Delft University of Technology, PO Box 5, 2600 AA, Delft, the Netherlands. All rights reserved.
BSD-style license. See OpenTrafficSim License.
- Author:
- Wouter Schakel
-
Field Summary
Fields inherited from interface org.opentrafficsim.base.geometry.OtsShape
DEFAULT_POLYGON_SEGMENTS, WORLD_MARGIN_LINE -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionReturns the bounds relative to the location.Returns the contour of the object in relative coordinates.toString()Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface org.opentrafficsim.base.geometry.OtsShape
contains, contains, getAbsoluteBounds, getAbsoluteContour, getAbsoluteContour, getDirZ, getLocation, signedDistance, signedDistance
-
Constructor Details
-
PolygonShape
Constructor.- Parameters:
polygon- polygon.
-
-
Method Details
-
getRelativeContour
Description copied from interface:OtsShapeReturns the contour of the object in relative coordinates.- Specified by:
getRelativeContourin interfaceOtsShape- Returns:
- the contour of the object in relative coordinates
-
getRelativeBounds
Description copied from interface:OtsShapeReturns the bounds relative to the location. The default implementation returns the bounds of the contour.- Specified by:
getRelativeBoundsin interfaceLocatable- Specified by:
getRelativeBoundsin interfaceOtsShape- Returns:
- bounds relative to the location.
-
toString
-