public class OTSLine3D extends Object implements nl.tudelft.simulation.dsol.animation.LocatableInterface, Serializable
Copyright (c) 2013-2015 Delft University of Technology, PO Box 5, 2600 AA, Delft, the Netherlands. All rights reserved.
BSD-style license. See OpenTrafficSim License.
$LastChangedDate: 2015-07-16 10:20:53 +0200 (Thu, 16 Jul 2015) $, @version $Revision: 1124 $, by $Author: pknoppers $,
initial version Jul 22, 2015
Constructor and Description |
---|
OTSLine3D(com.vividsolutions.jts.geom.Coordinate[] coordinates) |
OTSLine3D(com.vividsolutions.jts.geom.Geometry geometry) |
OTSLine3D(com.vividsolutions.jts.geom.LineString lineString) |
OTSLine3D(List<OTSPoint3D> pointList) |
OTSLine3D(OTSPoint3D[] points) |
Modifier and Type | Method and Description |
---|---|
boolean |
equals(Object obj) |
OTSPoint3D |
get(int i) |
javax.media.j3d.Bounds |
getBounds() |
com.vividsolutions.jts.geom.Coordinate[] |
getCoordinates() |
org.djunits.value.vdouble.scalar.DoubleScalar.Rel<org.djunits.unit.LengthUnit> |
getLength() |
double |
getLengthSI() |
com.vividsolutions.jts.geom.LineString |
getLineString() |
nl.tudelft.simulation.language.d3.DirectedPoint |
getLocation() |
nl.tudelft.simulation.language.d3.DirectedPoint |
getLocation(org.djunits.value.vdouble.scalar.DoubleScalar.Rel<org.djunits.unit.LengthUnit> position)
Get the location at a position on the line, with its direction.
|
nl.tudelft.simulation.language.d3.DirectedPoint |
getLocationExtended(org.djunits.value.vdouble.scalar.DoubleScalar.Rel<org.djunits.unit.LengthUnit> position)
Get the location at a position on the line, with its direction.
|
nl.tudelft.simulation.language.d3.DirectedPoint |
getLocationExtendedSI(double positionSI)
Get the location at a position on the line, with its direction.
|
nl.tudelft.simulation.language.d3.DirectedPoint |
getLocationFraction(double fraction)
Get the location at a fraction of the line, with its direction.
|
nl.tudelft.simulation.language.d3.DirectedPoint |
getLocationSI(double positionSI)
Get the location at a position on the line, with its direction.
|
OTSPoint3D[] |
getPoints() |
int |
hashCode() |
int |
size() |
String |
toString() |
public OTSLine3D(OTSPoint3D[] points)
points
- the array of points to construct this OTSLine3D from.public OTSLine3D(com.vividsolutions.jts.geom.Coordinate[] coordinates)
coordinates
- the array of coordinates to construct this OTSLine3D from.public OTSLine3D(com.vividsolutions.jts.geom.LineString lineString)
lineString
- the lineString to construct this OTSLine3D from.public OTSLine3D(com.vividsolutions.jts.geom.Geometry geometry)
geometry
- the geometry to construct this OTSLine3D from.public OTSLine3D(List<OTSPoint3D> pointList)
pointList
- the list of points to construct this OTSLine3D from.public final com.vividsolutions.jts.geom.Coordinate[] getCoordinates()
public final com.vividsolutions.jts.geom.LineString getLineString()
public final int size()
public final OTSPoint3D get(int i) throws OTSGeometryException
i
- the index of the point to retrieveOTSGeometryException
- when i < 0 or i > the number of pointspublic final double getLengthSI()
public final org.djunits.value.vdouble.scalar.DoubleScalar.Rel<org.djunits.unit.LengthUnit> getLength()
public final OTSPoint3D[] getPoints()
public final nl.tudelft.simulation.language.d3.DirectedPoint getLocationExtended(org.djunits.value.vdouble.scalar.DoubleScalar.Rel<org.djunits.unit.LengthUnit> position) throws NetworkException
position
- the position on the line for which to calculate the point on, before, of after the lineNetworkException
- when position could not be calculatedpublic final nl.tudelft.simulation.language.d3.DirectedPoint getLocationExtendedSI(double positionSI) throws NetworkException
positionSI
- the position on the line for which to calculate the point on, before, of after the line, in SI unitsNetworkException
- when position could not be calculatedpublic final nl.tudelft.simulation.language.d3.DirectedPoint getLocationFraction(double fraction) throws NetworkException
fraction
- the fraction for which to calculate the point on the lineNetworkException
- when fraction less than 0.0 or more than 1.0.public final nl.tudelft.simulation.language.d3.DirectedPoint getLocation(org.djunits.value.vdouble.scalar.DoubleScalar.Rel<org.djunits.unit.LengthUnit> position) throws NetworkException
position
- the position on the line for which to calculate the point on the lineNetworkException
- when position less than 0.0 or more than line length.public final nl.tudelft.simulation.language.d3.DirectedPoint getLocationSI(double positionSI) throws NetworkException
positionSI
- the position on the line for which to calculate the point on the lineNetworkException
- when position less than 0.0 or more than line length.public nl.tudelft.simulation.language.d3.DirectedPoint getLocation() throws RemoteException
getLocation
in interface nl.tudelft.simulation.dsol.animation.LocatableInterface
RemoteException
public javax.media.j3d.Bounds getBounds() throws RemoteException
getBounds
in interface nl.tudelft.simulation.dsol.animation.LocatableInterface
RemoteException
Copyright © 2014–2015 Delft University of Technology. All rights reserved.