jME3 is similar to Swing in that for speed and efficiency all changes to the world must be made in a single update thread. This is handled automatically for you if using Controllers or simpleUpdate however whenever you pass work to another thread you need to hand the results back to the main jME3 thread before making any changes to the scene graph.
</p>
<pre> public void rotateGeography(final Geography goe, final Quaternian rot) {
mainApp.enqueue(new Callable<Spatial>() {
public Spatial call() throws Exception {
return geo.rotate(rot);
}
});
}</pre>
<p>
Note that this example does not fetch the returned value by calling <code>get()</code> on the Future object returned from <code>enqueue()</code>. This means that the example method <code>rotateGeography()</code> will return immediately and will not wait for the rotation to be processed before continuing.
</p>
<p>
If the processing thread needs to wait or needs the return value then <code>get()</code> or the other methods in the returned Future object such as <code>isDone()</code> can be used.
</p>
</div>
<!-- EDIT1 SECTION "The jME3 Threading Model" [1-1116] -->
<h1><a>Multithreading Optimization</a></h1>
<div>
@ -20,7 +47,7 @@ Effectively, each for-loop in the main update loop might be a chance for multith
@ -204,34 +231,7 @@ private Callable<MyWayList> findWay = new Callable<MyWayList>(&#
};</pre>
</div>
<!-- EDIT7 SECTION "The Callable" [6409-8776] -->
<h3><a>The jME3 Threading Model</a></h3>
<div>
<p>
jME3 is similar to Swing in that for speed and efficiency all changes to the world must be made in a single update thread. This is handled automatically for you if using Controllers or simpleUpdate however whenever you pass work to another thread you need to hand the results back to the main jME3 thread before making any changes to the scene graph.
</p>
<pre> public void rotateGeography(final Geography goe, final Quaternian rot) {
mainApp.enqueue(new Callable<Spatial>() {
public Spatial call() throws Exception {
return geo.rotate(rot);
}
});
}</pre>
<p>
Note that this example does not fetch the returned value by calling <code>get()</code> on the Future object returned from <code>enqueue()</code>. This means that the example method <code>rotateGeography()</code> will return immediately and will not wait for the rotation to be processed before continuing.
</p>
<p>
If the processing thread needs to wait or needs the return value then <code>get()</code> or the other methods in the returned Future object such as <code>isDone()</code> can be used.
</p>
</div>
<!-- EDIT8 SECTION "The jME3 Threading Model" [8777-9892] -->
<!-- EDIT8 SECTION "The Callable" [7525-9891] -->
<h2><a>Conclusion</a></h2>
<div>
@ -250,5 +250,5 @@ The cool thing about this approach is that every entity creates one self-contain
@ -226,12 +226,10 @@ Activating the nbandroid plugin in the jMonkeyEngine <acronym title="Software De
</li>
<li><div> To sign your application, edit the mobile/build.properties file to point at valid keystore files.</div>
</li>
<li><div> If you get a FileNotFoundException for MANIFEST.FM when compiling with Android <acronymtitle="Software Development Kit">SDK</acronym> Rev. 20 you need to copy and paste mobile/AndroidManifest.xml to mobile/MANIFEST.MF (<objectclassid="java:org.netbeans.modules.javahelp.BrowserDisplayer"><paramname="content"value="http://jmonkeyengine.org/groups/android/forum/topic/issues-building-with-android-sdk-rev-20/"><paramname="text"value="<html><u>http://jmonkeyengine.org/groups/android/forum/topic/issues-building-with-android-sdk-rev-20/</u></html>"><paramname="textColor"value="blue"></object>)</div>
@ -135,12 +135,16 @@ jMonkeyEngine <acronym title="Software Development Kit">SDK</acronym> allows you
</li>
</ol>
<p>
A <code>resources</code> folder in your project folder will be created that contains the template icons and settings files for each selected platform. If you change one of them, de-selecting the deployment for that platform will not delete this resource file anymore and it will not be overwritten when you re-enable deployment for that platform.
</p>
<p>
When you build your project, zip files for each selected platform will be created in the <code>dist</code> folder that contain all that is needed to run your application on that platform.