com.jme3.terrain.heightmap
インタフェース HeightMap
- 既知の実装クラスの一覧:
- AbstractHeightMap, CombinerHeightMap, FaultHeightMap, FluidSimHeightMap, FractalHeightMapGrid.FloatBufferHeightMap, Grayscale16BitHeightMap, HillHeightMap, ImageBasedHeightMap, MidpointDisplacementHeightMap, ParticleDepositionHeightMap, RawHeightMap
public interface HeightMap
|
メソッドの概要 |
float[] |
getHeightMap()
getHeightMap returns the entire grid of height data. |
float |
getInterpolatedHeight(float x,
float z)
getInterpolatedHeight returns the height of a point that
does not fall directly on the height posts. |
float |
getScaledHeightAtPoint(int x,
int z)
getScaledHeightAtPoint returns the scaled value at the
point provided. |
float[] |
getScaledHeightMap()
|
int |
getSize()
getSize returns the size of one side the height map. |
float |
getTrueHeightAtPoint(int x,
int z)
getTrueHeightAtPoint returns the non-scaled value at the
point provided. |
boolean |
load()
load populates the height map data. |
void |
setHeightAtPoint(float height,
int x,
int z)
setHeightAtPoint sets the height value for a given
coordinate. |
void |
setHeightScale(float scale)
setHeightScale sets the scale of the height values. |
void |
setMagnificationFilter(float filter)
setFilter sets the erosion value for the filter. |
void |
setSize(int size)
setSize sets the size of the terrain where the area is
size x size. |
void |
unloadHeightMap()
unloadHeightMap clears the data of the height map. |
getHeightMap
float[] getHeightMap()
getHeightMap returns the entire grid of height data.
- 戻り値:
- the grid of height data.
getScaledHeightMap
float[] getScaledHeightMap()
getInterpolatedHeight
float getInterpolatedHeight(float x,
float z)
getInterpolatedHeight returns the height of a point that
does not fall directly on the height posts.
- パラメータ:
x - the x coordinate of the point.z - the y coordinate of the point.
- 戻り値:
- the interpolated height at this point.
getScaledHeightAtPoint
float getScaledHeightAtPoint(int x,
int z)
getScaledHeightAtPoint returns the scaled value at the
point provided.
- パラメータ:
x - the x (east/west) coordinate.z - the z (north/south) coordinate.
- 戻り値:
- the scaled value at (x, z).
getSize
int getSize()
getSize returns the size of one side the height map. Where
the area of the height map is size x size.
- 戻り値:
- the size of a single side.
getTrueHeightAtPoint
float getTrueHeightAtPoint(int x,
int z)
getTrueHeightAtPoint returns the non-scaled value at the
point provided.
- パラメータ:
x - the x (east/west) coordinate.z - the z (north/south) coordinate.
- 戻り値:
- the value at (x,z).
load
boolean load()
load populates the height map data. This is dependent on
the subclass's implementation.
- 戻り値:
- true if the load was successful, false otherwise.
setHeightAtPoint
void setHeightAtPoint(float height,
int x,
int z)
setHeightAtPoint sets the height value for a given
coordinate. It is recommended that the height value be within the 0 - 255
range.
- パラメータ:
height - the new height for the coordinate.x - the x (east/west) coordinate.z - the z (north/south) coordinate.
setHeightScale
void setHeightScale(float scale)
setHeightScale sets the scale of the height values.
Typically, the height is a little too extreme and should be scaled to a
smaller value (i.e. 0.25), to produce cleaner slopes.
- パラメータ:
scale - the scale to multiply height values by.
setMagnificationFilter
void setMagnificationFilter(float filter)
throws java.lang.Exception
setFilter sets the erosion value for the filter. This
value must be between 0 and 1, where 0.2 - 0.4 produces arguably the best
results.
- パラメータ:
filter - the erosion value.
- 例外:
java.lang.Exception
JmeException - if filter is less than 0 or greater than 1.
setSize
void setSize(int size)
throws java.lang.Exception
setSize sets the size of the terrain where the area is
size x size.
- パラメータ:
size - the new size of the terrain.
- 例外:
java.lang.Exception
JmeException - if the size is less than or equal to zero.
unloadHeightMap
void unloadHeightMap()
unloadHeightMap clears the data of the height map. This
insures it is ready for reloading.