Class PerspectiveLodCalculator

java.lang.Object
com.jme3.terrain.geomipmap.lodcalc.PerspectiveLodCalculator
All Implemented Interfaces:
com.jme3.export.Savable, LodCalculator, Cloneable

public class PerspectiveLodCalculator extends Object implements LodCalculator
  • Constructor Details

    • PerspectiveLodCalculator

      public PerspectiveLodCalculator()
    • PerspectiveLodCalculator

      public PerspectiveLodCalculator(com.jme3.renderer.Camera cam, float pixelError)
  • Method Details

    • calculateLod

      public boolean calculateLod(TerrainPatch patch, List<com.jme3.math.Vector3f> locations, HashMap<String,UpdatedTerrainPatch> updates)
      Specified by:
      calculateLod in interface LodCalculator
    • getCenterLocation

      public com.jme3.math.Vector3f getCenterLocation(TerrainPatch patch)
    • clone

      public PerspectiveLodCalculator clone()
      Specified by:
      clone in interface LodCalculator
      Overrides:
      clone in class Object
    • write

      public void write(com.jme3.export.JmeExporter ex) throws IOException
      Specified by:
      write in interface com.jme3.export.Savable
      Throws:
      IOException
    • read

      public void read(com.jme3.export.JmeImporter im) throws IOException
      Specified by:
      read in interface com.jme3.export.Savable
      Throws:
      IOException
    • usesVariableLod

      public boolean usesVariableLod()
      Description copied from interface: LodCalculator
      If true, then this calculator can cause neighbouring terrain chunks to have LOD levels that are greater than 1 apart. Entropy algorithms will want to return true for this. Straight distance calculations will just want to return false.
      Specified by:
      usesVariableLod in interface LodCalculator
    • getPixelError

      public float getPixelError()
    • setPixelError

      public void setPixelError(float pixelError)
    • setCam

      public void setCam(com.jme3.renderer.Camera cam)
    • turnOffLod

      public void turnOffLod()
      Specified by:
      turnOffLod in interface LodCalculator
    • isLodOff

      public boolean isLodOff()
      Specified by:
      isLodOff in interface LodCalculator
    • turnOnLod

      public void turnOnLod()
      Specified by:
      turnOnLod in interface LodCalculator