public class OTSPoint3D extends Object implements nl.tudelft.simulation.dsol.animation.Locatable, Serializable
Copyright (c) 2013-2016 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 | Field and Description |
|---|---|
double |
x
The internal representation of the point; x-coordinate.
|
double |
y
The internal representation of the point; y-coordinate.
|
double |
z
The internal representation of the point; z-coordinate.
|
| Constructor and Description |
|---|
OTSPoint3D(nl.tudelft.simulation.language.d3.CartesianPoint point) |
OTSPoint3D(com.vividsolutions.jts.geom.Coordinate coordinate) |
OTSPoint3D(nl.tudelft.simulation.language.d3.DirectedPoint point) |
OTSPoint3D(double[] xyz) |
OTSPoint3D(double x,
double y)
The x and y in the point are assumed to be in meters relative to an origin.
|
OTSPoint3D(double x,
double y,
double z)
The x, y and z in the point are assumed to be in meters relative to an origin.
|
OTSPoint3D(OTSPoint3D point) |
OTSPoint3D(com.vividsolutions.jts.geom.Point point) |
OTSPoint3D(Point2D point2d) |
OTSPoint3D(javax.vecmath.Point3d point) |
| Modifier and Type | Method and Description |
|---|---|
OTSPoint3D |
closestPointOnLine(OTSLine3D line)
Return the closest point on an OTSLine3D.
|
OTSPoint3D |
closestPointOnLine2D(OTSLine3D line)
Return the closest point on an OTSLine3D.
|
OTSPoint3D |
closestPointOnSegment(OTSPoint3D segmentPoint1,
OTSPoint3D segmentPoint2)
Project a point on a line segment (2D - Z-component is ignored).
|
org.djunits.value.vdouble.scalar.Length |
distance(OTSPoint3D point) |
double |
distanceSI(OTSPoint3D point) |
boolean |
equals(Object obj) |
javax.media.j3d.Bounds |
getBounds()
This method returns a sphere with a diameter of half a meter as the default bounds for a point.
|
com.vividsolutions.jts.geom.Coordinate |
getCoordinate() |
nl.tudelft.simulation.language.d3.DirectedPoint |
getDirectedPoint() |
nl.tudelft.simulation.language.d3.DirectedPoint |
getLocation() |
Point2D |
getPoint2D() |
int |
hashCode() |
org.djunits.value.vdouble.scalar.Length |
horizontalDistance(OTSPoint3D point) |
double |
horizontalDistanceSI(OTSPoint3D point) |
static OTSPoint3D |
interpolate(double ratio,
OTSPoint3D zeroValue,
OTSPoint3D oneValue)
Interpolate (or extrapolate) between (outside) two given points.
|
static OTSPoint3D |
intersectionOfLines(OTSPoint3D line1P1,
OTSPoint3D line1P2,
OTSPoint3D line2P1,
OTSPoint3D line2P2)
Compute the 2D intersection of two infinite lines.
|
static OTSPoint3D |
intersectionOfLineSegments(OTSPoint3D line1P1,
OTSPoint3D line1P2,
OTSPoint3D line2P1,
OTSPoint3D line2P2)
Compute the 2D intersection of two line segments.
|
String |
toString() |
public final double x
public final double y
public final double z
public OTSPoint3D(double x,
double y,
double z)
x - x-coordinatey - y-coordinatez - z-coordinatepublic OTSPoint3D(double[] xyz)
xyz - array with three elements; x, y and z are assumed to be in meters relative to an origin.public OTSPoint3D(OTSPoint3D point)
point - a point to "clone".public OTSPoint3D(javax.vecmath.Point3d point)
point - javax.vecmath 3D double point; the x, y and z in the point are assumed to be in meters relative to an
origin.public OTSPoint3D(nl.tudelft.simulation.language.d3.CartesianPoint point)
point - javax.vecmath 3D double point; the x, y and z in the point are assumed to be in meters relative to an
origin.public OTSPoint3D(nl.tudelft.simulation.language.d3.DirectedPoint point)
point - javax.vecmath 3D double point; the x, y and z in the point are assumed to be in meters relative to an
origin.public OTSPoint3D(Point2D point2d)
point2d - java.awt 2D point, z-coordinate will be zero; the x and y in the point are assumed to be in meters
relative to an origin.public OTSPoint3D(com.vividsolutions.jts.geom.Coordinate coordinate)
coordinate - geotools coordinate; the x, y and z in the coordinate are assumed to be in meters relative to an
origin.public OTSPoint3D(com.vividsolutions.jts.geom.Point point)
point - geotools point; z-coordinate will be zero; the x and y in the point are assumed to be in meters relative to
an origin.public OTSPoint3D(double x,
double y)
x - x-coordinatey - y-coordinatepublic static OTSPoint3D interpolate(double ratio, OTSPoint3D zeroValue, OTSPoint3D oneValue)
ratio - double; 0 selects the zeroValue point, 1 selects the oneValue point, 0.5 selects a point halfway, etc.zeroValue - OTSPoint3D; the point that is returned when ratio equals 0oneValue - OTSPoint3D; the point that is returned when ratio equals 1public static OTSPoint3D intersectionOfLineSegments(OTSPoint3D line1P1, OTSPoint3D line1P2, OTSPoint3D line2P1, OTSPoint3D line2P2)
line1P1 - OTSPoint3D; first point of line segment 1line1P2 - OTSPoint3D; second point of line segment 1line2P1 - OTSPoint3D; first point of line segment 2line2P2 - OTSPoint3D; second point of line segment 2public static OTSPoint3D intersectionOfLines(OTSPoint3D line1P1, OTSPoint3D line1P2, OTSPoint3D line2P1, OTSPoint3D line2P2)
line1P1 - OTSPoint3D; first point of line 1line1P2 - OTSPoint3D; second point of line 1line2P1 - OTSPoint3D; first point of line 2line2P2 - OTSPoint3D; second point of line 2public final OTSPoint3D closestPointOnSegment(OTSPoint3D segmentPoint1, OTSPoint3D segmentPoint2)
segmentPoint1 - OTSPoint3D; start of line segmentsegmentPoint2 - OTSPoint3D; end of line segmentpublic final OTSPoint3D closestPointOnLine(OTSLine3D line)
line - OTSLine3D; the linepublic final OTSPoint3D closestPointOnLine2D(OTSLine3D line)
line - OTSLine3D; the linepublic final double distanceSI(OTSPoint3D point)
point - the point to which the distance has to be calculated.public final double horizontalDistanceSI(OTSPoint3D point)
point - the point to which the distance has to be calculated.public final org.djunits.value.vdouble.scalar.Length horizontalDistance(OTSPoint3D point)
point - the point to which the distance has to be calculated.public final org.djunits.value.vdouble.scalar.Length distance(OTSPoint3D point)
point - the point to which the distance has to be calculated.public final com.vividsolutions.jts.geom.Coordinate getCoordinate()
public final nl.tudelft.simulation.language.d3.DirectedPoint getDirectedPoint()
public final Point2D getPoint2D()
public final nl.tudelft.simulation.language.d3.DirectedPoint getLocation()
getLocation in interface nl.tudelft.simulation.dsol.animation.Locatablepublic final javax.media.j3d.Bounds getBounds()
getBounds in interface nl.tudelft.simulation.dsol.animation.LocatableCopyright © 2014–2016 Delft University of Technology. All rights reserved.