public float[] getLodEntropies(){ if (lodEntropy == null){ generateLodEntropies(); } return lodEntropy; }
/** * Generate the entropy values for the terrain for the "perspective" LOD * calculator. This routine can take a long time to run! * @param progressMonitor optional */ public void generateEntropy(ProgressMonitor progressMonitor) { // only check this on the root quad if (isRootQuad()) if (progressMonitor != null) { int numCalc = (totalSize-1)/(patchSize-1); // make it an even number progressMonitor.setMonitorMax(numCalc*numCalc); } if (children != null) { for (int i = children.size(); --i >= 0;) { Spatial child = children.get(i); if (child instanceof TerrainQuad) { ((TerrainQuad) child).generateEntropy(progressMonitor); } else if (child instanceof TerrainPatch) { ((TerrainPatch) child).generateLodEntropies(); if (progressMonitor != null) progressMonitor.incrementProgress(1); } } } // only do this on the root quad if (isRootQuad()) if (progressMonitor != null) progressMonitor.progressComplete(); }
public float[] getLodEntropies(){ if (lodEntropy == null){ generateLodEntropies(); } return lodEntropy; }
/** * Generate the entropy values for the terrain for the "perspective" LOD * calculator. This routine can take a long time to run! * @param progressMonitor optional */ public void generateEntropy(ProgressMonitor progressMonitor) { // only check this on the root quad if (isRootQuad()) if (progressMonitor != null) { int numCalc = (totalSize-1)/(patchSize-1); // make it an even number progressMonitor.setMonitorMax(numCalc*numCalc); } if (children != null) { for (int i = children.size(); --i >= 0;) { Spatial child = children.get(i); if (child instanceof TerrainQuad) { ((TerrainQuad) child).generateEntropy(progressMonitor); } else if (child instanceof TerrainPatch) { ((TerrainPatch) child).generateLodEntropies(); if (progressMonitor != null) progressMonitor.incrementProgress(1); } } } // only do this on the root quad if (isRootQuad()) if (progressMonitor != null) progressMonitor.progressComplete(); }