org.xith3d.terrain
Class SimpleGridResourceProvider
java.lang.Object
org.xith3d.terrain.SimpleGridResourceProvider
- All Implemented Interfaces:
- GridResourceProvider
public class SimpleGridResourceProvider
- extends java.lang.Object
- implements GridResourceProvider
|
Constructor Summary |
SimpleGridResourceProvider(GridSampler sampler,
GridSurface surface)
|
SimpleGridResourceProvider(java.net.URL heightMapLocation,
int xDim,
int yDim,
HeightMapSampler.Type type,
java.net.URL textureLocation)
|
SimpleGridResourceProvider(java.net.URL heightMapLocation,
int xDim,
int yDim,
HeightMapSampler.Type type,
java.net.URL textureLocation,
java.net.URL detailTextureLocation,
float detailRepeat,
org.jagatoo.opengl.enums.TextureMode detailBlendMode)
|
SimpleGridResourceProvider(java.net.URL heightMapLocation,
java.net.URL textureLocation)
|
SimpleGridResourceProvider(java.net.URL heightMapLocation,
java.net.URL textureLocation,
java.net.URL detailTextureLocation,
float detailRepeat,
org.jagatoo.opengl.enums.TextureMode detailBlendMode)
|
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
SimpleGridResourceProvider
public SimpleGridResourceProvider(GridSampler sampler,
GridSurface surface)
SimpleGridResourceProvider
public SimpleGridResourceProvider(java.net.URL heightMapLocation,
java.net.URL textureLocation)
throws java.io.IOException
- Throws:
java.io.IOException
SimpleGridResourceProvider
public SimpleGridResourceProvider(java.net.URL heightMapLocation,
int xDim,
int yDim,
HeightMapSampler.Type type,
java.net.URL textureLocation)
throws java.io.IOException
- Throws:
java.io.IOException
SimpleGridResourceProvider
public SimpleGridResourceProvider(java.net.URL heightMapLocation,
java.net.URL textureLocation,
java.net.URL detailTextureLocation,
float detailRepeat,
org.jagatoo.opengl.enums.TextureMode detailBlendMode)
throws java.io.IOException
- Throws:
java.io.IOException
SimpleGridResourceProvider
public SimpleGridResourceProvider(java.net.URL heightMapLocation,
int xDim,
int yDim,
HeightMapSampler.Type type,
java.net.URL textureLocation,
java.net.URL detailTextureLocation,
float detailRepeat,
org.jagatoo.opengl.enums.TextureMode detailBlendMode)
throws java.io.IOException
- Throws:
java.io.IOException
findSampler
public GridSampler findSampler(float s1,
float t1,
float s2,
float t2,
int detail)
- Description copied from interface:
GridResourceProvider
- Will be called by the terrain subsystem to retrieve a sampler, that holds the data for the area sampled next.
- Specified by:
findSampler in interface GridResourceProvider
- Parameters:
s1 - the "longitude" corner coordinate of the grid tile sampled next.t1 - the "latitude" corner coordinate of the grid tile sampled next.s2 - the opposite corners "longitude" coordinate of the grid tile sampled next.t2 - the opposite corners "latitude" coordinate of the grid tile sampled next.detail - the detail level of the grid tile sampled next. If '-1' the best already initialized sampler is returned.
- Returns:
- a GridSampler implementation to provide the height and local coordinate values
findSurface
public GridSurface findSurface(float s1,
float t1,
float s2,
float t2,
int detail)
- Description copied from interface:
GridResourceProvider
- Will be called by the terrain subsystem to retrieve a surface of the
specfied detail level.
- Specified by:
findSurface in interface GridResourceProvider
- Parameters:
s1 - the "longitude" corner coordinate of the grid tile sampled next.t1 - the "latitude" corner coordinate of the grid tile sampled next.s2 - the opposite corners "longitude" coordinate of the grid tile sampled next.t2 - the opposite corners "latitude" coordinate of the grid tile sampled next.detail - the detail level of the grid tile textured next. If '-1' the best already initialized surface is returned.
- Returns:
- a GridSurface implementation that provides the appearance texture coordinate infos.
releaseSampler
public void releaseSampler(GridSampler sampler)
- Specified by:
releaseSampler in interface GridResourceProvider
releaseSurface
public void releaseSurface(GridSurface surface)
- Specified by:
releaseSurface in interface GridResourceProvider