BoundingVolume bv = spatial.getWorldBound();
Camera cam = vp.getCamera();
float atanNH = FastMath.atan(cam.getFrustumNear() * cam.getFrustumTop());
float ratio = (FastMath.PI / (8f * atanNH));
float newDistance = bv.distanceTo(vp.getCamera().getLocation()) / ratio;
int level;
if (Math.abs(newDistance - lastDistance) <= distTolerance) {
level = lastLevel; // we haven't moved relative to the model, send the old measurement back.
} else if (lastDistance > newDistance && lastLevel == 0) {