|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjme.locale.external.data.AbstractHeightMap
jme.locale.external.data.RawHeightMap
RawHeightMap
creates a height map from a RAW image file. The
greyscale image denotes height based on the value of the pixel for each
point. Where pure black denotes 0 and pure white denotes 255.
Field Summary |
Fields inherited from class jme.locale.external.data.AbstractHeightMap |
filter, heightData, heightScale, size |
Constructor Summary | |
RawHeightMap(java.lang.String filename,
int size)
Constructor creates a new RawHeightMap object and
loads a RAW image file to use as a height
field. |
Method Summary | |
boolean |
load()
load fills the height data array with the appropriate
data from the set RAW image. |
void |
setFilename(java.lang.String filename)
setFilename sets the file to use for the RAW data. |
Methods inherited from class jme.locale.external.data.AbstractHeightMap |
erodeTerrain, getHeightMap, getInterpolatedHeight, getScaledHeightAtPoint, getSize, getTrueHeightAtPoint, normalizeTerrain, save, setFilter, setHeightAtPoint, setHeightScale, setSize, unloadHeightMap |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public RawHeightMap(java.lang.String filename, int size)
RawHeightMap
object and
loads a RAW image file to use as a height
field. The greyscale image denotes the height of the terrain, where
dark is low point and bright is high point. The values of the RAW
correspond directly with the RAW values or 0 - 255.
filename
- the RAW file to use as the heightmap.size
- the size of the RAW (must be square).
MonkeyRuntimeException
- if the filename is null or not RAW, and
if the size is 0 or less.Method Detail |
public boolean load()
load
fills the height data array with the appropriate
data from the set RAW image. If the RAW image has not been set a
MonkeyRuntimeException will be thrown.
load
in class AbstractHeightMap
public void setFilename(java.lang.String filename)
setFilename
sets the file to use for the RAW data. A
call to load
is required to put the changes into effect.
filename
- the new file to use for the height data.
MonkeyRuntimeException
- if the file is null or not RAW.
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |