add check in lod control for camera existence when it can be empty in the sdk
git-svn-id: https://jmonkeyengine.googlecode.com/svn/trunk@10591 75d07b2b-3a1a-0410-a2c5-0572b91ccdca
This commit is contained in:
parent
f553d6a39a
commit
7c966572f1
@ -63,6 +63,8 @@ public class DistanceLodCalculator implements LodCalculator {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public boolean calculateLod(TerrainPatch terrainPatch, List<Vector3f> locations, HashMap<String, UpdatedTerrainPatch> updates) {
|
public boolean calculateLod(TerrainPatch terrainPatch, List<Vector3f> locations, HashMap<String, UpdatedTerrainPatch> updates) {
|
||||||
|
if (locations == null || locations.isEmpty())
|
||||||
|
return false;// no camera yet
|
||||||
float distance = getCenterLocation(terrainPatch).distance(locations.get(0));
|
float distance = getCenterLocation(terrainPatch).distance(locations.get(0));
|
||||||
|
|
||||||
if (turnOffLod) {
|
if (turnOffLod) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user