com.jme3.terrain.heightmap
クラス HillHeightMap

java.lang.Object
  上位を拡張 com.jme3.terrain.heightmap.AbstractHeightMap
      上位を拡張 com.jme3.terrain.heightmap.HillHeightMap
すべての実装されたインタフェース:
HeightMap

public class HillHeightMap
extends AbstractHeightMap

HillHeightMap generates a height map base on the Hill Algorithm. Terrain is generatd by growing hills of random size and height at random points in the heightmap. The terrain is then normalized and valleys can be flattened.

関連項目:
Hill Algorithm

フィールドの概要
 
クラス com.jme3.terrain.heightmap.AbstractHeightMap から継承されたフィールド
NORMALIZE_RANGE
 
コンストラクタの概要
HillHeightMap(int size, int iterations, float minRadius, float maxRadius)
          Constructor sets the attributes of the hill system and generates the height map by using a random seed.
HillHeightMap(int size, int iterations, float minRadius, float maxRadius, long seed)
          Constructor sets the attributes of the hill system and generates the height map.
 
メソッドの概要
 boolean load()
          load populates the height map data.
 void setIterations(int iterations)
          Sets the number of hills to grow.
 void setMaxRadius(float maxRadius)
          Sets the minimum radius of a hill.
 void setMinRadius(float minRadius)
          Sets the maximum radius of a hill.
 
クラス com.jme3.terrain.heightmap.AbstractHeightMap から継承されたメソッド
erodeTerrain, findMinMaxHeights, flatten, getHeightMap, getInterpolatedHeight, getScaledHeightAtPoint, getScaledHeightMap, getSize, getTrueHeightAtPoint, normalizeTerrain, save, setHeightAtPoint, setHeightScale, setMagnificationFilter, setSize, smooth, unloadHeightMap
 
クラス java.lang.Object から継承されたメソッド
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

コンストラクタの詳細

HillHeightMap

public HillHeightMap(int size,
                     int iterations,
                     float minRadius,
                     float maxRadius,
                     long seed)
              throws java.lang.Exception
Constructor sets the attributes of the hill system and generates the height map.

パラメータ:
size - size the size of the terrain to be generated
iterations - the number of hills to grow
minRadius - the minimum radius of a hill
maxRadius - the maximum radius of a hill
flattening - the power of flattening done, 1 means none
seed - the seed to generate the same heightmap again
例外:
java.lang.Exception
JmeException - if size of the terrain is not greater that zero, or number of iterations is not greater that zero

HillHeightMap

public HillHeightMap(int size,
                     int iterations,
                     float minRadius,
                     float maxRadius)
              throws java.lang.Exception
Constructor sets the attributes of the hill system and generates the height map by using a random seed.

パラメータ:
size - size the size of the terrain to be generated
iterations - the number of hills to grow
minRadius - the minimum radius of a hill
maxRadius - the maximum radius of a hill
flattening - the power of flattening done, 1 means none
例外:
java.lang.Exception
JmeException - if size of the terrain is not greater that zero, or number of iterations is not greater that zero
メソッドの詳細

load

public boolean load()
インタフェース HeightMap の記述:
load populates the height map data. This is dependent on the subclass's implementation.

戻り値:
true if the load was successful, false otherwise.

setIterations

public void setIterations(int iterations)
                   throws java.lang.Exception
Sets the number of hills to grow. More hills usually mean a nicer heightmap.

パラメータ:
iterations - the number of hills to grow
例外:
java.lang.Exception
JmeException - if iterations if not greater than zero

setMaxRadius

public void setMaxRadius(float maxRadius)
                  throws java.lang.Exception
Sets the minimum radius of a hill.

パラメータ:
maxRadius - the maximum radius of a hill
例外:
java.lang.Exception
JmeException - if the maximum radius if not greater than zero or not greater than the minimum radius

setMinRadius

public void setMinRadius(float minRadius)
                  throws java.lang.Exception
Sets the maximum radius of a hill.

パラメータ:
minRadius - the minimum radius of a hill
例外:
java.lang.Exception