env3d.advanced
Class EnvTerrain
java.lang.Object
env3d.GameObjectAdapter
env3d.advanced.EnvAbstractNode
env3d.advanced.EnvTerrain
public class EnvTerrain
- extends EnvAbstractNode
Fields inherited from class env3d.GameObjectAdapter |
assetManager, currentAction, currentModel, currentTexture, internalObject, jme_node, lighting, locator, mat, mat_lit, objectCache, q, qX, qY, qZ |
Methods inherited from class env3d.advanced.EnvAbstractNode |
attach, getRotateX, getRotateY, getRotateZ, getScale, getX, getY, getZ, remove, setRotateX, setRotateY, setRotateZ, setScale, setX, setY, setZ, update, updateRotation |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
mat_terrain
protected com.jme3.material.Material mat_terrain
mat_terrainLighting
protected com.jme3.material.Material mat_terrainLighting
terrain
protected com.jme3.terrain.geomipmap.TerrainQuad terrain
EnvTerrain
public EnvTerrain(double[] heightMap)
EnvTerrain
public EnvTerrain(java.lang.String imageFile)
updateHeightMap
public void updateHeightMap(java.lang.String imageFile)
setTexture
public void setTexture(java.lang.String texture)
setTextureAlpha
public void setTextureAlpha(java.lang.String texture)
setTexture
public void setTexture(java.lang.String texture,
int channel)
- Sets the texture channel for splat texture on this terrain.
- Parameters:
texture
- channel
- 1 is red, 2 is blue, 3 is green
setScale
public void setScale(double x,
double y,
double z)
getHeight
public float getHeight(double x,
double z)
- Returns the height of a particular point of the terrain
- Parameters:
x
- z
-
- Returns:
getNormal
public com.jme3.math.Vector3f getNormal(double x,
double z)
- Returns the normal vector for a point on the terrain
- Returns:
useLightingMaterial
public void useLightingMaterial(boolean lighting)
- Overrides:
useLightingMaterial
in class GameObjectAdapter
getHeightMapFile
public java.lang.String getHeightMapFile()
- Returns:
- the heightMapFile
getAlphaMapFile
public java.lang.String getAlphaMapFile()
getTexture
public java.lang.String getTexture()
- Returns:
- the texture
getTextureB
public java.lang.String getTextureB()
getTextureG
public java.lang.String getTextureG()
getTerrainQuad
public com.jme3.terrain.geomipmap.TerrainQuad getTerrainQuad()