本文整理汇总了Java中com.jme3.gde.core.scene.SceneApplication.getApplication方法的典型用法代码示例。如果您正苦于以下问题:Java SceneApplication.getApplication方法的具体用法?Java SceneApplication.getApplication怎么用?Java SceneApplication.getApplication使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类com.jme3.gde.core.scene.SceneApplication
的用法示例。
在下文中一共展示了SceneApplication.getApplication方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: actionPerformed
import com.jme3.gde.core.scene.SceneApplication; //导入方法依赖的package包/类
public void actionPerformed(ActionEvent ev) {
ProjectAssetManager pm = context.getLookup().lookup(ProjectAssetManager.class);
if (pm == null) {
Logger.getLogger(this.getClass().getName()).log(Level.SEVERE, "AssetManager not found!");
return;
}
Element assetElement = context.getLookup().lookup(Element.class);
com.jme3.scene.Node node = new com.jme3.scene.Node("PreviewRootNode");
Spatial model = null;
model = AssetPackLoader.loadAssetPackModel(pm, new AssetConfiguration(assetElement));
node.attachChild(model);
JmeNode jmeNode = NodeUtility.createNode(node);
SceneApplication app = SceneApplication.getApplication();
SceneRequest request = new SceneRequest(app, jmeNode, pm);
try {
request.setDataObject(DataObject.find(context.getLookup().lookup(Project.class).getProjectDirectory()));
} catch (DataObjectNotFoundException ex) {
Exceptions.printStackTrace(ex);
}
request.setWindowTitle("AssetPack - PreView Model");
app.openScene(request);
}
示例2: NavMeshCameraController
import com.jme3.gde.core.scene.SceneApplication; //导入方法依赖的package包/类
public NavMeshCameraController(Camera cam) {
super(cam, SceneApplication.getApplication().getInputManager());
app = SceneApplication.getApplication();
}
示例3: TerrainCameraController
import com.jme3.gde.core.scene.SceneApplication; //导入方法依赖的package包/类
public TerrainCameraController(Camera cam) {
super(cam, SceneApplication.getApplication().getInputManager());
app = SceneApplication.getApplication();
}
示例4: actionPerformed
import com.jme3.gde.core.scene.SceneApplication; //导入方法依赖的package包/类
public void actionPerformed(ActionEvent ev) {
final ProjectAssetManager manager = context.getLookup().lookup(ProjectAssetManager.class);
if (manager == null) {
return;
}
Runnable call = new Runnable() {
public void run() {
ProgressHandle progressHandle = ProgressHandle.createHandle("Opening Model");
progressHandle.start();
try {
manager.clearCache();
final Spatial asset = context.loadAsset();
if (asset != null) {
Node node = null;
if (asset instanceof Node) {
node = (Node) asset;
} else {
node = new Node("RootNode");
node.attachChild(asset);
}
JmeNode jmeNode = NodeUtility.createNode(node);
SceneApplication app = SceneApplication.getApplication();
SceneRequest request = new SceneRequest(app, jmeNode, manager);
request.setDataObject(context);
request.setWindowTitle("OpenGL Window - View Model");
app.openScene(request);
} else {
DialogDisplayer.getDefault().notifyLater(new NotifyDescriptor.Message("Error opening " + context.getPrimaryFile().getNameExt(), NotifyDescriptor.ERROR_MESSAGE));
}
}catch(Exception e){
e.printStackTrace();
}finally {
progressHandle.finish();
}
}
};
new Thread(call).start();
}
示例5: restored
import com.jme3.gde.core.scene.SceneApplication; //导入方法依赖的package包/类
@Override
public void restored() {
//start scene app
SceneApplication.getApplication();
Logger.getLogger("org.openide.loaders").setLevel(Level.SEVERE);
}