-You are welcome to try out the new jME3, and contribute patches and features! This document shows how to download, set up, build, and run the latest development version from the sources. (As of Early 2010, we are in pre-alpha.)
-
-
-
-
-
+You are welcome to try out the new jME3, and contribute patches and features! This document shows how to download, set up, build, and run the latest development version from the sources.
@@ -23,11 +18,10 @@ Note: In the following, always replace ”~” with the path to your home direct
-Check out the sources form the repository. (The following NetBeans instructions are equivalent to executing cd ~/NetBeansProjects; svn checkout on the commandline.)
-
+Check out the sources from the repository.
-
In NetBeans go to Team > Subversion > Checkout
+
In jMonkeyPlatform go to Team > Subversion > Checkout
Repository URL:
@@ -37,9 +31,9 @@ Check out the sources form the repository. (The following NetBeans instructions
Click Next
-
Repository Folders: “branches/jme3”
+
Repository Folders: “trunk/engine”
-
Local Folder: ~/NetBeansProjects
+
Local Folder: ~/jMonkeyProjects
@@ -49,96 +43,8 @@ Check out the sources form the repository. (The following NetBeans instructions
-The jme3 project opens in the Project window.
-
-
-
-Look into the Libraries node and confirm that the project depends on the following libraries in the classpath:
-
-
-This steps configures two optional libraries: JOAL for Audio, and JOGL as back-up option for older GPUs. (This step is recommended, but you can skip it if you know what are are doing.)
-
-
-
-
Open the jme3's project properties from the Projects window, and go to the Run category.
-
-
Under VM Options, enter the following, depending on your operating system. (Replace 32 with 64 if applicable.)
Mac OS: -Djava.library.path=“lib/jogl/macosx_universal/:lib/joal/macosx/”
-
-
-
-
-
-
-
-It is possible to configure one univerversal java library path - this is useful if you ever need to build a platform-independent JAR of your project:
-
-
-Important: When copying from the wiki, make certain to use normal quotation marks, not the curly ones.
+The jme3 project opens in the Project window.
-A jme3 application can either be deployed to the desktop (as Java Swing application) and web browser (as JNLP/WebStart or Applet), or to an Android phone. While the former is the default, switching to Android deployment can be done in a few steps.
-
-
In the Projects window, right-click the jme3 project and choose Generate Javadoc. Wait.
-
-
Confirm in the Files window that the javadoc has been created in ~/NetBeansProjects/jme3/dist/javadoc
-
-
In the editor, place the caret in a jme class and press ctrl-space to view javadoc.
-
-
-
-
-
-If you are working on a game project that depends on jme3:
-
-
-
First follow the previous tip. (In the future, we may offer jme javadoc as download instead.)
-
-
In your game project, right-click the Libraries node and choose “Properties”.
-
-
In the Library properties, select jme3.jar and click the Edit button.
-
-
For the Javadoc field, browse to ~/NetBeansProjects/jme3/dist/javadoc. Check “as relative path” and click select.
-
-
For the Sources field, browse to ~/NetBeansProjects/jme3/src. Check “as relative path” and click select.
-
-
Click OK.
-
-
-
-
In the editor, place the caret in a jme class and press ctrl-space to view javadoc. Ctrl-click any jme3 method to jump to its definition in the sources.
-
-
-
-
-
-This tip works for any third-party JAR library that you use. (You may have to download the javadoc/sources from their home page separately).
-
-
-Cannot Find Symbol SwingWorker compile errors, and red exclamation marks on some package icons? SwingWorker is part of JDK6 but not JDK5. If you get this error, you have two options to fix it:
-
-
-
Make sure you have JDK6 installed, and switch the jme3 project to JDK6.
-
-
In NetBeans, register the JDK6 in the “Tools > Java Platform” manager.
-
-
Open the jme3 Project Properties, and switch the JDK settings in the “Sources” and “Libraries” sections to JDK6.
-
-
Clean and Build.
-
-
-
-
Alternatively, if you must stay with JDK5:
-
-
Temporarily remove the directory jme3_tools/deploy.
\ No newline at end of file
diff --git a/sdk/jme3-core/javahelp/com/jme3/gde/core/docs/jme3/intermediate/file_types.html b/sdk/jme3-core/javahelp/com/jme3/gde/core/docs/jme3/intermediate/file_types.html
index 1f9721ce4..6a05dff11 100644
--- a/sdk/jme3-core/javahelp/com/jme3/gde/core/docs/jme3/intermediate/file_types.html
+++ b/sdk/jme3-core/javahelp/com/jme3/gde/core/docs/jme3/intermediate/file_types.html
@@ -42,7 +42,7 @@
.DDS, .HDR, .PFM, .TGA
Textures
-
.font
Bitmap fonts
+
.fnt
Bitmap fonts
.WAV, .OGG
Wave and OGG Vorbis audio
diff --git a/sdk/jme3-core/src/com/jme3/gde/core/sceneexplorer/nodes/actions/AbstractToolAction.java b/sdk/jme3-core/src/com/jme3/gde/core/sceneexplorer/nodes/actions/AbstractToolAction.java
index 6ea95a34f..0c74af6b6 100644
--- a/sdk/jme3-core/src/com/jme3/gde/core/sceneexplorer/nodes/actions/AbstractToolAction.java
+++ b/sdk/jme3-core/src/com/jme3/gde/core/sceneexplorer/nodes/actions/AbstractToolAction.java
@@ -59,12 +59,13 @@ public abstract class AbstractToolAction implements ToolAction {
SceneApplication.getApplication().enqueue(new Callable() {
public Void call() throws Exception {
- if (doApplyTool(rootNode)) {
+ final Object object = doApplyTool(rootNode);
+ if (object!=null) {
Lookup.getDefault().lookup(SceneUndoRedoManager.class).addEdit(this, new AbstractUndoableSceneEdit() {
@Override
public void sceneUndo() throws CannotUndoException {
- doUndoTool(rootNode);
+ doUndoTool(rootNode,object);
setModified();
}
@@ -105,9 +106,9 @@ public abstract class AbstractToolAction implements ToolAction {
};
}
- protected abstract boolean doApplyTool(AbstractSceneExplorerNode rootNode);
+ protected abstract Object doApplyTool(AbstractSceneExplorerNode rootNode);
- protected abstract void doUndoTool(AbstractSceneExplorerNode rootNode);
+ protected abstract void doUndoTool(AbstractSceneExplorerNode rootNode, Object undoObject);
// protected abstract void doAwtUndo();
// protected abstract void doAwtRedo();
diff --git a/sdk/jme3-core/src/com/jme3/gde/core/sceneexplorer/nodes/actions/UseToolAction.java b/sdk/jme3-core/src/com/jme3/gde/core/sceneexplorer/nodes/actions/UseToolAction.java
index 67faae673..49d6117e4 100644
--- a/sdk/jme3-core/src/com/jme3/gde/core/sceneexplorer/nodes/actions/UseToolAction.java
+++ b/sdk/jme3-core/src/com/jme3/gde/core/sceneexplorer/nodes/actions/UseToolAction.java
@@ -61,7 +61,7 @@ public class UseToolAction extends AbstractAction implements Presenter.Popup {
public JMenuItem getPopupPresenter() {
JMenu result = new JMenu("Tools..");
for (ToolAction di : Lookup.getDefault().lookupAll(ToolAction.class)) {
- if(exNode.getClass().isAssignableFrom(di.getNodeClass())){
+ if(di.getNodeClass().isAssignableFrom(exNode.getClass())){
result.add(new JMenuItem(di.getAction(exNode, dataObject)));
}
}
diff --git a/sdk/jme3-core/src/com/jme3/gde/core/sceneexplorer/nodes/actions/impl/GenerateTangentsTool.java b/sdk/jme3-core/src/com/jme3/gde/core/sceneexplorer/nodes/actions/impl/GenerateTangentsTool.java
index fdbd362bc..15809afdd 100644
--- a/sdk/jme3-core/src/com/jme3/gde/core/sceneexplorer/nodes/actions/impl/GenerateTangentsTool.java
+++ b/sdk/jme3-core/src/com/jme3/gde/core/sceneexplorer/nodes/actions/impl/GenerateTangentsTool.java
@@ -52,7 +52,7 @@ public class GenerateTangentsTool extends AbstractToolAction {
}
@Override
- protected boolean doApplyTool(AbstractSceneExplorerNode rootNode) {
+ protected Object doApplyTool(AbstractSceneExplorerNode rootNode) {
Geometry geom = rootNode.getLookup().lookup(Geometry.class);
Mesh mesh = geom.getMesh();
if (mesh != null) {
@@ -62,7 +62,7 @@ public class GenerateTangentsTool extends AbstractToolAction {
}
@Override
- protected void doUndoTool(AbstractSceneExplorerNode rootNode) {
+ protected void doUndoTool(AbstractSceneExplorerNode rootNode, Object undoObject) {
Geometry geom = rootNode.getLookup().lookup(Geometry.class);
Mesh mesh = geom.getMesh();
if (mesh != null) {
diff --git a/sdk/jme3-core/src/com/jme3/gde/core/sceneexplorer/nodes/actions/impl/OptimizeGeometry.java b/sdk/jme3-core/src/com/jme3/gde/core/sceneexplorer/nodes/actions/impl/OptimizeGeometry.java
new file mode 100644
index 000000000..fbd6c01fb
--- /dev/null
+++ b/sdk/jme3-core/src/com/jme3/gde/core/sceneexplorer/nodes/actions/impl/OptimizeGeometry.java
@@ -0,0 +1,69 @@
+/*
+ * Copyright (c) 2009-2010 jMonkeyEngine
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are
+ * met:
+ *
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ *
+ * * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * * Neither the name of 'jMonkeyEngine' nor the names of its contributors
+ * may be used to endorse or promote products derived from this software
+ * without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
+ * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
+ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+ * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+ * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+ * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+ * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+ * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+package com.jme3.gde.core.sceneexplorer.nodes.actions.impl;
+
+import com.jme3.gde.core.sceneexplorer.nodes.AbstractSceneExplorerNode;
+import com.jme3.gde.core.sceneexplorer.nodes.JmeSpatial;
+import com.jme3.gde.core.sceneexplorer.nodes.actions.AbstractToolAction;
+import com.jme3.gde.core.sceneexplorer.nodes.actions.ToolAction;
+import com.jme3.scene.Spatial;
+import jme3tools.optimize.GeometryBatchFactory;
+
+/**
+ *
+ * @author normenhansen
+ */
+@org.openide.util.lookup.ServiceProvider(service = ToolAction.class)
+public class OptimizeGeometry extends AbstractToolAction {
+
+ public OptimizeGeometry() {
+ name = "Optimize Geometry";
+ }
+
+ @Override
+ protected Object doApplyTool(AbstractSceneExplorerNode rootNode) {
+ Spatial geom = rootNode.getLookup().lookup(Spatial.class);
+ GeometryBatchFactory.optimize(geom);
+ return true;
+ }
+
+ @Override
+ protected void doUndoTool(AbstractSceneExplorerNode rootNode, Object undoObject) {
+// Spatial geom = rootNode.getLookup().lookup(Spatial.class);
+// geom.removeFromParent();
+ }
+
+ public Class> getNodeClass() {
+ return JmeSpatial.class;
+ }
+
+}