|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface GridSurface
A GridShader is used to "prepare" a given rectangular region of a regular grid. This means an implementation provides an Appearance instance and appropriate texture coordinates for the area. To enable effective data storage for LOD rendering of large scale landscapes, the prepare() method accepts a detail argument specifying the needed resolution of the generated Appearance (respectively for textures). The values of the detail argument have no strict meaning other than a value of 0 requests the most detailed resolution, the GridSampler implementation has to offer. Higher numbers are for less detailed data resolutions. A detail-level of 0 requests the lowest available resolution. Typically (depends on the overall setup) a detail-level of 2 requests the highest available resolution.
| Method Summary | |
|---|---|
Appearance |
getAppearance()
Returns an Appearance instance for a prepared rectangular region of the grid. |
int |
getTextureUnits()
Will be called to return the amount of texture units needed. |
org.openmali.vecmath2.TexCoord2f |
map(float s,
float t,
int unit)
Maps the passed grid coordinates to texture coordinates. |
void |
release()
|
| Method Detail |
|---|
Appearance getAppearance()
handle - the handle of the prepared grid tile to textureint getTextureUnits()
org.openmali.vecmath2.TexCoord2f map(float s,
float t,
int unit)
handle - the handle of the prepared grid tile to textures - the "longitude" coordinate of the gridt - the "latitude" coordinate of the gridunit - the texture unit for which the coordinates have to be calculated.
void release()
release in interface GridResource
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||