Package gov.nasa.worldwind.globe
Class BasicTerrain
- java.lang.Object
-
- gov.nasa.worldwind.globe.BasicTerrain
-
-
Constructor Summary
Constructors Constructor Description BasicTerrain()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addTile(TerrainTile tile)
void
clear()
Sector
getSector()
Indicates the geographic rectangular region that contains this terrain.boolean
intersect(Line line, Vec3 result)
Computes the first intersection of this terrain with a specified line in Cartesian coordinates.void
setTriStripElements(short[] elements)
boolean
surfacePoint(double latitude, double longitude, Vec3 result)
Computes the Cartesian coordinates of a geographic location on the terrain surface.
-
-
-
Method Detail
-
addTile
public void addTile(TerrainTile tile)
-
clear
public void clear()
-
setTriStripElements
public void setTriStripElements(short[] elements)
-
getSector
public Sector getSector()
Description copied from interface:Terrain
Indicates the geographic rectangular region that contains this terrain. The returned sector may contain geographic areas where the terrain is nonexistent.
-
intersect
public boolean intersect(Line line, Vec3 result)
Description copied from interface:Terrain
Computes the first intersection of this terrain with a specified line in Cartesian coordinates. The line is interpreted as a ray; intersection points behind the line's origin are ignored. If the line does not intersect the geometric surface modeled by this terrain, this returns false and does not modify the result argument.
-
surfacePoint
public boolean surfacePoint(double latitude, double longitude, Vec3 result)
Description copied from interface:Terrain
Computes the Cartesian coordinates of a geographic location on the terrain surface. If the latitude and longitude are outside the geometric surface modeled by this terrain, this returns false and does not modify the result argument.- Specified by:
surfacePoint
in interfaceTerrain
- Parameters:
latitude
- the location's latitude in degreeslongitude
- the location's longitude in degreesresult
- a pre-allocatedVec3
in which to store the computed X, Y and Z Cartesian coordinates- Returns:
- true if the geographic location is on the terrain surface, otherwise false
-
-