Class TerrainGrid.UpdateQuadCache

java.lang.Object
com.jme3.terrain.geomipmap.TerrainGrid.UpdateQuadCache
All Implemented Interfaces:
Runnable
Enclosing class:
TerrainGrid

protected class TerrainGrid.UpdateQuadCache extends Object implements Runnable
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    protected final com.jme3.math.Vector3f
     
  • Constructor Summary

    Constructors
    Constructor
    Description
    UpdateQuadCache(com.jme3.math.Vector3f location)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    run()
    This is executed if the camera has moved into a new CameraCell and will load in the new TerrainQuad tiles to be children of this TerrainGrid parent.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

    • location

      protected final com.jme3.math.Vector3f location
  • Constructor Details

    • UpdateQuadCache

      public UpdateQuadCache(com.jme3.math.Vector3f location)
  • Method Details

    • run

      public void run()
      This is executed if the camera has moved into a new CameraCell and will load in the new TerrainQuad tiles to be children of this TerrainGrid parent. It will first check the LRU cache to see if the terrain tile is already there, if it is not there, it will load it in and then cache that tile. The terrain tiles get added to the quad tree back on the OGL thread using the attachQuadAt() method. It also resets any cached values in TerrainQuad (such as neighbours).
      Specified by:
      run in interface Runnable