public class GeodesicConnectionStrategy extends ConnectionStrategy
Constructor and Description |
---|
GeodesicConnectionStrategy(Ellipsoid shape)
Create a new instance based on the given surface shape.
|
GeodesicConnectionStrategy(Ellipsoid shape,
Cartographic start,
Cartographic stop)
Create a new instance based on the given start and stop positions.
|
GeodesicConnectionStrategy(EllipsoidGeodesic line)
Create a new instance based on the given
EllipsoidGeodesic . |
Modifier and Type | Method and Description |
---|---|
double |
getDistance()
Get the total distance traversed by this connection from start to finish, in meters.
|
double |
getFinalHeading()
Get the final heading of the connection, in radians.
|
double |
getFinalHeading(Ellipsoid shape,
Cartographic initialPoint,
Cartographic finalPoint)
Get the final heading of the curve corresponding to the given parameters.
|
double |
getFinalHeading(Ellipsoid shape,
Cartographic initialPoint,
double heading,
double distance)
Get the final heading of the curve corresponding to the given parameters.
|
double |
getFinalHeading(EllipsoidSurfaceCurve curve)
Get the final heading of the given curve, in radians.
|
Cartographic |
getFinalPoint()
Gets the final point of the connection segment.
|
double |
getHeading(double s)
Get the heading at an arbitrary point along the connection, in radians.
|
double |
getInitialHeading()
Get the initial heading of the connection, in radians.
|
double |
getInitialHeading(Ellipsoid shape,
Cartographic initialPoint,
Cartographic finalPoint)
Get the initial heading of the curve corresponding to the given parameters.
|
double |
getInitialHeading(EllipsoidSurfaceCurve curve)
Get the initial heading of the given curve, in radians.
|
Cartographic |
getInitialPoint()
Gets the initial point of the connection segment.
|
EllipsoidSurfaceCurve |
getSurfaceCurve(Ellipsoid shape,
Cartographic initialPoint,
Cartographic finalPoint)
Generate a curve representing the connection from the initial to the final point.
|
EllipsoidSurfaceCurve |
getSurfaceCurve(Ellipsoid shape,
Cartographic initialPoint,
double heading,
double distance)
Generate a curve representing the connection from the initial to the final point.
|
Cartographic |
getSurfacePoint(double s)
Get the surface point along the connection at the given arc length.
|
SurfaceSegment |
getSurfaceSegment()
Get an instance of the surface geometry corresponding to this connection segment.
|
Ellipsoid |
getSurfaceShape()
Gets the shape of the reference surface upon which the surface geometry is defined.
|
void |
setPoints(Cartographic start,
Cartographic stop)
Set the initial and final points of the connection segment.
|
void |
setStart(Cartographic start)
Set the initial point of the connection segment.
|
void |
setStop(Cartographic stop)
Set the final point of the connection segment.
|
void |
setSurfaceCurve(EllipsoidSurfaceCurve curve)
Set this connection to use the given surface curve.
|
public GeodesicConnectionStrategy(Ellipsoid shape)
shape
- The shape of the surface upon which to define the connection.public GeodesicConnectionStrategy(Ellipsoid shape, @Nonnull Cartographic start, @Nonnull Cartographic stop)
shape
- The shape of the surface over which the connection path is defined.start
- The initial position for the connection.stop
- The final position for the connection.public GeodesicConnectionStrategy(EllipsoidGeodesic line)
EllipsoidGeodesic
.line
- The line representing the geometry of the connection.public void setPoints(@Nonnull Cartographic start, @Nonnull Cartographic stop)
setPoints
in class ConnectionStrategy
start
- The initial point of the connection.stop
- The final point of the connection.public void setStart(@Nonnull Cartographic start)
setStart
in class ConnectionStrategy
start
- The initial point of the connection.public void setStop(@Nonnull Cartographic stop)
setStop
in class ConnectionStrategy
stop
- The final point of the connection.public double getInitialHeading()
getInitialHeading
in class ConnectionStrategy
public double getFinalHeading()
getFinalHeading
in class ConnectionStrategy
public double getDistance()
getDistance
in class ConnectionStrategy
public SurfaceSegment getSurfaceSegment()
getSurfaceSegment
in class ConnectionStrategy
public double getHeading(double s)
getHeading
in class ConnectionStrategy
s
- The arc length parameter along the connection, in meters.@Nonnull public Cartographic getSurfacePoint(double s)
getSurfacePoint
in class ConnectionStrategy
s
- The arc length parameter along the connection, in meters.@Nonnull public Cartographic getInitialPoint()
getInitialPoint
in class ConnectionStrategy
@Nonnull public Cartographic getFinalPoint()
getFinalPoint
in class ConnectionStrategy
public Ellipsoid getSurfaceShape()
getSurfaceShape
in class ConnectionStrategy
public EllipsoidSurfaceCurve getSurfaceCurve(Ellipsoid shape, @Nonnull Cartographic initialPoint, @Nonnull Cartographic finalPoint)
getSurfaceCurve
in class ConnectionStrategy
shape
- The surface shape to use.initialPoint
- The initial point of the curve.finalPoint
- The final point of the curve.public EllipsoidSurfaceCurve getSurfaceCurve(Ellipsoid shape, @Nonnull Cartographic initialPoint, double heading, double distance)
getSurfaceCurve
in class ConnectionStrategy
shape
- The surface shape to use.initialPoint
- The initial point of the curve.heading
- The initial heading along the curve, in radians.distance
- The surface distance along the curve, in meters.public double getInitialHeading(Ellipsoid shape, @Nonnull Cartographic initialPoint, @Nonnull Cartographic finalPoint)
getInitialHeading
in class ConnectionStrategy
shape
- The shape of the surface.initialPoint
- The initial point of the curve.finalPoint
- The final point of the curve.public double getFinalHeading(Ellipsoid shape, @Nonnull Cartographic initialPoint, @Nonnull Cartographic finalPoint)
getFinalHeading
in class ConnectionStrategy
shape
- The shape of the surface.initialPoint
- The initial point on the curve.finalPoint
- The final point on the curve.public double getFinalHeading(Ellipsoid shape, @Nonnull Cartographic initialPoint, double heading, double distance)
getFinalHeading
in class ConnectionStrategy
shape
- The shape of the surface.initialPoint
- The initial point on the curve.heading
- The initial heading along the curve, in radians.distance
- The surface distance along the curve, in meters.public double getInitialHeading(EllipsoidSurfaceCurve curve)
getInitialHeading
in class ConnectionStrategy
curve
- The curve to analyze.public double getFinalHeading(EllipsoidSurfaceCurve curve)
getFinalHeading
in class ConnectionStrategy
curve
- The curve to analyze.public void setSurfaceCurve(EllipsoidSurfaceCurve curve)
If the given curve
is incompatible with the
current strategy, the strategy will attempt to create a new curve that will
use the end points of the specified curve.
setSurfaceCurve
in class ConnectionStrategy
curve
- The curve to use as the connection.