@Override
        public HashMap<String, UpdatedTerrainPatch> call() throws Exception {

            TerrainQuad terrainQuad = (TerrainQuad) getSpatial();

            // go through each patch and calculate its LOD based on camera distance
            HashMap<String, UpdatedTerrainPatch> updated = new HashMap<>();
            // 'updated' gets populated here
            boolean lodChanged = terrainQuad.calculateLod(camLocations, updated, lodCalculator);

            if (!lodChanged) {
                // not worth updating anything else since no one's LOD changed
                lodCalcRunning.set(false);
                return null;
            }

            // then calculate its neighbour LOD values for seaming in the shader
            terrainQuad.findNeighboursLod(updated);
            // 'updated' can get added to here
            terrainQuad.fixEdges(updated);
            terrainQuad.reIndexPages(updated, lodCalculator.usesVariableLod());

            //setUpdateQuadLODs(updated); // set back to main ogl thread

            lodCalcRunning.set(false);

            return updated;
        }
Calculates the LOD of all child terrain patches.
jme3-terrain/src/main/java/com/jme3/terrain/geomipmap/TerrainLodControl.java