public abstract class AbstractTerrainData extends Object implements TerrainData
This class provides a lot of the common functionality that all implementations will require. Good to save you typing. Does not allow you to directly extend this class. It is provided for basic common functionality that is extended by the more derived versions.
| Modifier and Type | Field and Description |
|---|---|
protected boolean |
colorAvailable
Flag indicating if colour data is available from this dataset.
|
protected double |
gridStepX
The real world distance between each X (width) grid position
|
protected double |
gridStepY
The real world distance between each Y (depth) grid position
|
protected boolean |
textureAvailable
Flag indicating if texture data is available from this dataset.
|
FREEFORM_DATA, STATIC_DATA, TILED_DATA| Modifier | Constructor and Description |
|---|---|
protected |
AbstractTerrainData(int dataType)
Create a new instance.of this data class with all flags set to false.
|
| Modifier and Type | Method and Description |
|---|---|
double |
getGridXStep()
Get the real world distance between consecutive X values in the grid.
|
double |
getGridYStep()
Get the real world distance between consecutive Y values in the grid.
|
int |
getSourceDataType()
Get the type of terrain data that we are dealing with.
|
boolean |
hasColor()
Check to see if this terrain data has per-vertex colours.
|
boolean |
hasTexture()
Check to see if this terrain data has any texturing at all - either
tiled or simple.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetCoordinate, getCoordinate, getCoordinateWithColor, getCoordinateWithTexture, getHeightFromGridgetHeightprotected boolean colorAvailable
protected boolean textureAvailable
protected double gridStepX
protected double gridStepY
protected AbstractTerrainData(int dataType)
dataType - The type of data that this instance representspublic int getSourceDataType()
instanceofgetSourceDataType in interface TerrainDatapublic boolean hasColor()
hasColor in interface TerrainDatapublic boolean hasTexture()
hasTexture in interface TerrainDatapublic double getGridXStep()
getGridXStep in interface TerrainDatapublic double getGridYStep()
getGridYStep in interface TerrainData
Copyright © 2001 - 2015 j3d.org