com.jme3.terrain.heightmap
クラス FluidSimHeightMap

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

public class FluidSimHeightMap
extends AbstractHeightMap

FluidSimHeightMap generates a height map based using some sort of fluid simulation. The heightmap is treated as a highly viscous and rubbery fluid enabling to fine tune the generated heightmap using a number of parameters.

関連項目:
Terrain Generation Using Fluid Simulation

フィールドの概要
 
クラス com.jme3.terrain.heightmap.AbstractHeightMap から継承されたフィールド
NORMALIZE_RANGE
 
コンストラクタの概要
FluidSimHeightMap(int size, int iterations)
          Constructor sets the attributes of the hill system and generates the height map.
FluidSimHeightMap(int size, int iterations, float minInitialHeight, float maxInitialHeight, float viscosity, float waveSpeed, float timestep, float nodeDistance, 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 times the fluid simulation should be iterated over the heightmap.
 void setMaxInitialHeight(float maxInitialHeight)
          Sets the maximum initial height of the terrain.
 void setMinInitialHeight(float minInitialHeight)
          Sets the minimum initial height of the terrain.
 void setNodeDistance(float nodeDistance)
          Sets the distance between each node of the heightmap.
 void setTimeStep(float timeStep)
          Sets the time-speed between each iteration of the fluid simulation algortithm.
 void setViscosity(float viscosity)
          Sets the viscosity of the simulated fuid.
 void setWaveSpeed(float waveSpeed)
          Sets the speed at which the waves trave.
 
クラス 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
 

コンストラクタの詳細

FluidSimHeightMap

public FluidSimHeightMap(int size,
                         int iterations,
                         float minInitialHeight,
                         float maxInitialHeight,
                         float viscosity,
                         float waveSpeed,
                         float timestep,
                         float nodeDistance,
                         long seed)
                  throws java.lang.Exception
Constructor sets the attributes of the hill system and generates the height map. It gets passed a number of tweakable parameters which fine-tune the outcome.

パラメータ:
size - size the size of the terrain to be generated
iterations - the number of iterations to do
minInitialHeight - the minimum initial height of a terrain value
maxInitialHeight - the maximum initial height of a terrain value
viscosity - the viscosity of the fluid
waveSpeed - the speed at which the waves travel
timestep - the constant time-step between each iteration
nodeDistance - the distance between each node of the heightmap
seed - the seed to generate the same heightmap again
例外:
JmeException - if size of the terrain is not greater that zero, or number of iterations is not greater that zero, or the minimum initial height is greater than the maximum (or the other way around)
java.lang.Exception

FluidSimHeightMap

public FluidSimHeightMap(int size,
                         int iterations)
                  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 iterations to do
例外:
JmeException - if size of the terrain is not greater that zero, or number of iterations is not greater that zero
java.lang.Exception
メソッドの詳細

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 times the fluid simulation should be iterated over the heightmap. The more often this is, the less features (hills, etc) the terrain will have, and the smoother it will be.

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

setMaxInitialHeight

public void setMaxInitialHeight(float maxInitialHeight)
Sets the maximum initial height of the terrain.

パラメータ:
maxInitialHeight - the maximum initial height
関連項目:
#setMinInitialHeight(int)

setMinInitialHeight

public void setMinInitialHeight(float minInitialHeight)
Sets the minimum initial height of the terrain.

パラメータ:
minInitialHeight - the minimum initial height
関連項目:
#setMaxInitialHeight(int)

setNodeDistance

public void setNodeDistance(float nodeDistance)
Sets the distance between each node of the heightmap.

パラメータ:
nodeDistance - the distance between each node

setTimeStep

public void setTimeStep(float timeStep)
Sets the time-speed between each iteration of the fluid simulation algortithm.

パラメータ:
timeStep - the time-step between each iteration

setViscosity

public void setViscosity(float viscosity)
Sets the viscosity of the simulated fuid.

パラメータ:
viscosity - the viscosity of the fluid

setWaveSpeed

public void setWaveSpeed(float waveSpeed)
Sets the speed at which the waves trave.

パラメータ:
waveSpeed - the speed at which the waves travel