|
j3d.org Code | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.j3d.terrain.AbstractTerrainData
org.j3d.terrain.AbstractStaticTerrainData
public abstract class AbstractStaticTerrainData
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.
| Field Summary | |
|---|---|
protected int |
gridDepth
The depth of the terrain in grid points. |
protected int |
gridWidth
The width of the terrain in grid points. |
protected java.awt.image.BufferedImage |
texture
The texture object that is loaded for this instance. |
| Fields inherited from class org.j3d.terrain.AbstractTerrainData |
|---|
colorAvailable, gridStepX, gridStepY, textureAvailable |
| Fields inherited from interface org.j3d.terrain.TerrainData |
|---|
FREEFORM_DATA, STATIC_DATA, TILED_DATA |
| Constructor Summary | |
|---|---|
protected |
AbstractStaticTerrainData()
Create a new instance.of this data class with all flags set to false. |
| Method Summary | |
|---|---|
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. |
java.awt.image.BufferedImage |
getTexture()
Fetch the BufferedImage that is used to cover the entire terrain. |
void |
setTexture(java.awt.image.BufferedImage tex)
Set the texture object that can be used with this terrain instance. |
| Methods inherited from class org.j3d.terrain.AbstractTerrainData |
|---|
getGridXStep, getGridYStep, getSourceDataType, hasColor, hasTexture |
| 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, getGridXStep, getGridYStep, getHeightFromGrid, getSourceDataType, hasColor, hasTexture |
| Methods inherited from interface org.j3d.ui.navigation.HeightDataSource |
|---|
getHeight |
| Field Detail |
|---|
protected java.awt.image.BufferedImage texture
protected int gridWidth
protected int gridDepth
| Constructor Detail |
|---|
protected AbstractStaticTerrainData()
| Method Detail |
|---|
public java.awt.image.BufferedImage getTexture()
getTexture in interface StaticTerrainDatapublic int getGridWidth()
getGridWidth in interface StaticTerrainDatapublic int getGridDepth()
getGridDepth in interface StaticTerrainDatapublic void setTexture(java.awt.image.BufferedImage tex)
tex - The texture instance to use or null to clear
|
j3d.org Code | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||