org.osm2world.core.heightmap.data
Class AbstractCellularTerrainElevation
Object
AbstractCellularTerrainElevation
- All Implemented Interfaces:
- CellularTerrainElevation, TerrainElevation
- Direct Known Subclasses:
- EmptyTerrainElevationGrid, FlatTerrainElevation, WaveTerrainElevation
public abstract class AbstractCellularTerrainElevation
- extends Object
- implements CellularTerrainElevation
Methods inherited from class Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
AbstractCellularTerrainElevation
public AbstractCellularTerrainElevation(AxisAlignedBoundingBoxXZ boundary,
int numPointsX,
int numPointsZ)
getTerrainPoints
public Collection<TerrainPoint> getTerrainPoints()
- Specified by:
getTerrainPoints
in interface TerrainElevation
getTerrainPointGrid
public TerrainPoint[][] getTerrainPointGrid()
- Specified by:
getTerrainPointGrid
in interface CellularTerrainElevation
- Returns:
- regular two-dimensional array (not jagged)
getBoundaryPolygon
public PolygonXYZ getBoundaryPolygon()
- Description copied from interface:
CellularTerrainElevation
- returns the boundary created from the first and last rows and columns
of the grid.
This requires that all
TerrainPoint
s' elevations have already
been set to non-null values.
- Specified by:
getBoundaryPolygon
in interface CellularTerrainElevation
getBoundaryPolygonXZ
public PolygonXZ getBoundaryPolygonXZ()
- Description copied from interface:
CellularTerrainElevation
- returns the boundary created from the first and last rows and columns
of the grid.
- Specified by:
getBoundaryPolygonXZ
in interface CellularTerrainElevation
getCells
public Iterable<? extends TerrainElevationCell> getCells()
- Description copied from interface:
CellularTerrainElevation
- returns Iterable over cells.
This is a convenience method for operations that need to be
performed for all cells. The iterator cannot be used to remove cells.
- Specified by:
getCells
in interface CellularTerrainElevation
getElevation
protected abstract Float getElevation(VectorXZ pos)