com.jme3.terrain.geomipmap.lodcalc
Class SimpleLodThreshold

java.lang.Object
  extended by com.jme3.terrain.geomipmap.lodcalc.SimpleLodThreshold
All Implemented Interfaces:
Savable, LodThreshold, java.lang.Cloneable

public class SimpleLodThreshold
extends java.lang.Object
implements LodThreshold

Just multiplies the terrain patch size by 2. So every two patches away the camera is, the LOD changes. Set it higher to have the LOD change less frequently.


Constructor Summary
SimpleLodThreshold()
           
SimpleLodThreshold(int patchSize, float lodMultiplier)
           
SimpleLodThreshold(Terrain terrain)
           
 
Method Summary
 LodThreshold clone()
           
 float getLodDistanceThreshold()
          A distance of how far between each LOD threshold.
 float getLodMultiplier()
           
 int getSize()
           
 void read(JmeImporter im)
           
 void setLodMultiplier(float lodMultiplier)
           
 void setSize(int size)
           
 java.lang.String toString()
           
 void write(JmeExporter ex)
           
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

SimpleLodThreshold

public SimpleLodThreshold()

SimpleLodThreshold

public SimpleLodThreshold(Terrain terrain)

SimpleLodThreshold

public SimpleLodThreshold(int patchSize,
                          float lodMultiplier)
Method Detail

getLodMultiplier

public float getLodMultiplier()

setLodMultiplier

public void setLodMultiplier(float lodMultiplier)

getSize

public int getSize()

setSize

public void setSize(int size)

getLodDistanceThreshold

public float getLodDistanceThreshold()
Description copied from interface: LodThreshold
A distance of how far between each LOD threshold.

Specified by:
getLodDistanceThreshold in interface LodThreshold

write

public void write(JmeExporter ex)
           throws java.io.IOException
Specified by:
write in interface Savable
Throws:
java.io.IOException

read

public void read(JmeImporter im)
          throws java.io.IOException
Specified by:
read in interface Savable
Throws:
java.io.IOException

clone

public LodThreshold clone()
Specified by:
clone in interface LodThreshold
Overrides:
clone in class java.lang.Object

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object