|
j3d.org Code | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface FreeFormTerrainData
A source of terrain data that has no fixed requirements for its access.
The source data provided by this dataset is assumed to contain a large amount of some form of memory-managed data. The nanagement routines do not really care about how the terrain is accessed. However, the implementation can expect some form of locality of reference access to the data. Terrain rendering algorithms don't randomly access the data, so it is safe to assume that at least some form of caching can be done and expect near neighbouts to be probably accessed very shortly.
Textures are assumed to be tiled, but that is really up to the
implementation. If the implementation does not tile the textures then
for each call to getTexture()
just return the same
instance each time. Also, make sure that the texture coordinates returned
from the various getCoordinateX()
methods are all coorect
for the type of texture you are using.
TerrainData.getSourceDataType()
always returns
TerrainData.FREEFORM_DATA
.
Field Summary |
---|
Fields inherited from interface org.j3d.terrain.TerrainData |
---|
FREEFORM_DATA, STATIC_DATA, TILED_DATA |
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. |
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 |
Method Detail |
---|
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.
bounds
- The bounds of the region based on the grid positions
int getGridWidth()
int getGridDepth()
|
j3d.org Code | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |