public abstract class AbstractStaticTerrainData extends AbstractTerrainData implements StaticTerrainData
This class provides a lot of the common functionality that all implementations will require. Good to save you typing.
| Modifier and Type | Field and Description |
|---|---|
protected int |
gridDepth
The depth of the terrain in grid points.
|
protected int |
gridWidth
The width of the terrain in grid points.
|
protected BufferedImage |
texture
The texture object that is loaded for this instance.
|
colorAvailable, gridStepX, gridStepY, textureAvailableFREEFORM_DATA, STATIC_DATA, TILED_DATA| Modifier | Constructor and Description |
|---|---|
protected |
AbstractStaticTerrainData()
Create a new instance.of this data class with all flags set to false.
|
| Modifier and Type | Method and Description |
|---|---|
int |
getGridDepth()
Get the depth (number of points on the X axis) of the grid.
|
int |
getGridWidth()
Get the width (number of points on the Y axis) of the grid.
|
BufferedImage |
getTexture()
Fetch the BufferedImage that is used to cover the entire terrain.
|
void |
setTexture(BufferedImage tex)
Set the texture object that can be used with this terrain instance.
|
getGridXStep, getGridYStep, getSourceDataType, hasColor, hasTextureclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetCoordinate, getCoordinate, getCoordinateWithColor, getCoordinateWithTexture, getGridXStep, getGridYStep, getHeightFromGrid, getSourceDataType, hasColor, hasTexturegetHeightprotected BufferedImage texture
protected int gridWidth
protected int gridDepth
protected AbstractStaticTerrainData()
public BufferedImage getTexture()
getTexture in interface StaticTerrainDatapublic int getGridWidth()
getGridWidth in interface StaticTerrainDatapublic int getGridDepth()
getGridDepth in interface StaticTerrainDatapublic void setTexture(BufferedImage tex)
tex - The texture instance to use or null to clear
Copyright © 2001 - 2015 j3d.org