|
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 org.j3d.terrain.AbstractFreeFormTerrainData
public abstract class AbstractFreeFormTerrainData
Abstract representation of free-form terrain data.
This implementation provides the ability to also use an external providers of texture information.
Field Summary | |
---|---|
protected int |
gridDepth
The number of grid points per tile in depth |
protected int |
gridWidth
The number of grid points per tile in width |
protected TextureTileGenerator |
tileGenerator
Reference to the currently set texture tile generator |
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 |
AbstractFreeFormTerrainData()
Create a new instance.of this data class with all flags set to false. |
Method Summary | |
---|---|
int |
getGridDepth()
Get the total depth (number of points on the X axis) of the grid. |
int |
getGridWidth()
Get the total width (number of points on the Y axis) of the grid. |
java.awt.image.BufferedImage |
getTexture(java.awt.Rectangle bounds)
Fetch the texture or part of a texture that can be applied to the sub-region of the overall object. |
void |
setTextureTileGenerator(TextureTileGenerator gen)
Set the texture tile geneattor instance to the new value. |
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 TextureTileGenerator tileGenerator
protected int gridWidth
protected int gridDepth
Constructor Detail |
---|
protected AbstractFreeFormTerrainData()
Method Detail |
---|
public int getGridWidth()
getGridWidth
in interface FreeFormTerrainData
public int getGridDepth()
getGridDepth
in interface FreeFormTerrainData
public java.awt.image.BufferedImage getTexture(java.awt.Rectangle bounds)
If the texture object only covers parts of the bounds, that is fine. Just return the full object and make sure the texture coordinates and texture attributes are correctly set up.
getTexture
in interface FreeFormTerrainData
bounds
- The bounds of the region based on the grid positions
public void setTextureTileGenerator(TextureTileGenerator gen)
gen
- The new generator instance to use
|
j3d.org Code | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |