org.xith3d.terrain.legacy.heightmap
Class Faulting
java.lang.Object
org.xith3d.terrain.legacy.heightmap.HeightMap
org.xith3d.terrain.legacy.heightmap.Faulting
- All Implemented Interfaces:
- java.io.Serializable, Terrain
public class Faulting
- extends HeightMap
- implements Terrain
Generates a heightmap using fractal faulting. The Algorithm was adapted from Aurel Balmosan's
'faultmap' program posted to Usenet by Carl Burke. Carl has an example and explanation here:
http://www.geocities.com/Area51/6902/t_fl_app.html. Converson to the HeightMap class
by William Denniss.
- See Also:
- Serialized Form
|
Constructor Summary |
Faulting(int width,
int height,
double scalefactor,
java.util.Random rgen)
Initialises the miller fractal generator. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Faulting
public Faulting(int width,
int height,
double scalefactor,
java.util.Random rgen)
- Initialises the miller fractal generator.
- Parameters:
width - height - scalefactor - rgen - Random number generator to use
generateTerrain
public void generateTerrain()
- Description copied from interface:
Terrain
- Peform CPU calculations to create the terrain
- Specified by:
generateTerrain in interface Terrain
generateGeometry
public GeometryArray generateGeometry(float startX,
float startY,
float stepX,
float stepY)
- Description copied from interface:
Terrain
- Build 3D geometry from terrain
- Specified by:
generateGeometry in interface Terrain