org.openmali.surface
Class LinearTerrainHeight

java.lang.Object
  extended by org.openmali.surface.LinearTerrainHeight

public class LinearTerrainHeight
extends java.lang.Object

Used to evaluate the height of a terrain at any point of this terrain. In a nutshell, it gives z = f(x,y) with a 2D array of height samples, interpolated in a linear fashion.


Constructor Summary
LinearTerrainHeight()
           
 
Method Summary
static float evaluateZ(float[][] height, float hx, float hy, float x, float y)
           
static int getDimX(float[][] height)
           
static int getDimY(float[][] height)
           
static float getZ(float[][] height, int x, int y)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

LinearTerrainHeight

public LinearTerrainHeight()
Method Detail

evaluateZ

public static float evaluateZ(float[][] height,
                              float hx,
                              float hy,
                              float x,
                              float y)

getDimX

public static int getDimX(float[][] height)

getDimY

public static int getDimY(float[][] height)

getZ

public static float getZ(float[][] height,
                         int x,
                         int y)