|
||||||||||
前のクラス 次のクラス | フレームあり フレームなし | |||||||||
概要: 入れ子 | フィールド | コンストラクタ | メソッド | 詳細: フィールド | コンストラクタ | メソッド |
public interface Terrain
Terrain can be one or many meshes comprising of a, probably large, piece of land. Terrain is Y-up in the grid axis, meaning gravity acts in the -Y direction. Level of Detail (LOD) is supported and expected as terrains can get very large. LOD can also be disabled if you so desire, however some terrain implementations can choose to ignore useLOD(boolean). Terrain implementations should extend Node, or at least Spatial.
メソッドの概要 | |
---|---|
void |
adjustHeight(java.util.List<Vector2f> xz,
java.util.List<java.lang.Float> height)
Raise/lower the height at many points. |
void |
adjustHeight(Vector2f xzCoordinate,
float delta)
Raise/lower the height in one call (instead of getHeight then setHeight). |
void |
generateEntropy(ProgressMonitor monitor)
Pre-calculate entropy values. |
float |
getHeight(Vector2f xz)
Get the real-world height of the terrain at the specified X-Z coorindate. |
float[] |
getHeightMap()
Get the heightmap of the entire terrain. |
float |
getHeightmapHeight(Vector2f xz)
Get the heightmap height at the specified X-Z coordinate. |
Material |
getMaterial()
Returns the material that this terrain uses. |
int |
getMaxLod()
This is calculated by the specific LOD algorithm. |
int |
getTerrainSize()
Used for painting to get the number of vertices along the edge of the terrain. |
float |
getTextureCoordinateScale()
Get the scale of the texture coordinates. |
void |
setHeight(java.util.List<Vector2f> xz,
java.util.List<java.lang.Float> height)
Set the height at many points. |
void |
setHeight(Vector2f xzCoordinate,
float height)
Set the height at the specified X-Z coordinate. |
void |
setLocked(boolean locked)
Lock or unlock the meshes of this terrain. |
void |
update(java.util.List<Vector3f> location)
Called by an LodControl. |
メソッドの詳細 |
---|
float getHeight(Vector2f xz)
xz
- the X-Z world coordinate
float getHeightmapHeight(Vector2f xz)
xz
- world coordinate
void setHeight(Vector2f xzCoordinate, float height)
xzCoordinate
- coordinate to set the heightheight
- that will be set at the coordinatevoid setHeight(java.util.List<Vector2f> xz, java.util.List<java.lang.Float> height)
xz
- a list of coordinates where the hight will be setheight
- the heights that match the xz coordinatesvoid adjustHeight(Vector2f xzCoordinate, float delta)
xzCoordinate
- world coordinate to adjust the terrain heightdelta
- +- value to adjust the height byvoid adjustHeight(java.util.List<Vector2f> xz, java.util.List<java.lang.Float> height)
xz
- a list of coordinates where the hight will be adjustedheight
- +- value to adjust the height by, that matches the xz coordinatesfloat[] getHeightMap()
int getMaxLod()
void update(java.util.List<Vector3f> location)
location:
- the Camera's location. A list of one camera location is normal
if you just have one camera in your scene.void setLocked(boolean locked)
locked
- or unlockedvoid generateEntropy(ProgressMonitor monitor)
Material getMaterial()
int getTerrainSize()
float getTextureCoordinateScale()
|
||||||||||
前のクラス 次のクラス | フレームあり フレームなし | |||||||||
概要: 入れ子 | フィールド | コンストラクタ | メソッド | 詳細: フィールド | コンストラクタ | メソッド |