|
j3d.org Code | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.j3d.terrain.AbstractTerrainData
public abstract class AbstractTerrainData
An abstract representation of the base functionality for a TerrainData implementation.
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.
Field Summary | |
---|---|
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. |
Fields inherited from interface org.j3d.terrain.TerrainData |
---|
FREEFORM_DATA, STATIC_DATA, TILED_DATA |
Constructor Summary | |
---|---|
protected |
AbstractTerrainData(int dataType)
Create a new instance.of this data class with all flags set to false. |
Method Summary | |
---|---|
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. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface org.j3d.terrain.TerrainData |
---|
getCoordinate, getCoordinate, getCoordinateWithColor, getCoordinateWithTexture, getHeightFromGrid |
Methods inherited from interface org.j3d.ui.navigation.HeightDataSource |
---|
getHeight |
Field Detail |
---|
protected boolean colorAvailable
protected boolean textureAvailable
protected double gridStepX
protected double gridStepY
Constructor Detail |
---|
protected AbstractTerrainData(int dataType)
dataType
- The type of data that this instance representsMethod Detail |
---|
public int getSourceDataType()
instanceof
getSourceDataType
in interface TerrainData
public boolean hasColor()
hasColor
in interface TerrainData
public boolean hasTexture()
hasTexture
in interface TerrainData
public double getGridXStep()
getGridXStep
in interface TerrainData
public double getGridYStep()
getGridYStep
in interface TerrainData
|
j3d.org Code | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |