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 voidaddTile(TerrainTile tile)voidclear()SectorgetSector()Indicates the geographic rectangular region that contains this terrain.booleanintersect(Line line, Vec3 result)Computes the first intersection of this terrain with a specified line in Cartesian coordinates.voidsetTriStripElements(short[] elements)booleansurfacePoint(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:TerrainIndicates 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:TerrainComputes 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:TerrainComputes 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:
surfacePointin interfaceTerrain- Parameters:
latitude- the location's latitude in degreeslongitude- the location's longitude in degreesresult- a pre-allocatedVec3in which to store the computed X, Y and Z Cartesian coordinates- Returns:
- true if the geographic location is on the terrain surface, otherwise false
-
-