public class OTSShape extends OTSLine3D
 Copyright (c) 2013-2019 Delft University of Technology, PO Box 5, 2600 AA, Delft, the Netherlands. All rights reserved. 
 BSD-style license. See OpenTrafficSim License.
 
OTSLine3D.FractionalFallback, OTSLine3D.OffsetMethodOFFSETMETHOD| Constructor and Description | 
|---|
| OTSShape(com.vividsolutions.jts.geom.Coordinate[] coordinates)Construct a new OTSShape (closed shape) from an array of Coordinate. | 
| OTSShape(com.vividsolutions.jts.geom.Geometry geometry)Construct a new OTSShape (closed shape) from a Geometry. | 
| OTSShape(com.vividsolutions.jts.geom.LineString lineString)Construct a new OTSShape (closed shape) from a LineString. | 
| OTSShape(List<OTSPoint3D> pointList)Construct a new OTSShape (closed shape) from a List<OTSPoint3D>. | 
| OTSShape(OTSPoint3D... points)Construct a new OTSShape (closed shape). | 
| OTSShape(Path2D path)Construct a new OTSShape (closed shape) from a Path2D. | 
| Modifier and Type | Method and Description | 
|---|---|
| boolean | contains(OTSPoint3D point) | 
| boolean | contains(Rectangle2D rectangle)Check if this OTSShape completely covers a rectangular region. | 
| static OTSShape | createAndCleanOTSShape(List<OTSPoint3D> pointList)Create an OTSLine3D, while cleaning repeating successive points. | 
| static OTSShape | createAndCleanOTSShape(OTSPoint3D[] points)Create an OTSLine3D, while cleaning repeating successive points. | 
| Path2D | getShape() | 
| boolean | intersects(OTSShape otsShape) | 
| static void | main(String[] args)Small test. | 
| String | toString() | 
concatenate, concatenate, concatenate, createAndCleanOTSLine3D, createAndCleanOTSLine3D, equals, extract, extract, extractFractional, get, getBounds, getCentroid, getCoordinates, getEnvelope, getFirst, getLast, getLength, getLengthSI, getLineString, getLocation, getLocation, getLocationExtended, getLocationExtendedSI, getLocationFraction, getLocationFraction, getLocationFractionExtended, getLocationSI, getPoints, hashCode, noiseFilteredLine, noiseFilterRamerDouglasPeuker, offsetLine, offsetLine, offsetLine, projectFractional, projectOrthogonal, reverse, size, toExcel, toPlot, truncatepublic OTSShape(OTSPoint3D... points) throws OTSGeometryException
points - OTSPoint3D...; the array of points to construct this OTSLine3D from.OTSGeometryException - when the provided points do not constitute a valid line (too few points or identical
             adjacent points)public OTSShape(com.vividsolutions.jts.geom.Coordinate[] coordinates)
         throws OTSGeometryException
coordinates - Coordinate[]; the array of coordinates to construct this OTSLine3D fromOTSGeometryException - when the provided points do not constitute a valid line (too few points or identical
             adjacent points)public OTSShape(com.vividsolutions.jts.geom.LineString lineString)
         throws OTSGeometryException
lineString - LineString; the lineString to construct this OTSLine3D from.OTSGeometryException - when the provided LineString does not constitute a valid line (too few points or identical
             adjacent points)public OTSShape(com.vividsolutions.jts.geom.Geometry geometry)
         throws OTSGeometryException
geometry - Geometry; the geometry to construct this OTSLine3D fromOTSGeometryException - when the provided Geometry do not constitute a valid line (too few points or identical
             adjacent points)public OTSShape(List<OTSPoint3D> pointList) throws OTSGeometryException
pointList - List<OTSPoint3D>; the list of points to construct this OTSLine3D from.OTSGeometryException - when the provided points do not constitute a valid line (too few points or identical
             adjacent points)public OTSShape(Path2D path) throws OTSGeometryException
path - Path2D; the Path2D to construct this OTSLine3D from.OTSGeometryException - when the provided points do not constitute a valid line (too few points or identical
             adjacent points)public final Path2D getShape()
public final boolean contains(OTSPoint3D point)
point - OTSPoint3D; the point to check if it is inside the shapepublic final boolean contains(Rectangle2D rectangle)
rectangle - Rectangle2D; the rectangular regionpublic final boolean intersects(OTSShape otsShape)
otsShape - OTSShape; the shape to test the intersection withpublic static OTSShape createAndCleanOTSShape(OTSPoint3D[] points) throws OTSGeometryException
points - OTSPoint3D[]; the coordinates of the line as OTSPoint3DOTSGeometryException - when number of points < 2public static OTSShape createAndCleanOTSShape(List<OTSPoint3D> pointList) throws OTSGeometryException
pointList - List<OTSPoint3D>; list of the coordinates of the line as OTSPoint3D; any duplicate points in this
            list are removed (this method may modify the provided list)OTSGeometryException - when number of non-equal points < 2public static void main(String[] args) throws OTSGeometryException
args - String[]; emptyOTSGeometryException - when construction failsCopyright © 2014–2019 Delft University of Technology. All rights reserved.