clearListeners() </td><td>Adds or removes listeners to receive animation related events.</td>
</tr>
</table></div>
<!-- EDIT1 TABLE [4347-4816] --><div><table>
<!-- EDIT8 TABLE [4347-4816] --><div><table>
<tr>
<th>AnimControl Property</th><th>Usage</th>
</tr>
@ -173,7 +173,7 @@ removeAnim(boneAnim)</td><td>Adds or removes an animation from this Control.</td
<td>getAnimationLength("anim")</td><td>Returns the length of the given named animation in seconds</td>
</tr>
</table></div>
<!-- EDIT2 TABLE [4818-5378] --><div><table>
<!-- EDIT9 TABLE [4818-5378] --><div><table>
<tr>
<th>AnimControl Property</th><th>Usage</th>
</tr>
@ -187,9 +187,9 @@ removeAnim(boneAnim)</td><td>Adds or removes an animation from this Control.</td
<td>getAttachmentsNode("bone")</td><td>Returns the attachment node of a bone. Attach models and effects to this node to make them follow this bone's motions.</td>
</tr>
</table></div>
<!-- EDIT3 TABLE [5380-5695] -->
<!-- EDIT10 TABLE [5380-5695] -->
</div>
<!-- EDIT7 SECTION "Animation Control Properties" [4245-5697] -->
<h2><a>Animation Channel Properties</a></h2>
<div>
@ -218,7 +218,7 @@ The following properties are set per AnimChannel.
<td>setTime(1.3f); </td><td> Fast-forward or rewind to a certain moment in time of this animation. </td>
</tr>
</table></div>
<!-- EDIT4 TABLE [5791-6415] -->
<!-- EDIT12 TABLE [5791-6415] -->
<p>
The following information is available for a channel.
@ -244,7 +244,7 @@ The following information is available for a channel.
<td>getControl()</td><td>The AnimControl that belongs to this AnimChannel.</td>
</tr>
</table></div>
<!-- EDIT5 TABLE [6472-7105] -->
<!-- EDIT13 TABLE [6472-7105] -->
<p>
Use the following methods to add or remove individual bones to an AnimChannel. This is useful when you play two animations in parallel on two channels, and each controls a subset of the bones (e.g. one the arms, and the other the legs).
@ -270,9 +270,9 @@ addToRootBone(bone1) </td><td>Add a series of bones to be influenced by this ani
addFromRootBone(bone1) </td><td>Add a series of bones to be influenced by this animation channel: Add all bones, starting from the given root bone, going towards the children bones.</td>
@ -290,14 +290,14 @@ Animations are played by channel. <strong>Note:</strong> Whether the animation c
The float value specifies the time how long the animation should overlap with the previous one on this channel. If set to 0f, then no blending will occur and the new animation will be applied instantly.</td>
</tr>
</table></div>
<!-- EDIT7 TABLE [8154-8480] -->
<!-- EDIT16 TABLE [8154-8480] -->
<p>
<strong>Tip:</strong> Use the AnimEventLister below to react at the end or start of an animation cycle.
@ -69,7 +69,7 @@ There are other obvious getters to poll the status of corresponding setters belo
<td>setPitch(1)</td><td>Makes the sound play in a higher or lower pitch. Default is 1. 2 is twice as high, .5f is half as high. </td>
</tr>
</table></div>
<!-- EDIT2 TABLE [1368-1617] --><div><table>
<!-- EDIT6 TABLE [1368-1617] --><div><table>
<tr>
<th>AudioNode Method</th><th>Usage</th>
</tr>
@ -91,7 +91,7 @@ setDirectional(false)</td><td>All 3D effects switched off. This sound is global
<td>setMaxDistance(100f)</td><td>Maximum distance the sound can be heard, in world units. Default is 20.</td>
</tr>
</table></div>
<!-- EDIT3 TABLE [1619-2353] --><div><table>
<!-- EDIT7 TABLE [1619-2353] --><div><table>
<tr>
<th>AudioNode Method</th><th>Usage</th>
</tr>
@ -103,7 +103,7 @@ setLocalTranslation(…)</td><td>Activates 3D audio: The sound appears to come f
<td>setReverbEnabled(true)</td><td>A 3D echo effect that only makes sense to use with positional AudioNodes. The reverb effect is influenced by the environment that the audio renderer is in. See "Setting Environment Properties" below. </td>
</tr>
</table></div>
<!-- EDIT4 TABLE [2355-2827] --><div><table>
<!-- EDIT8 TABLE [2355-2827] --><div><table>
<tr>
<th>AudioNode Method</th><th>Usage</th>
</tr>
@ -116,9 +116,9 @@ setDirection(…) </td><td>Activates 3D audio: This sound can only be heard from
setOuterAngle()</td><td>Set the angle in degrees for the directional audio. The angle is relative to the direction. Note: By default, both angles are 360° and the sound can be heard from all directions!</td>
A sound engineer can create a custom <code>com.jme3.audio.Environment</code> object and specify custom environment factors. You can find many <ahref="/com/jme3/gde/core/docs/jme3/advanced/audio_environment_presets.html">examples of audio environment presets</a> here. Activate your custom environment settings in the Environment constructor:
@ -209,4 +209,5 @@ You can find more info about OpenAL and its advanced features here: <object clas
@ -15,7 +15,7 @@ Those images gives an idea of what bloom does. The left image has no bloom effec
</p>
</div>
<!-- EDIT1 SECTION "Bloom and Glow" [1-484] -->
<h1><a>Bloom Usage</a></h1>
<div>
<ol>
@ -53,14 +53,14 @@ Here are the parameters that you can tweak :
<td> bloom intensity </td><td><code>setBloomIntensity(float)</code></td><td>2.0f </td><td> the resulting bloom value is multiplied by this intensity </td>
</tr>
</table></div>
<!-- EDIT1 TABLE [865-1454] -->
<!-- EDIT3 TABLE [865-1454] -->
<p>
You'll probably need to adjust those parameters depending on your scene.
</p>
</div>
<!-- EDIT2 SECTION "Bloom Usage" [485-1529] -->
<h1><a>Bloom with a glow map</a></h1>
<div>
@ -135,7 +135,7 @@ Here is the result : <br/>
</p>
</div>
<!-- EDIT4 SECTION "Bloom with a glow map" [1530-3231] -->
<h1><a>Bloom with a glow color</a></h1>
<div>
@ -177,7 +177,7 @@ Here is the result on Oto's plasma ball (before and after) : <br/>
</p>
</div>
<!-- EDIT5 SECTION "Bloom with a glow color" [3232-4239] -->
<h1><a>Hints and tricks</a></h1>
<div>
@ -286,4 +286,5 @@ If you are using a glow color, set it to black
<!-- EDIT1 SECTION "Multithreading Bullet Physics in jme3" [1-53] -->
<h2><a>Introduction</a></h2>
<div>
@ -13,7 +13,7 @@ Since bullet is not (yet) multithreaded or GPU accelerated, the jME3 implementat
</p>
</div>
<!-- EDIT2 SECTION "Introduction" [54-261] -->
<h2><a>How is it handled in jme3 and bullet?</a></h2>
<div>
@ -48,7 +48,7 @@ Now the physics update happens in parallel to render(), that is, after the user&
<td>Physics Debug View is rendered inaccurately (out of sync)</td><td>Physics Debug View is rendered accurately.</td>
</tr>
</table></div>
<!-- EDIT1 TABLE [1202-1424] -->
<!-- EDIT4 TABLE [1202-1424] -->
<p>
<p><div>You can add more physics spaces by using multiple PARALLEL bulletAppStates. You would do that if you have sets physical objects that never collide (for example, underground bolders and flying cannon balls above ground), so you put those into separate physics spaces, which improves performances (less collisions to check!).
@ -61,4 +61,5 @@ Now the physics update happens in parallel to render(), that is, after the user&
</span></div>
</div>
<!-- EDIT3 SECTION "How is it handled in jme3 and bullet?" [262-] -->
@ -82,13 +82,13 @@ The camera object is created with the following defaults:
<td>cam.getScreenCoordinates()</td><td>?</td>
</tr>
</table></div>
<!-- EDIT1 TABLE [583-1858] -->
<!-- EDIT3 TABLE [583-1858] -->
<p>
<strong>Tip:</strong> After you change view port, frustum, or frame, call <code>cam.update();</code>
</p>
</div>
<!-- EDIT2 SECTION "Default Camera" [32-1940] -->
<h2><a>FlyBy Camera</a></h2>
<div>
@ -114,9 +114,9 @@ The flyby camera is an AppState that extends the default camera in com.jme3.app.
<td>flyCam.setDragToRotate(true)</td><td>Forces the player to keep mouse button pressed to rotate camera, typically used for Applets. If false (default), all mouse movement will be captured and interpreted as rotations.</td>
<td>chaseCam.setDefaultHorizontalRotation(-FastMath.PI/2);</td><td>The default horizontal rotation angle of the camera around the target at the start of the application.</td>
<td>cinematic.pause()</td><td>Pauses the cinematic.</td>
</tr>
</table></div>
<!-- EDIT1 TABLE [2215-2427] -->
<!-- EDIT4 TABLE [2215-2427] -->
</div>
<!-- EDIT3 SECTION "How to Use a Cinematic" [1124-2428] -->
<h2><a>Tracks (CinematicEvents)</a></h2>
<div>
@ -126,14 +126,14 @@ Here is the list of available CinematicEvents that you use as tracks. Each track
<td>AnimationTrack</td><td>Use this to start playing a model <ahref="/com/jme3/gde/core/docs/jme3/advanced/animation.html">animation</a> at a given time (a character walking animation for example)</td>
</tr>
</table></div>
<!-- EDIT2 TABLE [2723-4144] -->
<!-- EDIT6 TABLE [2723-4144] -->
<p>
The jMonkey team can add more types of tracks, just ask in the forum.
@ -197,14 +197,14 @@ To create a MotionTrack, do the following:
<td>track.setRotation(quaternion)</td><td>Sets the rotation. Use together with <code>MotionTrack.Direction.Rotation</code> or <code>MotionTrack.Direction.PathAndRotation</code>.</td>
</tr>
</table></div>
<!-- EDIT3 TABLE [4701-6109] -->
<!-- EDIT8 TABLE [4701-6109] -->
<p>
<strong>Tip:</strong> Most likely you remote-control more than one object in your scene. Give the tracks and paths useful names such as <code>dragon_track</code>, <code>dragon_path</code>, <code>hero_track</code>, <code>hero_path</code>, etc.
</p>
</div>
<!-- EDIT7 SECTION "MotionTrack" [4219-6305] -->
<h3><a>PositionTrack</a></h3>
<div>
@ -236,7 +236,7 @@ The start location is always the current location of the Spatial.
@ -129,7 +129,7 @@ False: Do not wait on a final state, chain combo steps. (?) <br/>
True: This is the final state, do not chain combo steps. (?)</td>
</tr>
</table></div>
<!-- EDIT1 TABLE [3096-4090] -->
<!-- EDIT6 TABLE [3096-4090] -->
<p>
The <code>press()</code> and <code>notPress()</code> methods accept sets of Input Triggers, e.g. <code>fireball.press("A","B","C").done()</code>.
@ -153,9 +153,9 @@ The following getters give you more information about the game state:
<td>getPriority()</td><td>Returns the priority of this move</td>
</tr>
</table></div>
<!-- EDIT2 TABLE [4283-4489] -->
<!-- EDIT7 TABLE [4283-4489] -->
</div>
<!-- EDIT5 SECTION "ComboMove Class Methods" [3002-4490] -->
@ -44,14 +44,14 @@ Includes buttons, effects, controls. <br/>
Supports <acronymtitle="Extensible Markup Language">XML</acronym> and Java layouts.</td><td>Steeper learning curve.</td>
</tr>
</table></div>
<!-- EDIT1 TABLE [834-1259] -->
<!-- EDIT2 TABLE [834-1259] -->
<p>
Using the <acronymtitle="Graphical User Interface">GUI</acronym> Node is the default approach in jme3 to create simple HUDs. If you just quickly want to display a line of text, or a simple icon on the screen, use the no-frills <acronymtitle="Graphical User Interface">GUI</acronym> Node, it's easier.
In your IDE, use code completion to quickly look up Trigger literals. In the jMonkeyEngine <acronymtitle="Software Development Kit">SDK</acronym> for example, press ctrl-space or ctrl-/ after <code>KeyInput.|</code> to choose from the list of all keys.
@ -153,9 +153,9 @@ In your IDE, use code completion to quickly look up Trigger literals. In the jMo
<td>INPUT_MAPPING_EXIT</td><td>KEY_ESCAPE</td><td>Closes the application by calling <code>stop();</code>. Typically you do not remove this, unless you replace it by another way of quitting gracefully.</td>
@ -292,7 +292,7 @@ As you see, you can add several listeners in one String array. You can call the
</p>
</div>
<!-- EDIT10 SECTION "4. Register Mappings to Listeners" [6666-7914] -->
<h2><a>5. Implement Actions in Listeners</a></h2>
<div>
@ -312,7 +312,7 @@ Make use of the distinction between <code>if</code> and <code>else if</code> in
</ul>
</div>
<!-- EDIT11 SECTION "5. Implement Actions in Listeners" [7915-8650] -->
<h3><a>ActionListener</a></h3>
<div>
@ -320,7 +320,7 @@ Make use of the distinction between <code>if</code> and <code>else if</code> in
In the most common case, you want an action to be triggered once, in the moment when the button or key trigger is released. For example, when the player presses a key to open a door, or clicks to pick up an item. For these cases, use an ActionListener and test for <code>&& !keyPressed</code>, like shown in the following example.
</p>
<pre>private ActionListener(){
<pre>private ActionListener actionListener = new ActionListener(){
public void onAction(String name, boolean keyPressed, float tpf){
if (name.equals("Pause Game")&& !keyPressed){ // test?
@ -333,7 +333,7 @@ In the most common case, you want an action to be triggered once, in the moment
@ -12,7 +12,7 @@ If you want to colorize simple shapes (one texture all around), then .j3m are th
</p>
</div>
<!-- EDIT1 SECTION "Saving and Loading Materials with .j3m Files" [1-753] -->
<h2><a>Writing the .j3m File</a></h2>
<div>
<ol>
@ -66,7 +66,7 @@ How to this file is structured:
</p>
</div>
<!-- EDIT2 SECTION "Writing the .j3m File" [754-2349] -->
<h2><a>How to Use .j3m Materials</a></h2>
<div>
@ -81,12 +81,12 @@ This is how you use the prepared .j3m Material on a Spatial. Since you have save
</p>
</div>
<!-- EDIT3 SECTION "How to Use .j3m Materials" [2350-2795] -->
<h2><a>Syntax Reference for .j3m Files</a></h2>
<div>
</div>
<!-- EDIT4 SECTION "Syntax Reference for .j3m Files" [2796-2840] -->
<h3><a>Paths</a></h3>
<div>
@ -105,7 +105,7 @@ Make sure to get the paths to the textures (.png, .jpg) and material definitions
</ul>
</div>
<!-- EDIT5 SECTION "Paths" [2841-3417] -->
<h3><a>Data Types</a></h3>
<div>
@ -180,9 +180,9 @@ All data types (except Color) are specified in com.jme3.shader.VarType.
<td> TextureArray</td><td></td><td> (Currently not supported in J3M) </td>
</tr>
</table></div>
<!-- EDIT1 TABLE [3565-4979] -->
<!-- EDIT7 TABLE [3565-4979] -->
</div>
<!-- EDIT6 SECTION "Data Types" [3418-4981] -->
<h3><a>Flip and Repeat Syntax</a></h3>
<div>
<ul>
@ -195,7 +195,7 @@ All data types (except Color) are specified in com.jme3.shader.VarType.
</ul>
</div>
<!-- EDIT8 SECTION "Flip and Repeat Syntax" [4982-5325] -->
<h3><a>Syntax for Additional Render States</a></h3>
<div>
<ul>
@ -244,14 +244,14 @@ See the <object classid="java:org.netbeans.modules.javahelp.BrowserDisplayer"><p
<td><objectclassid="java:org.netbeans.modules.javahelp.BrowserDisplayer"><paramname="content"value="http://jmonkeyengine.org/javadoc/com/jme3/material/RenderState.html#setPointSprite(boolean)"><paramname="text"value="<html><u>PointSprite</u></html>"><paramname="textColor"value="blue"></object></td><td>(Boolean)</td><td> Enable point sprite rendering for point meshes </td>
</tr>
</table></div>
<!-- EDIT2 TABLE [5617-7185] -->
<!-- EDIT10 TABLE [5617-7185] -->
</div>
<!-- EDIT9 SECTION "Syntax for Additional Render States" [5326-7187] -->
<li><div> In the source code, replace every occurence of a hard-coded message with the appropriate Resource Bundle call to its unique key: <pre>ResourceBundle.getBundle("Bundle").getString("greeting"));
<li><div> In the source code, replace every occurence of a hard-coded message with the appropriate Resource Bundle call to its unique key: <pre>System.out.print(ResourceBundle.getBundle("Bundle").getString("greeting"));
@ -23,7 +23,7 @@ There are two ways how the camera can do that:
</p>
</div>
<!-- EDIT1 SECTION "Making the Camera Follow a 3rd-Person Character" [1-989] -->
<h2><a>Code Samples</a></h2>
<div>
@ -38,7 +38,7 @@ Press the WASD or arrow keys to move. Drag with the left mouse button to rotate.
</ul>
</div>
<!-- EDIT2 SECTION "Code Samples" [990-1371] -->
<h2><a>Camera Node</a></h2>
<div>
@ -76,7 +76,7 @@ Example: Use with <a href="/com/jme3/gde/core/docs/jme3/advanced/physics.html">C
The camera's transformation is copied over the spatial's transformation. Use with first-person flyCam.</td>
</tr>
</table></div>
<!-- EDIT1 TABLE [2445-2956] -->
<!-- EDIT4 TABLE [2445-2956] -->
<p>
<strong>Code sample:</strong>
@ -87,7 +87,7 @@ The camera's transformation is copied over the spatial's transformatio
</ul>
</div>
<!-- EDIT3 SECTION "Camera Node" [1372-3197] -->
<h2><a>Chase Camera</a></h2>
<div>
@ -137,7 +137,7 @@ new KeyTrigger(KeyInput.KEY_SPACE))</td><td>Activate mutiple triggers for the ro
<td>setRotationSensitivity(5f)</td><td>How fast the camera rotates. Use values around <1.0f (all bigger values are ignored).</td>
</tr>
</table></div>
<!-- EDIT2 TABLE [3732-5144] -->
<!-- EDIT6 TABLE [3732-5144] -->
<p>
<strong>Code sample:</strong>
@ -148,7 +148,7 @@ new KeyTrigger(KeyInput.KEY_SPACE))</td><td>Activate mutiple triggers for the ro
</ul>
</div>
<!-- EDIT5 SECTION "Chase Camera" [3198-5387] -->
<h2><a>Which to Choose?</a></h2>
<div>
@ -171,6 +171,7 @@ What is the difference of the two code samples above?
<td>Drag-to-Rotate rotates the target and the camera. You always see the target from behind.</td><td>Drag-to-Rotate rotates only the camera. You can see the target from various sides.</td>
<td> Common/MatDefs/Misc/ShowNormals.j3md </td><td> A color gradient calculated from the model's surface normals. You can use this built-in material to debug the generation of normals in meshes, to preview models that have no material and no lights, or as fall-back default material. This built-in material has no parameters. </td>
</tr>
</table></div>
<!-- EDIT5 TABLE [10193-10564] -->
<!-- EDIT10 TABLE [10193-10564] -->
</div>
<!-- EDIT9 SECTION "Other: Test and Debug" [10160-10565] -->
<td>getAdditionalRenderState().setBlendMode(BlendMode.PremultAlpha);</td><td>Pre-multiplied alpha blending. E.g. if the color of the object has already been multiplied by its alpha, this is used instead of "Alpha" blend mode.</td><td>For use with Premult Alpha textures.</td>
</tr>
</table></div>
<!-- EDIT6 TABLE [10616-13066] -->
<!-- EDIT13 TABLE [10616-13066] -->
<p>
If the DiffuseMap has an alpha channel, use:
@ -332,7 +332,7 @@ Later, put the Geometry (not the Material!) in the appropriate render queue
@ -352,9 +352,9 @@ Later, put the Geometry (not the Material!) in the appropriate render queue
<td>getAdditionalRenderState().setFaceCullMode(FaceCullMode.FrontAndBack)</td><td>Cull both backfaces and frontfaces.</td><td>Use this as an efficient way to make an object temporarily invisible, while keeping all its other in-game properties (node attachment, collision shapes, interactions, etc) active.</td>
</tr>
</table></div>
<!-- EDIT7 TABLE [13385-14484] -->
<!-- EDIT15 TABLE [13385-14484] -->
</div>
<!-- EDIT14 SECTION "Culling" [13366-14485] -->
<h3><a>Miscellaneous</a></h3>
<div>
<div><table>
@ -368,7 +368,7 @@ Later, put the Geometry (not the Material!) in the appropriate render queue
<td>getAdditionalRenderState().setPolyOffset();</td><td>Enable polygon offset.</td><td>Use this when you have meshes that have triangles really close to each over (e.g. <objectclassid="java:org.netbeans.modules.javahelp.BrowserDisplayer"><paramname="content"value="http://en.wikipedia.org/wiki/Coplanarity"><paramname="text"value="<html><u>Coplanar</u></html>"><paramname="textColor"value="blue"></object>), it will shift the depth values to prevent <objectclassid="java:org.netbeans.modules.javahelp.BrowserDisplayer"><paramname="content"value="http://en.wikipedia.org/wiki/Z-fighting"><paramname="text"value="<html><u>Z-fighting</u></html>"><paramname="textColor"value="blue"></object>.</td>
You can register several types of listeners to be notified of changes.
@ -56,12 +56,12 @@ You can register several types of listeners to be notified of changes.
</ul>
</div>
<!-- EDIT2 SECTION "SpiderMonkey API Overview" [844-2388] -->
<h2><a>Client and Server</a></h2>
<div>
</div>
<!-- EDIT4 SECTION "Client and Server" [2389-2419] -->
<h3><a>Creating a Server</a></h3>
<div>
@ -96,7 +96,7 @@ When you run this app on a host, the server is ready to accept clients. Let'
</p>
</div>
<!-- EDIT5 SECTION "Creating a Server" [2420-3372] -->
<h3><a>Creating a Client</a></h3>
<div>
@ -135,7 +135,7 @@ When you run this client, it connects to the server.
</p>
</div>
<!-- EDIT6 SECTION "Creating a Client" [3373-4540] -->
<h3><a>Getting Info About a Client</a></h3>
<div>
@ -158,7 +158,7 @@ The server refers to a connected client as com.jme3.network.HostedConnection obj
<td>myServer.getConnection(0)</td><td>Server gets the first (0), second (1), etc, connected HostedConnection object (one client).</td>
</tr>
</table></div>
<!-- EDIT2 TABLE [4717-5096] -->
<!-- EDIT8 TABLE [4717-5096] -->
<p>
Your game can define its own game data based on whatever criteria you want, typically these include player ID and state. If the server needs to look up player/client-specific information, you can store this information directly on the HostedConnection object. The following examples read and write a custom Java object <code>MyState</code> in the HostedConnection object <code>conn</code>:
@ -175,14 +175,14 @@ Your game can define its own game data based on whatever criteria you want, typi
<td> MyState state = conn.getAttribute("MyState")</td><td> Server can read an attribute of the HostedConnection. </td>
</tr>
</table></div>
<!-- EDIT3 TABLE [5471-5700] -->
<!-- EDIT9 TABLE [5471-5700] -->
</div>
<!-- EDIT7 SECTION "Getting Info About a Client" [4541-5701] -->
<h2><a>Messaging</a></h2>
<div>
</div>
<!-- EDIT10 SECTION "Messaging" [5702-5724] -->
<h3><a>Creating Message Types</a></h3>
<div>
@ -203,7 +203,7 @@ You must register each message type to the com.jme3.network.serializing.Serializ
<!-- EDIT12 SECTION "Responding to Messages" [6678-8422] -->
<h3><a>Creating and Sending Messages</a></h3>
<div>
@ -297,7 +297,7 @@ The last two broadcasting methods use com.jme3.network.Filters to select a subse
</p>
</div>
<!-- EDIT13 SECTION "Creating and Sending Messages" [8423-9509] -->
<h2><a>Identification and Rejection</a></h2>
<div>
@ -328,7 +328,7 @@ A server has a game version and game name property. Each client expects to commu
<td> myClient.getVersion() </td><td> Client queries the version of the server it is connected to. </td>
</tr>
</table></div>
<!-- EDIT4 TABLE [10101-10470] -->
<!-- EDIT15 TABLE [10101-10470] -->
<p>
<p><div>Typically, your networked game defines its own attributes (such as player ID) based on whatever criteria you want. If you want to look up player/client-specific information beyond the game version, you can set this information directly on the Client/HostedConnection object (see Getting Info About a Client).
@ -336,12 +336,12 @@ A server has a game version and game name property. Each client expects to commu
</p>
</div>
<!-- EDIT14 SECTION "Identification and Rejection" [9510-10798] -->
<h2><a>Closing Clients and Server Cleanly</a></h2>
<div>
</div>
<!-- EDIT16 SECTION "Closing Clients and Server Cleanly" [10799-10845] -->
<h3><a>Closing a Client</a></h3>
<div>
@ -357,7 +357,7 @@ You must override the client's destroy() method to close the connection cle
}</pre>
</div>
<!-- EDIT17 SECTION "Closing a Client" [10846-11121] -->
<h3><a>Closing a Server</a></h3>
<div>
@ -373,7 +373,7 @@ You must override the server's destroy() method to close the connection whe
}</pre>
</div>
<!-- EDIT18 SECTION "Closing a Server" [11122-11378] -->
<h3><a>Kicking a Client</a></h3>
<div>
@ -384,7 +384,7 @@ The server can kick a HostedConnection to make it disconnect. You should provide
<!-- EDIT19 SECTION "Kicking a Client" [11379-11769] -->
<h2><a>Listening to Connection Notification</a></h2>
<div>
@ -394,7 +394,7 @@ The server and clients are notified about connection changes.
</p>
</div>
<!-- EDIT20 SECTION "Listening to Connection Notification" [11770-11881] -->
<h3><a>ClientStateListener</a></h3>
<div>
@ -414,7 +414,7 @@ The com.jme3.network.ClientStateListener notifies the Client when the Client has
<td> public void clientDisconnected(Client c, DisconnectInfo info){} </td><td> Implement here what happens after the server kicks this client. For example, display the DisconnectInfo to the user. </td>
</tr>
</table></div>
<!-- EDIT5 TABLE [12124-12494] -->
<!-- EDIT22 TABLE [12124-12494] -->
<p>
First implement the ClientStateListener interface in the Client class. Then register it to myClient in MyGameClient's simeplInitApp() method:
@ -422,7 +422,7 @@ First implement the ClientStateListener interface in the Client class. Then regi
@ -442,7 +442,7 @@ The com.jme3.network.ConnectionListener notifies the Server whenever new HostedC
<td> public void connectionRemoved(Server s, HostedConnection c){} </td><td> Implement here what happens after a HostedConnection has left. E.g. a player has quit the game and the server removes his character. </td>
</tr>
</table></div>
<!-- EDIT6 TABLE [12962-13360] -->
<!-- EDIT24 TABLE [12962-13360] -->
<p>
First implement the ConnectionListener interface in the Server class. Then register it to myServer in MyGameServer's simpleInitApp() method.
@ -451,7 +451,7 @@ First implement the ConnectionListener interface in the Server class. Then regis
@ -52,7 +52,7 @@ When the player switches between game states, you detach one set of AppStates, a
</p>
</div>
<!-- EDIT2 SECTION "Switch Game States" [507-2043] -->
<h2><a>Get Access to Application and Update Loop</a></h2>
<div>
@ -105,7 +105,7 @@ public StartScreenState(SimpleApplication app){
}</pre>
</div>
<!-- EDIT3 SECTION "Get Access to Application and Update Loop" [2044-3599] -->
<h2><a>Know Your Variables</a></h2>
<div>
<div><table>
@ -125,14 +125,14 @@ public StartScreenState(SimpleApplication app){
<td>${PROP.key}</td><td> looks up <code>key</code> in the Nifty properties. Use Nifty.setGlobalproperties(properties) and Nifty.getGlobalproperties("key"). Or SystemGetProperties(key);</td>
</tr>
</table></div>
<!-- EDIT1 TABLE [3632-4163] -->
<!-- EDIT5 TABLE [3632-4163] -->
<p>
See also: <objectclassid="java:org.netbeans.modules.javahelp.BrowserDisplayer"><paramname="content"value="http://sourceforge.net/apps/mediawiki/nifty-gui/index.php?title=MarkUp"><paramname="text"value="<html><u>http://sourceforge.net/apps/mediawiki/nifty-gui/index.php?title=MarkUp</u></html>"><paramname="textColor"value="blue"></object>
</p>
</div>
<!-- EDIT4 SECTION "Know Your Variables" [3600-4246] -->
<h2><a>Use ScreenControllers for Mutally Exclusive Functionality</a></h2>
<div>
@ -152,7 +152,7 @@ For example, create a <code>MyHudScreen.java</code> for the <code>hud</code> scr
@ -49,7 +49,7 @@ Choose one of the following mesh shapes
</ul>
</div>
<!-- EDIT2 SECTION "Create an Emitter" [845-1473] -->
<h2><a>Configure Parameters</a></h2>
<div>
@ -115,13 +115,13 @@ false = Particles fly straight like you drew them in the sprite texture (e.g. in
<td> start area </td><td><code>setShape(new EmitterSphereShape( Vector3f.ZERO, 2f));</code></td><td>EmitterPointShape()</td><td>By default, particles are emitted from the emitters location (a point). You can increase the emitter shape to occupy a sphere, so that the start point of new particles can be anywhere inside the sphere, which makes the effect a bit more irregular.</td>
</tr>
</table></div>
<!-- EDIT1 TABLE [1638-5412] -->
<!-- EDIT4 TABLE [1638-5412] -->
<p>
Build up you effect by specifying one parameter after the other. If you change several parameters at the same time, it's difficult to tell which of the values caused which outcome.
<strong>Tip:</strong> Use the <code>setStartColor()</code>/<code>setEndColor()</code> settings described above to colorize the white and gray parts of textures.
@ -173,7 +173,7 @@ Disc-shaped objects like wheels, plates. </td>
<td> PlaneCollisionShape() </td><td> A 2D plane. Very fast. </td><td> Flat solid floor or wall. </td>
</tr>
</table></div>
<!-- EDIT1 TABLE [4303-5700] -->
<!-- EDIT6 TABLE [4304-5701] -->
<p>
All non-mesh CollisionShapes can be used for dynamic, kinematic, as well as static Spatials. (Code samples see below)
@ -200,7 +200,7 @@ All non-mesh CollisionShapes can be used for dynamic, kinematic, as well as stat
<strong>Limitations:</strong> Requires heightmap data. Collisions between two mesh-accurate shapes cannot be detected, only non-mesh shapes can collide with this shape.</td><td>Static terrains.</td>
</tr>
</table></div>
<!-- EDIT2 TABLE [5821-7338] -->
<!-- EDIT7 TABLE [5822-7339] -->
<p>
The mesh-accurate shapes can use a CollisionShapeFactory as constructor (code samples see below).
@ -217,7 +217,7 @@ The mesh-accurate shapes can use a CollisionShapeFactory as constructor (code sa
</p>
</div>
<!-- EDIT5 SECTION "Create a CollisionShape" [3846-8009] -->
<h3><a>CollisionShape Code Samples</a></h3>
<div>
<ul>
@ -248,7 +248,7 @@ The mesh-accurate shapes can use a CollisionShapeFactory as constructor (code sa
<td>GhostControl</td><td>Use for collision and intersection detection between physical objects. A GhostControl itself is <em>non-solid</em> and invisible. GhostControl moves with the Spatial it is attached to. Use GhostControls to <ahref="/com/jme3/gde/core/docs/jme3/advanced/physics_listeners.html">implement custom game interactions</a> by adding it to a visible Geometry. </td><td>A monster's "aggro radius", CharacterControl collisions, motion detectors, photo-electric alarm sensors, poisonous or radioactive perimeters, life-draining ghosts, etc. </td>
@ -284,14 +284,14 @@ PhysicsVehicleWheel</td><td> Special Control used for <a href="/com/jme3/gde/cor
<td>RagDollControl</td><td>Special Control used for <ahref="/com/jme3/gde/core/docs/jme3/advanced/ragdoll.html">collapsing, flailing, or falling characters</a></td><td>Falling persons, animals, robots, "Rag dolls"</td>
</tr>
</table></div>
<!-- EDIT4 TABLE [10508-11020] -->
<!-- EDIT11 TABLE [10509-11021] -->
<p>
Click the links for details on the special PhysicsControls. This article is about RigidBodyControl.
<!-- EDIT19 SECTION "Kinematic vs Dynamic vs Static" [16870-19271] -->
<h2><a>Forces: Moving Dynamic Objects</a></h2>
<div>
@ -572,7 +572,7 @@ Use the following methods to move dynamic physical objects.
<td> clearForces()</td><td>Cancels out all forces (force, torque) etc and stops the motion.</td>
</tr>
</table></div>
<!-- EDIT8 TABLE [19376-20365] -->
<!-- EDIT22 TABLE [19377-20366] -->
<p>
<p><div>It is technically possible to position PhysicsControls using setLocalTranslation(), e.g. to place them in their start position in the scene. However you must be very careful not to cause an "impossible state" where one physical object overlaps with another! Within the game, you typically use the setters shown here exclusively.
@ -612,7 +612,7 @@ removeCollideWithGroup(COLLISION_GROUP_01)</td><td>Collision Groups are integer
<td> setCcdSweptSphereRadius(.5f)</td><td>Bullet does not use the full collision shape for continuous collision detection, insteadit uses a "swept sphere" shape to approximate a motion. Only relevant for fast moving dynamic bodies. (?) </td>
</tr>
</table></div>
<!-- EDIT9 TABLE [20783-22588] -->
<!-- EDIT23 TABLE [20784-22589] -->
<p>
<p><div> You can <code>setApplyPhysicsLocal(true)</code> for an object to make it move relatively to its local physics space. You would do that if you need a physics space that moves with a node (e.g. a spaceship with artificial gravity surrounded by zero-g space). By default, it's set to false, and all movement is relative to the world.
@ -620,7 +620,7 @@ removeCollideWithGroup(COLLISION_GROUP_01)</td><td>Collision Groups are integer
<h3><a>When (Not) to Use Collision Listener</a></h3>
<div>
@ -155,7 +155,7 @@ If however you want to respond to a collision event (com.jme3.bullet.collision.P
</ul>
</div>
<!-- EDIT9 SECTION "When (Not) to Use Collision Listener" [4897-5699] -->
<h3><a>How to Listen to Collisions</a></h3>
<div>
@ -194,7 +194,7 @@ After you identify the colliding nodes, specify the action to trigger when this
</p>
</div>
<!-- EDIT10 SECTION "How to Listen to Collisions" [5700-7311] -->
<h3><a>Reading Details From a PhysicsCollisionEvent</a></h3>
<div>
@ -226,13 +226,13 @@ getObjectB() </td><td> The two participants in the collision. You cannot kno
<td> getCombinedRestitution() </td><td> A float value representing the collision restitution (bounciness) </td>
</tr>
</table></div>
<!-- EDIT2 TABLE [7578-8263] -->
<!-- EDIT12 TABLE [7578-8263] -->
<p>
Note that after the collision method has been called the object is not valid anymore so you should copy any data you want to keep into local variables.
</p>
</div>
<!-- EDIT11 SECTION "Reading Details From a PhysicsCollisionEvent" [7312-8416] -->
<h3><a>Optional: Water Wave and Color Effects</a></h3>
<div>
@ -175,7 +175,7 @@ manager.loadTexture("Textures/wavenormals.png") )</td><td>This normal
<td>water.setNormalScale(0.5f)</td><td>Sets the normal scaling factors to apply to the normal map. The higher the value, the more small ripples will be visible on the waves.</td><td>1.0f</td>
</tr>
</table></div>
<!-- EDIT1 TABLE [4898-6062] --><div><table>
<!-- EDIT8 TABLE [4898-6062] --><div><table>
<tr>
<th> Water method example</th><th> Effects: Color</th><th>Default</th>
<td>water.setColorExtinction(new Vector3f(10f,20f,30f));</td><td>Sets At what depth the refraction color extincts. The three values are RGB (red, green, blue) in this order. Play with these parameters to "muddy" the water.</td><td>Vector3f(5f,20f,30f)</td>
</tr>
</table></div>
<!-- EDIT2 TABLE [6064-7068] --><div><table>
<!-- EDIT9 TABLE [6064-7068] --><div><table>
<tr>
<th> Water method example</th><th> Effects: Shore</th><th>Default</th>
manager.loadTexture("Textures/foam.png") )</td><td>This foam texture will be used with WrapMode.Repeat</td><td>"Common/MatDefs/Water/Textures/foam.jpg"</td>
</tr>
</table></div>
<!-- EDIT4 TABLE [7361-8006] --><div><table>
<!-- EDIT11 TABLE [7361-8006] --><div><table>
<tr>
<th> Water method example</th><th> Effects: Light</th><th>Default</th>
</tr>
@ -255,9 +255,9 @@ manager.loadTexture("Textures/foam.png") )</td><td>This foam texture w
<td>water.setReflectionMapSize(256)</td><td>Sets the size of the reflection map. The higher, the better the quality, but the slower the effect.</td><td>512</td>
</tr>
</table></div>
<!-- EDIT5 TABLE [8008-8923] -->
<!-- EDIT12 TABLE [8008-8923] -->
</div>
<!-- EDIT7 SECTION "Optional: Water Wave and Color Effects" [4732-8925] -->
@ -16,7 +16,7 @@ If you think you need to understand the scene graph concept better, please read
</p>
</div>
<!-- EDIT1 SECTION "Spatial" [1-934] -->
<h2><a>Node versus Geometry</a></h2>
<div>
@ -56,7 +56,7 @@ no mesh, no material.</td>
<th> Examples: </th><td> Box, sphere, player, building, terrain, vehicle, missiles, NPCs, etc… </td><td> rootNode, guiNode, audioNode, a custom vehicleNode or shipNode with passengers attached, etc. </td>
</tr>
</table></div>
<!-- EDIT1 TABLE [1151-2451] -->
<!-- EDIT3 TABLE [1151-2451] -->
<p>
<p><div>You never create a Spatial with <code><del>Spatial s = new Spatial();</del></code>! A Spatial is an abstract concept, like a mammal (there is no actual creature called "mammal" walking around here). You either create a Node or a Geometry object. Some methods however require a Spatial argument: This is because they are able to accept both Nodes and Geometries as arguments. In this case, you must <em>cast</em> a Node or Geometry to Spatial.
@ -64,7 +64,7 @@ no mesh, no material.</td>
</p>
</div>
<!-- EDIT2 SECTION "Node versus Geometry" [935-2905] -->
<h3><a>Mesh</a></h3>
<div>
@ -83,7 +83,7 @@ The polygon <a href="/com/jme3/gde/core/docs/jme3/advanced/mesh.html">Mesh</a> i
</ul>
</div>
<!-- EDIT4 SECTION "Mesh" [2906-3585] -->
<h2><a>How to Add Fields and Methods to a Spatial</a></h2>
<div>
@ -143,7 +143,7 @@ This is how you list all data keys that are already defined for one Spatial:
}</pre>
</div>
<!-- EDIT5 SECTION "How to Add Fields and Methods to a Spatial" [3586-5973] -->
<h2><a>How to Access a Named Sub-Mesh</a></h2>
<div>
@ -168,4 +168,5 @@ In the following example, the Node <code>house</code> is the loaded model. The s
private ActionListener actionListener = new ActionListener(){
public void onAction(String name, boolean keyPressed, float tpf){
if (name.equals("Walk")&& !keyPressed){
if (!channel.getAnimationName().equals("Walk")){
@ -93,7 +93,7 @@ public class HelloAnimation extends SimpleApplication
}</pre>
</div>
<!-- EDIT2 SECTION "Sample Code" [312-2738] -->
<h2><a>Creating and Loading Animated Models</a></h2>
<div>
@ -122,7 +122,7 @@ Don't forget to add a light source to make the material visible.
</p>
</div>
<!-- EDIT3 SECTION "Creating and Loading Animated Models" [2739-4159] -->
<h2><a>Animation Controler and Channel</a></h2>
<div>
@ -152,7 +152,7 @@ After you load the animated model, you register it to the Animation Controller.
...</pre>
</div>
<!-- EDIT4 SECTION "Animation Controler and Channel" [4160-4997] -->
<h2><a>Responding to Animation Events</a></h2>
<div>
@ -177,7 +177,7 @@ Add <code>implements AnimEventListener</code> to the class declaration. This int
}</pre>
</div>
<!-- EDIT5 SECTION "Responding to Animation Events" [4998-5885] -->
<h2><a>Trigger Animations After User Input</a></h2>
<div>
@ -221,7 +221,7 @@ Test for each action by name, and set the channel to the corresponding animation
<li><div> Optionally, use channel.setTime() to Fast-forward or rewind to a certain moment in time of this animation.</div>
</li>
</ul>
<pre> private ActionListener(){
<pre> private ActionListener actionListener = new ActionListener(){
public void onAction(String name, boolean keyPressed, float tpf){
if (name.equals("Walk")&& !keyPressed){
if (!channel.getAnimationName().equals("Walk")){
@ -233,7 +233,7 @@ Test for each action by name, and set the channel to the corresponding animation
};</pre>
</div>
<!-- EDIT6 SECTION "Trigger Animations After User Input" [5886-7774] -->
<h2><a>Exercises</a></h2>
<div>
@ -251,7 +251,7 @@ Make a mouse click trigger another animation sequence!
</li>
<li><div> Create a new key trigger mapping and action (see: <ahref="/com/jme3/gde/core/docs/jme3/beginner/hello_input_system.html">Hello Input</a>)</div>
</li>
<li><div> Tip: Do you want to find out what animation sequences are available in the model? Use: <pre>for (System.out.println(anim); }</pre>
<li><div> Tip: Do you want to find out what animation sequences are available in the model? Use: <pre>for (String anim : control.getAnimationNames()){ System.out.println(anim); }</pre>
</div>
</li>
</ol>
@ -302,7 +302,7 @@ Can you identify individual bones in the skeleton?
</p>
</div>
<!-- EDIT7 SECTION "Exercises" [7775-9642] -->
<h2><a>Conclusion</a></h2>
<div>
@ -332,4 +332,5 @@ See also: <object classid="java:org.netbeans.modules.javahelp.BrowserDisplayer">
@ -93,7 +93,7 @@ Build and run the code sample. You should see a green Ninja with a colorful teap
</p>
</div>
<!-- EDIT2 SECTION "Code Sample" [617-3227] -->
<h2><a>The Asset Manager</a></h2>
<div>
@ -132,7 +132,7 @@ This is just a suggested best practice, you can name the directories in the asse
</p>
</div>
<!-- EDIT3 SECTION "The Asset Manager" [3228-4057] -->
<h3><a>Loading Textures</a></h3>
<div>
@ -141,7 +141,7 @@ This is just a suggested best practice, you can name the directories in the asse
Place your textures in a subdirectory of <code>assets/Textures/</code>. Load the texture into the material before you set the Material. The following code sample is from the <code>simpleInitApp()</code> method and loads a simple wall model:
</p>
<pre>// Create a wall with a simple texture from test_data
Box(Vector3f.ZERO, 2.5f,2.5f,1.0f);
Box box = new Box(Vector3f.ZERO, 2.5f,2.5f,1.0f);
Spatial wall = new Geometry("Box", box );
@ -81,7 +81,7 @@ public class HelloAudio extends SimpleApplication {
}
/** Defining the "Shoot" action: Play a gun sound. */
private ActionListener(){
private ActionListener actionListener = new ActionListener(){
@Override
public void onAction(String name, boolean keyPressed, float tpf){
if (name.equals("Shoot")&& !keyPressed){
@ -104,7 +104,7 @@ When you run the sample, you should see a blue cube. You should hear a nature-li
</p>
</div>
<!-- EDIT2 SECTION "Sample Code" [478-3313] -->
<h2><a>Understanding the Code Sample</a></h2>
<div>
@ -122,7 +122,7 @@ Let's have a closer look at <code>initAudio()</code> to learn how to use <c
</p>
</div>
<!-- EDIT3 SECTION "Understanding the Code Sample" [3314-3923] -->
<h2><a>AudioNodes</a></h2>
<div>
@ -178,7 +178,7 @@ Here you make audio_nature a positional sound that comes from a certain place. F
</p>
</div>
<!-- EDIT4 SECTION "AudioNodes" [3924-6585] -->
<h2><a>Triggering Sound</a></h2>
<div>
@ -196,7 +196,7 @@ Let's have a closer look at <code>initKeys()</code>: As you learned in prev
Setting up the ActionListener should also be familiar from previous tutorials. You declare that, when the trigger (the mouse button) is pressed and released, you want to play a gun sound.
</p>
<pre> /** Defining the "Shoot" action: Play a gun sound. */
private ActionListener(){
private ActionListener actionListener = new ActionListener(){
@Override
public void onAction(String name, boolean keyPressed, float tpf){
if (name.equals("Shoot")&& !keyPressed){
@ -210,7 +210,7 @@ Since you want to be able to shoot fast repeatedly, so you do not want to wait f
@ -246,7 +246,7 @@ Apart from the looping boolean, another difference is where <code>play()</code>
</div>
</li>
<li><div> The gunshot sound, however, is triggered situationally, once, only as part of the <code>Shoot</code> input action that you defined in the ActionListener.<pre> /** Defining the "Shoot" action: Play a gun sound. */
private ActionListener(){
private ActionListener actionListener = new ActionListener(){
@Override
public void onAction(String name, boolean keyPressed, float tpf){
if (name.equals("Shoot")&& !keyPressed){
@ -259,7 +259,7 @@ Apart from the looping boolean, another difference is where <code>play()</code>
</ul>
</div>
<!-- EDIT6 SECTION "Ambient or Situational?" [8051-9286] -->
<h2><a>Buffered or Streaming?</a></h2>
<div>
@ -277,7 +277,7 @@ Typically, you stream long sounds, and buffer short sounds.
</p>
</div>
<!-- EDIT7 SECTION "Buffered or Streaming?" [9287-9709] -->
<h2><a>Play() or PlayInstance()?</a></h2>
<div>
<div><table>
@ -294,9 +294,9 @@ Typically, you stream long sounds, and buffer short sounds.
<td>The same sound cannot play twice at the same time.</td><td>The same sounds can play multiple times and overlap.</td>
</tr>
</table></div>
<!-- EDIT1 TABLE [9749-9993] -->
<!-- EDIT9 TABLE [9749-9993] -->
</div>
<!-- EDIT8 SECTION "Play() or PlayInstance()?" [9710-9994] -->
<h2><a>Your Ear in the Scene</a></h2>
<div>
@ -318,7 +318,7 @@ If you don't do that, the results of 3D audio will be quite random.
</p>
</div>
<!-- EDIT10 SECTION "Your Ear in the Scene" [9995-10697] -->
<h2><a>Global, Directional, Positional?</a></h2>
<div>
@ -345,7 +345,7 @@ In short, you must choose in every situation whether it makes sense for a sound
<td> gravity </td><td><code>setGravity()</code></td><td> 0,1,0 </td><td> Whether particles fall down (positive) or fly up (negative). Set to 0f for a zero-g effect where particles keep flying. </td>
</tr>
</table></div>
<!-- EDIT2 TABLE [8160-9632] -->
<!-- EDIT8 TABLE [8160-9632] -->
<p>
You can find details about <ahref="/com/jme3/gde/core/docs/jme3/advanced/particle_emitters#configure_parameters.html">effect parameters</a> here.
@ -331,7 +331,7 @@ Add and modify one parameter at a time, and try different values until you get t
<strong>Tip:</strong> If you don't recall an input constant during development, you benefit from an IDE's code completion functionality: Place the caret after e.g. <code>KeyInput.|</code> and trigger code completion to select possible input identifiers.
</p>
</div>
<!-- EDIT6 SECTION "Table of Triggers" [10382-11444] -->
<h2><a>Exercises</a></h2>
<div>
<ol>
@ -381,7 +381,7 @@ inputManager.addMapping("Pause", new KeyTrigger(usersPauseKey
</ol>
</div>
<!-- EDIT8 SECTION "Exercises" [11445-11967] -->
<h2><a>Conclusion</a></h2>
<div>
@ -403,4 +403,5 @@ Now you can already write a little interactive game! But wouldn't it be coo
@ -116,7 +116,7 @@ Move around with the WASD keys to have a closer look at the translucency, and th
</p>
</div>
<!-- EDIT2 SECTION "Sample Code" [511-4720] -->
<h2><a>Simple Unshaded Texture</a></h2>
<div>
@ -125,7 +125,7 @@ Move around with the WASD keys to have a closer look at the translucency, and th
Typically you want to give objects in your scene textures: It can be rock, grass, brick, wood, water, metal, paper… A texture is a normal image file in <acronymtitle="Joint Photographics Experts Group">JPG</acronym> or <acronymtitle="Portable Network Graphics">PNG</acronym> format. In this example, you create a box with a simple unshaded Monkey texture as material.
For a game, you create custom Materials based on these existing MaterialDefintions – as you have just seen in the example with the shiny rock's material.
</p>
</div>
<!-- EDIT6 SECTION "Default Material Definitions" [11058-11824] -->
<h2><a>Exercises</a></h2>
<div>
</div>
<!-- EDIT8 SECTION "Exercises" [11825-11847] -->
<h3><a>Exercise 1: Custom .j3m Material</a></h3>
<div>
@ -364,7 +364,7 @@ Using this new custom material <code>LeakThrough.j3m</code> only takes one line.
@ -96,7 +96,7 @@ Build and run the code sample. You should see two colored boxes tilted at the sa
</p>
</div>
<!-- EDIT2 SECTION "Code Sample" [997-3000] -->
<h2><a>Understanding the Terminology</a></h2>
<div>
@ -125,7 +125,7 @@ In this tutorial, you learn some new terms:
<td>Position/move, turn, or resize an object</td><td>Translate, rotate, scale an object. Transform an object.</td>
</tr>
</table></div>
<!-- EDIT1 TABLE [3089-3506] -->
<!-- EDIT4 TABLE [3089-3506] -->
<p>
Every JME3 application has a rootNode: Your game automatically inherits the <code>rootNode</code> object from SimpleApplication. Everything attached to the rootNode is part of the scene graph. The elements of the scene graph are Spatials.
@ -152,9 +152,9 @@ Every JME3 application has a rootNode: Your game automatically inherits the <cod
<th> Examples: </th><td> A box, a sphere, a player, a building, a piece of terrain, a vehicle, missiles, NPCs, etc… </td><td> The <code>rootNode</code>, a floor node grouping several terrains, a custom vehicle-with-passengers node, a player-with-weapon node, an audio node, etc… </td>
</tr>
</table></div>
<!-- EDIT2 TABLE [3922-4415] -->
<!-- EDIT5 TABLE [3922-4415] -->
</div>
<!-- EDIT3 SECTION "Understanding the Terminology" [3001-4416] -->
<h2><a>Understanding the Code</a></h2>
<div>
@ -174,7 +174,7 @@ What happens in the code snippet? You use the <code>simpleInitApp()</code> metho
</li>
<li><div> Create a blue material. </div>
</li>
<li><div> Apply the blue material to the Box Geometry. <pre> Box( new Vector3f(1,-1,1), 1,1,1);
<li><div> Apply the blue material to the Box Geometry. <pre> Box box1 = new Box( new Vector3f(1,-1,1), 1,1,1);
Geometry blue = new Geometry("Box", box1);
@ -240,7 +240,7 @@ If you run the app with only the code up to here, you see two cubes: A red cube
</ol>
</div>
<!-- EDIT6 SECTION "Understanding the Code" [4417-6683] -->
<h3><a>What is a Pivot Node?</a></h3>
<div>
@ -259,7 +259,7 @@ You can transform (e.g. rotate) Geometries around their own center, or around a
</ul>
</div>
<!-- EDIT7 SECTION "What is a Pivot Node?" [6684-8004] -->
<h2><a>How do I Populate the Scenegraph?</a></h2>
<div>
<div><table>
@ -267,7 +267,7 @@ You can transform (e.g. rotate) Geometries around their own center, or around a
<th> Task…? </th><th> Solution! </th>
</tr>
<tr>
<td> Create a Spatial </td><td> Create a shape, wrap it into a Geometry, and give it a Material. For example: <pre>Box(Vector3f.ZERO, 1, 1, 1);
<td> Create a Spatial </td><td> Create a shape, wrap it into a Geometry, and give it a Material. For example: <pre>Box mesh = new Box(Vector3f.ZERO, 1, 1, 1);
Geometry thing = new Geometry("thing", mesh);
<td> Specify what should be loaded at the start </td><td> Everything you initialize and attach to the <code>rootNode</code> in the <code>simpleInitApp()</code> method is part of the scene at the start of the game. </td>
</tr>
</table></div>
<!-- EDIT3 TABLE [8052-9314] -->
<!-- EDIT9 TABLE [8052-9314] -->
</div>
<!-- EDIT8 SECTION "How do I Populate the Scenegraph?" [8005-9315] -->
<h2><a>How do I Transform Spatials?</a></h2>
<div>
@ -319,7 +319,7 @@ To move a Spatial <em>to</em> specific coordinates, such as (0,40.2f,-2), use: <
@ -347,9 +347,9 @@ To roll an object 180° around the z axis: <pre>thing.rotate( 0f , 0f , 180*
</td><td>pitch = nodding your head</td><td>yaw = shaking your head</td><td>roll = cocking your head</td>
</tr>
</table></div>
<!-- EDIT6 TABLE [10448-11229] -->
<!-- EDIT13 TABLE [10448-11229] -->
</div>
<!-- EDIT10 SECTION "How do I Transform Spatials?" [9316-11230] -->
<h2><a>How do I Troubleshoot Spatials?</a></h2>
<div>
@ -378,9 +378,9 @@ Did you rotate around the right axis? </td>
<td> A Geometry has an unexpected Color or Material. </td><td> Did you reuse a Material from another Geometry and have inadvertently changed its properties? (If so, consider cloning it: mat2 = mat.clone(); ) </td>
</tr>
</table></div>
<!-- EDIT7 TABLE [11362-12335] -->
<!-- EDIT15 TABLE [11362-12335] -->
</div>
<!-- EDIT14 SECTION "How do I Troubleshoot Spatials?" [11231-12336] -->
<h2><a>How do I Add Custom Data to Spatials?</a></h2>
<div>
@ -413,7 +413,7 @@ By using different Strings keys (here the key is <code>pivot id</code>), you can
</p>
</div>
<!-- EDIT16 SECTION "How do I Add Custom Data to Spatials?" [12337-13702] -->
<h2><a>Conclusion</a></h2>
<div>
@ -435,4 +435,5 @@ Since standard shapes like spheres and boxes get old fast, continue with the nex
@ -97,7 +97,7 @@ Set VSync to false to deactivate vertical syncing (faster, but possible page tea
<td>setStereo3D(true)</td><td>Enable 3D stereo. This feature requires hardware support from the GPU driver. See <objectclassid="java:org.netbeans.modules.javahelp.BrowserDisplayer"><paramname="content"value="http://en.wikipedia.org/wiki/Quad_buffering"><paramname="text"value="<html><u>Quad Buffering</u></html>"><paramname="textColor"value="blue"></object>. Currently, your everday user's hardware does not support this, so you can ignore it for now.</td><td>false</td>
@ -112,9 +112,9 @@ ImageIO.read(new File("")), …});</td><td>This specifies the little a
<td>setSettingsDialogImage("/path/to/splash.png")</td><td>A custom splashscreen image in the assets directory which is displayed when the settings dialog is shown.</td><td>"/com/jme3/app/Monkey.png"</td>
</tr>
</table></div>
<!-- EDIT4 TABLE [4346-4993] -->
<!-- EDIT7 TABLE [4346-4993] -->
</div>
<!-- EDIT3 SECTION "Properties" [1382-4994] -->
<h2><a>Saving and Loading Settings</a></h2>
<div>
@ -154,4 +154,5 @@ Provide the unique name of your jME3 application as the String argument. For exa
</ul>
</div>
<!-- EDIT8 SECTION "Saving and Loading Settings" [4995-] -->
@ -137,7 +137,7 @@ How you name or number these stages is fully up to your team. Development teams
</p>
</div>
<!-- EDIT4 SECTION "Planning Development Milestones" [2001-3484] -->
<h3><a>Use File Version Control</a></h3>
<div>
@ -156,7 +156,7 @@ If you don't know which to choose, Subversion is a good choice for starters
</ul>
</div>
<!-- EDIT5 SECTION "Use File Version Control" [3485-4317] -->
<h2><a>Multi-Media Asset Pipeline</a></h2>
<div>
<div><table>
@ -182,14 +182,14 @@ If you don't know which to choose, Subversion is a good choice for starters
<td> Convert Models to j3o format. Move j3o files into <code>assets/Models</code>. </td><td>Don't reference Blender/Ogre/OBJ files in your load() code, because these unoptimized files are not packaged into the JAR.</td>
</tr>
</table></div>
<!-- EDIT1 TABLE [4358-5244] -->
<!-- EDIT7 TABLE [4358-5244] -->
<p>
Learn details about the <ahref="/com/jme3/gde/core/docs/jme3/intermediate/multi-media_asset_pipeline.html">Multi-Media Asset Pipeline</a> here.
@ -498,7 +498,7 @@ Decide whether you want to release your game as WebStart, Desktop JAR, or Applet
(.APK)</td><td>Game runs on Android devices.</td><td>Android devices do not support post-procesor effects.</td>
</tr>
</table></div>
<!-- EDIT2 TABLE [18475-19695] -->
<!-- EDIT21 TABLE [18475-19695] -->
<p>
Which ever method you choose, a Java-Application works on the main operating systems: Windows, Mac <acronymtitle="Operating System">OS</acronym>, Linux, Android.
@ -510,4 +510,5 @@ The distribution appears in a newly generated <code>dist</code> directory inside
</p>
</div>
<!-- EDIT20 SECTION "Distributing the Executables" [18042-] -->
<form><div><inputtype="hidden"name="do"value="login"/><inputtype="hidden"name="sectok"value="fd38385946f898d792f01e400ff0e2c5"/><inputtype="submit"value="Login"class="button"title="Login"/></div></form><form><div><inputtype="hidden"name="do"value="index"/><inputtype="submit"value="Sitemap"class="button"accesskey="x"title="Sitemap [X]"/></div></form><a><inputtype="button"class="button"value="Back to top"onclick="window.scrollTo(0, 0)"title="Back to top"/></a>
<form><div><inputtype="hidden"name="do"value="login"/><inputtype="hidden"name="sectok"value="0cd01da860c7ad31cf03c0a2de2da377"/><inputtype="submit"value="Login"class="button"title="Login"/></div></form><form><div><inputtype="hidden"name="do"value="index"/><inputtype="submit"value="Sitemap"class="button"accesskey="x"title="Sitemap [X]"/></div></form><a><inputtype="button"class="button"value="Back to top"onclick="window.scrollTo(0, 0)"title="Back to top"/></a>
</div>
<div></div>
</div-->
@ -368,7 +361,7 @@ You've followed a link to a topic that doesn't exist yet. If permissio
@ -355,7 +355,7 @@ Additionally to the above settings, you can switch off and on a wireframe render
<td>getAdditionalRenderState().setWireframe(true);</td><td>Switch to showing the (textured) Material in wireframe mode. The wireframe optionally uses the Material's <code>Color</code> value.</td><td>Use wireframes to debug meshes, or for a "matrix" or "holodeck" effect.</td>
@ -38,14 +38,14 @@ Assets are files that are not code. Your multi-media assets includes, for exampl
<td> Convert original models to .j3o format. Move .j3o files into <code>assets/Models</code>. </td><td>Don't reference original Blender/Ogre/OBJ files in your load() code, because these unoptimized files are not packaged into the final JAR.</td>
@ -95,7 +95,7 @@ getInputManager()</td><td>Use the <a href="/com/jme3/gde/core/docs/jme3/advanced
getStateManager()</td><td>You use the Application's state manager to activate <ahref="/com/jme3/gde/core/docs/jme3/advanced/application_states.html">AppStates</a>, such as <ahref="/com/jme3/gde/core/docs/jme3/advanced/physics.html">Physics</a>.</td>
</tr>
</table></div>
<!-- EDIT1 TABLE [2024-3450] --><div><table>
<!-- EDIT3 TABLE [2024-3450] --><div><table>
<tr>
<th>Application methods</th><th>Purpose</th>
</tr>
@ -119,7 +119,7 @@ Type.Headless – jME application runs its event loop without calculating any vi
Type.OffscreenSurface – jME application view is not shown and no window opens, but everything calculated and cached as bitmap (back buffer) for use by other applications.</td>
</tr>
</table></div>
<!-- EDIT2 TABLE [3452-4638] --><div><table>
<!-- EDIT4 TABLE [3452-4638] --><div><table>
<tr>
<th>Internal class field/method</th><th>Purpose</th>
</tr>
@ -151,9 +151,9 @@ getGuiViewPort()</td><td>The view object for the orthogonal <acronym title="Grap
<td>paused</td><td>Boolean is used only internally during runtime to pause/unpause a game. (You need to implement your own isRunning boolean or so.)</td>
@ -192,7 +192,7 @@ getGuiNode()</td><td>Attach flat <acronym title="Graphical User Interface">GUI</
getFlyByCamera()</td><td>The default first-person fly-by camera control. This default camera control lets you navigate the 3D scene using the preconfigured WASD and arrow keys and the mouse.</td>
</tr>
</table></div>
<!-- EDIT4 TABLE [6405-6948] --><div><table>
<!-- EDIT7 TABLE [6405-6948] --><div><table>
<tr>
<th>SimpleApplication Method</th><th>Purpose</th>
</tr>
@ -209,7 +209,7 @@ getFlyByCamera()</td><td>The default first-person fly-by camera control. This de
<td>setDisplayStatView(false);</td><td>A default SimpleApplication displays mesh statistics on the screen using the com.jme3.app.StatsView class. The information is valuable during the development and debugging phase, but for the release, you should hide the statistics HUD.</td>
@ -223,7 +223,7 @@ getFlyByCamera()</td><td>The default first-person fly-by camera control. This de
<td>public void simpleRender(RenderManager rm)</td><td><strong>Optional:</strong> Override this method to implement <em>advanced</em> modifications of the frameBuffer and scene graph.</td>
</tr>
</table></div>
<!-- EDIT6 TABLE [7744-8662] -->
<!-- EDIT9 TABLE [7744-8662] -->
<p>
<p><div>Use <code>app.setShowSettings(true);</code> to present the user with a splashscreen and the built-in display settings dialog when starting the game; or use <code>app.setShowSettings(false);</code> to hide the buil-in screen (in this case, you may want to provide a custom splashscreen and settings panel). Set this boolean before calling <code>app.start()</code> in the <code>main()</code> method of the SimpleApplication. See also <ahref="/com/jme3/gde/core/docs/jme3/intermediate/appsettings.html">AppSettings</a>.
@ -231,7 +231,7 @@ getFlyByCamera()</td><td>The default first-person fly-by camera control. This de
@ -270,14 +270,14 @@ Translation requires a 4x4 matrix, where the vector (x,y,z) is mapped to (x,y,z,
<td>S<sup>T</sup></td><td>1</td>
</tr>
</table></div>
<!-- EDIT6 TABLE [6277-6300] -->
<!-- EDIT18 TABLE [6277-6300] -->
<p>
where M is the 3x3 matrix (containing any rotation/scale information), T is the translation vector and S<sup>T</sup> is the transpose Vector of T. 1 is just a constant.
@ -80,7 +80,7 @@ The scene graph represents your 3D world. Objects in the jME3 scene graph are ca
</p>
</div>
<!-- EDIT3 SECTION "Scene Graph and RootNode" [1444-1820] -->
<h2><a>Spatials: Node vs Geometry</a></h2>
<div>
@ -112,9 +112,9 @@ A Spatial can be transformed, loaded and saved. There are two types of Spatials,
<th> Examples: </th><td> A box, a sphere, player, a building, a piece of terrain, a vehicle, missiles, NPCs, etc… </td><td> The rootNode, the guiNode, an audio node, a custom grouping node, etc. </td>
</tr>
</table></div>
<!-- EDIT1 TABLE [1973-2678] -->
<!-- EDIT5 TABLE [1973-2678] -->
</div>
<!-- EDIT4 SECTION "Spatials: Node vs Geometry" [1821-2679] -->
<h2><a>How to Use This Knowledge?</a></h2>
<div>
@ -129,4 +129,5 @@ The <a href="/com/jme3/gde/core/docs/jme3.html">intermediate and advanced docume
</p>
</div>
<!-- EDIT6 SECTION "How to Use This Knowledge?" [2680-] -->
When you run the build script provided by the jMonkeyEngine <acronymtitle="Software Development Kit">SDK</acronym>, it automatically compiles your classes, libraries, and assets. It creates a <code>dist</code> directory in your project directory which contains the executable JAR and a directory with libraries.
</p>
@ -91,7 +90,7 @@ Here are your deployment options in detail:
</p>
</div>
<!-- EDIT4 SECTION "Creating the Distributable" [1445-1988] -->
<h3><a>Desktop Application (JAR)</a></h3>
<div>
@ -119,7 +118,7 @@ Most operating systems execute a JAR when users double-click on it, but you can