public final class BitmapHeightMap extends AbstractHeightMap
Modifier and Type | Class and Description |
---|---|
static class |
BitmapHeightMap.BitmapHeightMapBuilder |
name, seed
Modifier and Type | Method and Description |
---|---|
static BitmapHeightMap.BitmapHeightMapBuilder |
build() |
int |
getBitDepth() |
int |
getChannel() |
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.
|
java.awt.Rectangle |
getExtent()
Get the extent of the height map, if any.
|
int |
getHeight() |
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.
|
javax.swing.Icon |
getIcon()
Get a 16x16 icon representing this height map.
|
java.awt.image.BufferedImage |
getImage() |
java.io.File |
getImageFile() |
double |
getMaxHeight()
Get the theoretical maximum value as determined by the image format, regardless of the actual maximum value.
|
double |
getMinHeight()
Get the theoretical minimum value as determined by the image format, regardless of the actual minimum value.
|
double[] |
getRange()
Get the actual minimum and maximum values contained in the image data.
|
int |
getWidth() |
boolean |
hasAlpha() |
boolean |
isFloatingPoint() |
boolean |
isRepeat() |
boolean |
isSigned() |
clone, getBaseHeight, getConstantValue, getName, getParent, getSeed, isConstant, setName, setSeed
public java.awt.image.BufferedImage getImage()
public int getChannel()
public boolean isRepeat()
public int getWidth()
public int getHeight()
public double getMinHeight()
public double getMaxHeight()
public boolean isFloatingPoint()
public int getBitDepth()
public boolean hasAlpha()
public boolean isSigned()
public double getHeight(int x, int y)
HeightMap
getHeight
in interface HeightMap
getHeight
in class AbstractHeightMap
x
- 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 double getHeight(float x, float y)
HeightMap
getHeight
in interface HeightMap
getHeight
in class AbstractHeightMap
x
- 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 java.awt.Rectangle getExtent()
HeightMap
null
.getExtent
in interface HeightMap
getExtent
in class AbstractHeightMap
null
if it is
unbounded.public int getColour(int x, int y)
HeightMap
getColour
in interface HeightMap
getColour
in class AbstractHeightMap
x
- 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.public javax.swing.Icon getIcon()
HeightMap
public double[] getRange()
public java.io.File getImageFile()
public static BitmapHeightMap.BitmapHeightMapBuilder build()