|
j3d.org Code | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface TextureTileGenerator
Generator for supplying instances of texture objects as tiles for large-scale terrains.
The implementation of this interface is free to source the texture tiles however it wishes. The tiles may be sourced from one huge image (for example, using JAI) or it may be from multiple image files, stitched together on demand. So long as the generator is able to tell the caller the total size of the texture(s) in pixels, then the generator will get the correct dimensions for each tile.
Note that ideally the image size should be a power of two or exactly divisible by the number of grid cells in the terrain data to give power of two textures. The caller does not make any checks on the texture object returned or on the bounds values passed in on the request. It is up to the implementor to check and rescale the tile image to be the appropriate size before handing the tile back to the caller.
Method Summary | |
---|---|
java.awt.Dimension |
getTextureSize()
Get the total size of the underlying image in pixels. |
java.awt.image.BufferedImage |
getTextureTile(java.awt.Rectangle bounds)
Fetch the texture tile for the given bounds, expresed in image pixel coordinates. |
Method Detail |
---|
java.awt.Dimension getTextureSize()
java.awt.image.BufferedImage getTextureTile(java.awt.Rectangle bounds)
getTextureSize()
method.
bounds
- The bounds of the texture tile to supply
|
j3d.org Code | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |