|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.xith3d.terrain.TextureSurface
public class TextureSurface
This is a basic example GridSurface implementation to show, how to improve terrain
rendering by utilizing a detail texture.
| Constructor Summary | |
|---|---|
TextureSurface(GridResourceSpec<GridSurface> spec)
Constructs a TextureSurface from the given specifications. |
|
TextureSurface(java.net.URL mainTexture)
Constructs a TextureSurface with a single texture. |
|
TextureSurface(java.net.URL mainTexture,
Material material)
Constructs a TextureSurface with a single texture. |
|
TextureSurface(java.net.URL mainTexture,
java.net.URL detailTexture,
float detailRepeat,
org.jagatoo.opengl.enums.TextureMode blendMode)
Constructs a TextureSurface with detail texture support. |
|
TextureSurface(java.net.URL mainTexture,
java.net.URL detailTexture,
float detailRepeat,
org.jagatoo.opengl.enums.TextureMode blendMode,
Material material)
Constructs a TextureSurface with detail texture support. |
|
| 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()
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public TextureSurface(java.net.URL mainTexture)
TextureSurface with a single texture.
mainTexture - the name/path of the main color texture for the grid
public TextureSurface(java.net.URL mainTexture,
Material material)
TextureSurface with a single texture.
mainTexture - the name/path of the main color texture for the grid.material - the material properties of this surfacepublic TextureSurface(GridResourceSpec<GridSurface> spec)
TextureSurface from the given specifications.
spec - the specifications to use
public TextureSurface(java.net.URL mainTexture,
java.net.URL detailTexture,
float detailRepeat,
org.jagatoo.opengl.enums.TextureMode blendMode)
TextureSurface with detail texture support.
mainTexture - the name/path of the main color texture for the grid.detailTexture - the name/path of the repeating detail texture.detailRepeat - the amount of repetitions (per side) of the detail textureblendMode - the blend mode of the detail texture (see TextureAttributes)
public TextureSurface(java.net.URL mainTexture,
java.net.URL detailTexture,
float detailRepeat,
org.jagatoo.opengl.enums.TextureMode blendMode,
Material material)
TextureSurface with detail texture support.
mainTexture - the name/path of the main color texture for the grid.detailTexture - the name/path of the repeating detail texture.detailRepeat - the amount of repetitions (per side) of the detail textureblendMode - the blend mode of the detail texture (see TextureAttributes)material - the material properties of this surface| Method Detail |
|---|
public void release()
release in interface GridResourcerelease in interface GridSurfacepublic Appearance getAppearance()
Appearance instance for a prepared rectangular region of the grid. We only set up one appearance for our grid.
getAppearance in interface GridSurfacepublic int getTextureUnits()
getTextureUnits in interface GridSurface
public org.openmali.vecmath2.TexCoord2f map(float s,
float t,
int unit)
map in interface GridSurfaces - the "longitude" coordinate of the gridt - the "latitude" coordinate of the gridunit - the texture unit for which the coordinates have to be calculated.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||