public interface Globe
GeographicProjection
. All Cartesian coordinates
and elevations are in meters.Modifier and Type | Method and Description |
---|---|
Matrix4 |
cameraToCartesianTransform(Camera camera,
Matrix4 result) |
LookAt |
cameraToLookAt(Camera camera,
LookAt result) |
Position |
cartesianToGeographic(double x,
double y,
double z,
Position result)
Converts a Cartesian point to a geographic position.
|
Matrix4 |
cartesianToLocalTransform(double x,
double y,
double z,
Matrix4 result) |
Vec3 |
geographicToCartesian(double latitude,
double longitude,
double altitude,
Vec3 result)
Converts a geographic position to Cartesian coordinates.
|
float[] |
geographicToCartesianGrid(Sector sector,
int numLat,
int numLon,
double[] elevations,
Vec3 origin,
float[] result,
int stride,
int pos) |
Vec3 |
geographicToCartesianNormal(double latitude,
double longitude,
Vec3 result) |
Matrix4 |
geographicToCartesianTransform(double latitude,
double longitude,
double altitude,
Matrix4 result) |
double |
getEccentricitySquared()
Indicates the eccentricity squared parameter of the globe's ellipsoid.
|
double |
getEquatorialRadius()
Indicates the radius in meters of the globe's ellipsoid at the equator.
|
double |
getPolarRadius()
Indicates the radius in meters of the globe's ellipsoid at the poles.
|
GeographicProjection |
getProjection()
Indicates the geographic projection used by this globe.
|
double |
getRadiusAt(double latitude,
double longitude)
Indicates the radius in meters of the globe's ellipsoid at a specified location.
|
Tessellator |
getTessellator() |
double |
horizonDistance(double eyeAltitude)
Indicates the distance to the globe's horizon from a specified eye altitude.
|
double |
horizonDistance(double eyeAltitude,
double objectAltitude)
Indicates the distance to an object passing over the globe's horizon from a specified eye altitude.
|
boolean |
intersect(Line line,
Vec3 result)
Computes the first intersection of this globe with a specified line.
|
Camera |
lookAtToCamera(LookAt lookAt,
Camera result) |
Matrix4 |
lookAtToCartesianTransform(LookAt lookAt,
Matrix4 result) |
void |
setProjection(GeographicProjection projection)
Sets the geographic projection used by this globe.
|
void |
setTessellator(Tessellator tessellator) |
double getEquatorialRadius()
double getPolarRadius()
double getRadiusAt(double latitude, double longitude)
latitude
- the location's latitude in degreeslongitude
- the location's longitude in degreesdouble getEccentricitySquared()
2*f -
f*f
, where f
is the ellipsoid's flattening parameter.GeographicProjection getProjection()
void setProjection(GeographicProjection projection)
projection
- the projection to usejava.lang.IllegalArgumentException
- if the projection is nullTessellator getTessellator()
void setTessellator(Tessellator tessellator)
tessellator
- Vec3 geographicToCartesian(double latitude, double longitude, double altitude, Vec3 result)
latitude
- the position's latitude in degreeslongitude
- the position's longitude in degreesaltitude
- the position's altitude in metersresult
- a pre-allocated Vec3
in which to store the computed X, Y and Z Cartesian coordinatesjava.lang.IllegalArgumentException
- if the result is nullVec3 geographicToCartesianNormal(double latitude, double longitude, Vec3 result)
latitude
- longitude
- result
- java.lang.IllegalArgumentException
- if the result is nullMatrix4 geographicToCartesianTransform(double latitude, double longitude, double altitude, Matrix4 result)
latitude
- longitude
- altitude
- result
- java.lang.IllegalArgumentException
- if the result is nullfloat[] geographicToCartesianGrid(Sector sector, int numLat, int numLon, double[] elevations, Vec3 origin, float[] result, int stride, int pos)
sector
- numLat
- numLon
- elevations
- origin
- result
- stride
- pos
- java.lang.IllegalArgumentException
- if any argument is null,Position cartesianToGeographic(double x, double y, double z, Position result)
x
- the Cartesian point's X componenty
- the Cartesian point's Y componentz
- the Cartesian point's Z componentresult
- a pre-allocated Position
in which to store the computed geographic positionjava.lang.IllegalArgumentException
- if the result is nullMatrix4 cartesianToLocalTransform(double x, double y, double z, Matrix4 result)
double horizonDistance(double eyeAltitude)
eyeAltitude
- the eye altitude in metersdouble horizonDistance(double eyeAltitude, double objectAltitude)
eyeAltitude
- the eye altitude in metersobjectAltitude
- the object altitude in metersboolean intersect(Line line, Vec3 result)
line
- the line to intersect with this globeresult
- a pre-allocated Vec3
in which to return the computed pointjava.lang.IllegalArgumentException
- If either argument is null