public interface Terrain
GeographicProjection
, and therefore may model either an ellipsoid or an arbitrary 2D projection.
Implementations of this interface may model a subset of the globe's surface, and at an arbitrary (or varying)
resolution. Unless the terrain implementation is known to represent a pre-determined region of the Globe's surface,
method such as intersect and surfacePoint are not guaranteed to compute the desired Cartesian coordinate.
Additionally, the results of these methods must be interpreted as representing an arbitrary resolution, unless the
terrain implementation is known to represent a pre-determined resolution.Modifier and Type | Method and Description |
---|---|
Globe |
getGlobe()
Indicates the globe modeled by this terrain.
|
Sector |
getSector()
Indicates the geographic rectangular region that contains this terrain.
|
double |
getVerticalExaggeration()
Indicates the geometric surface's vertical exaggeration.
|
boolean |
intersect(Line line,
Vec3 result)
Computes the first intersection of this terrain with a specified line in Cartesian coordinates.
|
boolean |
surfacePoint(double latitude,
double longitude,
double offset,
Vec3 result)
Computes the Cartesian coordinates of a geographic location on the terrain surface.
|
Globe getGlobe()
double getVerticalExaggeration()
Sector getSector()
boolean intersect(Line line, Vec3 result)
line
- the line to intersect with this terrainresult
- a pre-allocated Vec3
in which to return the intersection pointjava.lang.IllegalArgumentException
- if either argument is nullboolean surfacePoint(double latitude, double longitude, double offset, Vec3 result)
latitude
- the location's latitude in degreeslongitude
- the location's longitude in degreesoffset
- a vertical offset in meters applied to the terrain heightresult
- a pre-allocated Vec3
in which to store the computed X, Y and Z Cartesian coordinatesjava.lang.IllegalArgumentException
- if the result is null