- activate TerrainGrid in SDK via JmeTerrainGrid node wrapper

git-svn-id: https://jmonkeyengine.googlecode.com/svn/trunk@8695 75d07b2b-3a1a-0410-a2c5-0572b91ccdca
3.0
nor..67 13 years ago
parent 796f912ea1
commit 7163a7fe0c
  1. 11
      sdk/jme3-core/src/com/jme3/gde/core/sceneexplorer/nodes/JmeTerrainGrid.java

@ -31,11 +31,13 @@
*/
package com.jme3.gde.core.sceneexplorer.nodes;
import com.jme3.gde.core.scene.SceneApplication;
import com.jme3.math.Vector3f;
import com.jme3.terrain.geomipmap.TerrainGrid;
import com.jme3.terrain.geomipmap.TerrainGridListener;
import com.jme3.terrain.geomipmap.TerrainQuad;
import java.awt.Image;
import java.util.concurrent.Callable;
import java.util.logging.Level;
import java.util.logging.Logger;
import org.openide.loaders.DataObject;
@ -80,10 +82,17 @@ public class JmeTerrainGrid extends JmeTerrainQuad implements TerrainGridListene
Sheet.Set set = Sheet.createPropertiesSet();
set.setDisplayName("TerrainGrid");
set.setName(TerrainGrid.class.getName());
TerrainGrid obj = geom;//getLookup().lookup(Spatial.class);
final TerrainGrid obj = geom;//getLookup().lookup(Spatial.class);
if (obj == null) {
return sheet;
}
SceneApplication.getApplication().enqueue(new Callable<Void>() {
public Void call() throws Exception {
obj.initialize(SceneApplication.getApplication().getCamera().getLocation());
return null;
}
});
// createFields(obj.getClass(), set, obj);

Loading…
Cancel
Save