public abstract class DelegatingHeightMap extends AbstractHeightMap
| Modifier and Type | Field and Description | 
|---|---|
| protected HeightMap[] | children | 
| protected boolean | constant | 
| protected int | constantColour | 
| protected double | constantValue | 
name, seed| Modifier | Constructor and Description | 
|---|---|
| protected  | DelegatingHeightMap(java.lang.String... roles) | 
| Modifier and Type | Method and Description | 
|---|---|
| protected void | childrenChanged() | 
| protected void | determineConstant()Determines whether this height map can be constant by checking that all
 its children are constant height maps. | 
| protected int | doGetColour(int x,
           int y) | 
| protected double | doGetHeight(float x,
           float y) | 
| protected double | doGetHeight(int x,
           int y) | 
| int | getColour(int x,
         int y)Get the colour of the height map at a particular location as a combined
 RGB value consisting of the red component in bits 16-23, the green
 component in bits 8-15, and the blue component in bits 0-7. | 
| double | getConstantValue()If the height map is  constant: returns the constant
 value that would be returned for any location fromHeightMap.getHeight(int, int)andHeightMap.getHeight(float, float). | 
| double | getHeight(float x,
         float y)Get the height of the height map at a particular location. | 
| double | getHeight(int x,
         int y)Get the height of the height map at a particular location. | 
| HeightMap | getHeightMap(int index) | 
| HeightMap | getHeightMap(java.lang.String role) | 
| int | getHeightMapCount() | 
| int | getIndex(HeightMap heightMap) | 
| int | getIndex(java.lang.String role) | 
| java.lang.String | getRole(int index) | 
| long | getSeed()Get the seed of the height map. | 
| boolean | isConstant()Indicate whether the height map is constant, i.e. | 
| protected java.lang.Object | readResolve() | 
| void | recalculateConstantValue()Recursively recalculate the constant value, if any, of the tree of height
 maps. | 
| int | replace(HeightMap oldChild,
       HeightMap newChild) | 
| HeightMap | replace(int index,
       HeightMap newChild) | 
| void | setHeightMap(int index,
            HeightMap child) | 
| void | setHeightMap(java.lang.String role,
            HeightMap child) | 
| void | setSeed(long seed)Set the seed of the height map. | 
clone, getBaseHeight, getExtent, getName, getParent, setNameprotected final HeightMap[] children
protected transient double constantValue
protected transient boolean constant
protected transient int constantColour
public void recalculateConstantValue()
public final int getHeightMapCount()
public final java.lang.String getRole(int index)
public final int getIndex(java.lang.String role)
public final int getIndex(HeightMap heightMap)
public final HeightMap getHeightMap(int index)
public final HeightMap getHeightMap(java.lang.String role)
public final void setHeightMap(int index,
                               HeightMap child)
public final void setHeightMap(java.lang.String role,
                               HeightMap child)
public final long getSeed()
HeightMapgetSeed in interface HeightMapgetSeed in class AbstractHeightMappublic final void setSeed(long seed)
HeightMapsetSeed in interface HeightMapsetSeed in class AbstractHeightMapseed - The new seed of the height map.public boolean isConstant()
HeightMapisConstant in interface HeightMapisConstant in class AbstractHeightMaptrue if the height map is constant.public double getConstantValue()
HeightMapconstant: returns the constant
 value that would be returned for any location from
 HeightMap.getHeight(int, int) and HeightMap.getHeight(float, float). If the
 height map is not constant the behaviour is undefined.getConstantValue in interface HeightMapgetConstantValue in class AbstractHeightMapHeightMap.isConstant().public final double getHeight(float x,
                              float y)
HeightMapgetHeight in interface HeightMapgetHeight in class AbstractHeightMapx - The X coordinate of the location of which to get the height.y - The Y coordinate of the location of which to get the height.public final double getHeight(int x,
                              int y)
HeightMapgetHeight in interface HeightMapgetHeight in class AbstractHeightMapx - The X coordinate of the location of which to get the height.y - The Y coordinate of the location of which to get the height.public final int getColour(int x,
                           int y)
HeightMapgetColour in interface HeightMapgetColour in class AbstractHeightMapx - The X coordinate of the location of which to get the colour.y - The Y coordinate of the location of which to get the colour.protected void childrenChanged()
protected void determineConstant()
protected int doGetColour(int x,
                          int y)
protected double doGetHeight(float x,
                             float y)
protected double doGetHeight(int x,
                             int y)
protected java.lang.Object readResolve()
                                throws java.io.ObjectStreamException
java.io.ObjectStreamException