public final class OTSBufferingJTS extends Object
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.
$LastChangedDate: 2015-07-16 10:20:53 +0200 (Thu, 16 Jul 2015) $, @version $Revision: 1124 $, by $Author: pknoppers $,
initial version Jul 22, 2015
Modifier and Type | Method and Description |
---|---|
static OTSPoint3D |
closestPointOnSegmentToPoint(OTSPoint3D lineP1,
OTSPoint3D lineP2,
OTSPoint3D point)
Project a point on a line (2D).
|
static double |
distanceLineSegmentToPoint(OTSPoint3D lineP1,
OTSPoint3D lineP2,
OTSPoint3D point)
Compute the distance of a line segment to a point.
|
static void |
main(String[] args) |
static OTSLine3D |
offsetGeometryOLD(OTSLine3D referenceLine,
double offset)
Generate a Geometry that has a fixed offset from a reference Geometry.
|
static OTSLine3D |
offsetLine(OTSLine3D referenceLine,
double offset)
Construct parallel line without.
|
static OTSLine3D |
offsetLine(OTSLine3D referenceLine,
double offsetAtStart,
double offsetAtEnd)
Create a line at linearly varying offset from a reference line.
|
public static double distanceLineSegmentToPoint(OTSPoint3D lineP1, OTSPoint3D lineP2, OTSPoint3D point)
lineP1
- OTSPoint3D; start of line segmentlineP2
- OTSPoint3D; end of line segmentpoint
- OTSPoint3D; Point to project onto the line segmentpublic static OTSPoint3D closestPointOnSegmentToPoint(OTSPoint3D lineP1, OTSPoint3D lineP2, OTSPoint3D point)
lineP1
- OTSPoint3D; start of line segmentlineP2
- OTSPoint3D; end of line segmentpoint
- OTSPoint3D; Point to project onto the line segmentpublic static OTSLine3D offsetLine(OTSLine3D referenceLine, double offset)
referenceLine
- OTSLine3D; the reference lineoffset
- double; offset distance from the reference line; positive is LEFT, negative is RIGHTpublic static OTSLine3D offsetGeometryOLD(OTSLine3D referenceLine, double offset) throws OTSGeometryException
referenceLine
- OTSLine3D; the reference lineoffset
- double; offset distance from the reference line; positive is LEFT, negative is RIGHTOTSGeometryException
- on failurepublic static OTSLine3D offsetLine(OTSLine3D referenceLine, double offsetAtStart, double offsetAtEnd) throws OTSGeometryException
referenceLine
- OTSLine3D; the Geometry of the reference lineoffsetAtStart
- double; offset at the start of the reference line (positive value is Left, negative value is Right)offsetAtEnd
- double; offset at the end of the reference line (positive value is Left, negative value is Right)OTSGeometryException
- when this method fails to create the offset linepublic static void main(String[] args) throws NetworkException, OTSGeometryException
args
- String[]; argsNetworkException
- on errorOTSGeometryException
- on errorCopyright © 2014–2019 Delft University of Technology. All rights reserved.