sdk javahelp: Removed three outdated help files (updated versions exist already in different paths).

git-svn-id: https://jmonkeyengine.googlecode.com/svn/trunk@8332 75d07b2b-3a1a-0410-a2c5-0572b91ccdca
3.0
roo..li 13 years ago
parent 663a3ba7d5
commit dde60c0792
  1. 334
      sdk/jme3-core/javahelp/com/jme3/gde/core/docs/jme3/intermediate/api_feature_mapping.html
  2. 37
      sdk/jme3-core/javahelp/com/jme3/gde/core/docs/jme3/intermediate/headlessserver.html
  3. 204
      sdk/jme3-core/javahelp/com/jme3/gde/core/docs/jme3/intermediate/terrain_collision.html

@ -1,334 +0,0 @@
<h1><a
name="jme_3_-_api_feature_mapping">JME 3 - API / Feature Mapping</a></h1><div
class="level1"><p> This page provides a quick answer to the questions <strong>&quot;I want my game to do <em>X</em>, where do I find that in jME 3 ??&quot;</strong> <br/> <br/> Knowing exactly what you are looking for allows you to search more efficiently, find documentation more quickly, and ask clearer questions on the <a
href="http://www.jmonkeyengine.com/forum/">support forum</a>. This intermediate page assumes that you already went through the beginner tutorials. Feel free to add APIs, tutorials and javadoc links that helped you understand and use a feature!</p></div><h2><a
name="applications_and_scenegraph">Applications and SceneGraph</a></h2><div
class="level2"><div
class="table sectionedit1"><table
class="inline"><tr
class="row0"><th
class="col0">How do I…?</th><th
class="col1">Use this JME 3 Feature!</th><th
class="col2">Learn more here…</th></tr><tr
class="row1"><th
class="col0">Start with a preconfigured game</th><td
class="col1">com.jme3.app.SimpleApplication</td><td
class="col2"><a
href="/com/jme3/gde/core/docs/jme3/beginner/hello_simpleapplication.html">Hello SimpleApplication</a></td></tr><tr
class="row2"><th
class="col0">Make an object appear in the scene</th><td
class="col1">Attach nodes and geometries to the rootNode: rootNode.attachChild(geo); <br/> com.jme3.scene.Node, com.jme3.scene.Geometry <br/> node.setCullHint(CullHint.Never);</td><td
class="col2"><a
href="/com/jme3/gde/core/docs/jme3/the_scene_graph.html">The Scene Graph</a> <br/> <a
href="/com/jme3/gde/core/docs/jme3/beginner/hello_asset.html">Hello Asset</a> <br/> <a
href="/com/jme3/gde/core/docs/jme3/beginner/hello_node.html">Hello Node</a></td></tr><tr
class="row3"><th
class="col0">Make an object disappear from the scene</th><td
class="col1">Detach nodes and geometries from the rootNode: rootNode.detachChild(geo); <br/> node.setCullHint(CullHint.Always);</td><td
class="col2"><a
href="/com/jme3/gde/core/docs/jme3/the_scene_graph.html">The Scene Graph</a> <br/> <a
href="/com/jme3/gde/core/docs/jme3/beginner/hello_asset.html">Hello Asset</a> <br/> <a
href="/com/jme3/gde/core/docs/jme3/beginner/hello_node.html">Hello Node</a></td></tr><tr
class="row4"><th
class="col0">Use third-person view</th><td
class="col1">Use default camera <code>cam</code> <br/> com.jme3.renderer.Camera</td><td
class="col2"> ChaseCam WIP</td></tr><tr
class="row5"><th
class="col0">Use first-person view</th><td
class="col1">Use camera <code>flyCam</code> <br/> com.jme3.input.FlyByCamera</td><td
class="col2"><a
href="/com/jme3/gde/core/docs/jme3/beginner/hello_collision.html">Hello Collision</a></td></tr><tr
class="row6"><th
class="col0">Increase camera speed</th><td
class="col1"><code>flyCam.setMoveSpeed(50f);</code></td><td
class="col2"> –</td></tr><tr
class="row7"><th
class="col0">Only draw outline of the scene</th><td
class="col1">Use a wireframe material, e.g. for debugging.</td><td
class="col2"> <a
href="/com/jme3/gde/core/docs/jme3/advanced/debugging.html">Debugging</a></td></tr><tr
class="row8"><th
class="col0">Change the background color</th><td
class="col1">Call viewPort.setBackgroundColor(ColorRGBA.Blue);</td><td
class="col2">N/A</td></tr><tr
class="row9"><th
class="col0">Customize the applicaton class</th><td
class="col1">Extend com.jme3.app.SimpleApplication (or com.jme3.app.Application) and set Application Settings</td><td
class="col2"><a
href="/com/jme3/gde/core/docs/jme3/intermediate/simpleapplication.html">SimpleApplication</a> <br/> <a
href="/com/jme3/gde/core/docs/jme3/intermediate/appsettings.html">AppSettings</a></td></tr><tr
class="row10"><th
class="col0">Disable the logger output</th><td
class="col1">Logger.getLogger(&quot;&quot;).setLevel(Level.SEVERE); <br/> java.util.logging.*</td><td
class="col2"> <a
href="/com/jme3/gde/core/docs/jme3/advanced/logging.html">Logging</a></td></tr></table></div></div><h2><a
name="creation_and_manipulation_of_objects">Creation and Manipulation of Objects</a></h2><div
class="level2"><div
class="table sectionedit2"><table
class="inline"><tr
class="row0"><th
class="col0">How do I…?</th><th
class="col1">Use this JME 3 Feature!</th><th
class="col2">Learn more here…</th></tr><tr
class="row1"><th
class="col0">Make simple shapes like cubes, spheres</th><td
class="col1">com.jme3.scene.Geometry, com.jme3.scene.shape.*</td><td
class="col2"> <a
href="/com/jme3/gde/core/docs/jme3/beginner/hello_node.html">Hello Node</a>, <a
href="/com/jme3/gde/core/docs/jme3/advanced/shape.html">Shape</a> <br/> <a
href="http://code.google.com/p/jmonkeyengine/source/browse/trunk/engine/src/test/jme3test/model/shape/TestCylinder.java">TestCylinder.java</a>, <a
href="http://code.google.com/p/jmonkeyengine/source/browse/trunk/engine/src/test/jme3test/model/shape/TestBox.java">TestBox.java</a>, <a
href="http://code.google.com/p/jmonkeyengine/source/browse/trunk/engine/src/test/jme3test/model/shape/TestSphere.java">TestSphere.java</a></td></tr><tr
class="row2"><th
class="col0">Create a 3-D model</th><td
class="col1">Create the model in a 3-D mesh editor (for example Blender) and export it as Ogre <acronym
title="Extensible Markup Language">XML</acronym> mesh.</td><td
class="col2"><a
href="http://blender.org">Download Blender</a>, <a
href="http://en.wikibooks.org/wiki/Blender_3D:_Noob_to_Pro">Blender tutorial</a>, <a
href="http://www.ogre3d.org/wiki/index.php/Blender_Exporter">Blender-to-Ogre plugin</a> <br/> <a
href="/com/jme3/gde/core/docs/jme3/advanced/3d_models.html">3D Models</a></td></tr><tr
class="row3"><th
class="col0">Load a 3-D model</th><td
class="col1">Import asset as Ogre <acronym
title="Extensible Markup Language">XML</acronym> mesh. <br/> jMonkeyPlatform: Converting Ogre to j3o binary format speeds up model loading. <br/> AssetManager, com.jme3.scene.plugins.ogre.*, com.jme3.scene.Geometry</td><td
class="col2"> <a
href="/com/jme3/gde/core/docs/jme3/beginner/hello_asset.html">Hello Asset</a> <br/> <a
href="/com/jme3/gde/core/docs/sdk/model_loader_and_viewer.html">jMonkeyPlatform j3o converter</a> <br/> <a
href="http://code.google.com/p/jmonkeyengine/source/browse/trunk/engine/src/test/jme3test/model/TestOgreLoading.java">TestOgreLoading.java</a>, <a
href="http://code.google.com/p/jmonkeyengine/source/browse/trunk/engine/src/test/jme3test/export/TestOgreConvert.java">TestOgreConvert.java</a></td></tr><tr
class="row4"><th
class="col0">Move or turn or resize an object</th><td
class="col1">Use transformations: geo.setLocalTranslation(), geo.rotate(), geo.scale() <br/> geo.updateGeometricState();</td><td
class="col2"><a
href="/com/jme3/gde/core/docs/jme3/beginner/hello_node.html">Hello Node</a> <br/> <a
href="/com/jme3/gde/core/docs/jme3/advanced/spatial.html">Spatial</a></td></tr><tr
class="row5"><th
class="col0">Concatenate transformations (e.g. rotations around several axes in one step)</th><td
class="col1">com.jme3.math.Quaternion, slerp() <br/> com.jme3.math.Transform, interpolateTransforms()</td><td
class="col2"><a
href="/com/jme3/gde/core/docs/jme2/rotate.html">rotate</a>, <a
href="/com/jme3/gde/core/docs/jme2/rotate_about_a_point.html">rotate_about_a_point</a>, <a
href="/com/jme3/gde/core/docs/jme2/quaternion.html">quaternion</a>, <a
href="/com/jme3/gde/core/docs/jme3/math_for_dummies.html">math_for_dummies</a></td></tr><tr
class="row6"><th
class="col0">Make an object move by itself</th><td
class="col1">Change the geo&#039;s translation in the update phase of the main loop. Or remote-control the motion using cinematics. <br/> com.jme3.scene.Geometry, setLocalTranslation(), setWalkDirection() for physical objects.</td><td
class="col2"><a
href="/com/jme3/gde/core/docs/jme3/beginner/hello_main_event_loop.html">Hello Loop</a> <br/> <a
href="/com/jme3/gde/core/docs/jme3/advanced/update_loop.html">Update Loop</a> <br/> <a
href="/com/jme3/gde/core/docs/jme3/advanced/custom_controls.html">Custom Controls</a> <br/> <a
href="/com/jme3/gde/core/docs/jme3/advanced/cinematics.html">Cinematics</a> <br/> <a
href="http://code.google.com/p/jmonkeyengine/source/browse/trunk/engine/src/test/jme3test/material/TestBumpModel.java">TestBumpModel.java</a>, <a
href="http://code.google.com/p/jmonkeyengine/source/browse/trunk/engine/src/test/jme3test/model/TestOgreLoading.java">TestOgreLoading.java</a></td></tr><tr
class="row7"><th
class="col0">Manipulate the color or shininess of an object</th><td
class="col1">Materials, AssetManager</td><td
class="col2"> <a
href="/com/jme3/gde/core/docs/jme3/beginner/hello_material.html">Hello Material</a> <br/> <a
href="/com/jme3/gde/core/docs/jme3/advanced/materials_overview.html">Materials Overview</a> <br/> <a
href="http://code.google.com/p/jmonkeyengine/source/browse/trunk/engine/src/test/jme3test/light/TestNormalMapping.java">TestNormalMapping.java</a>, <a
href="http://code.google.com/p/jmonkeyengine/source/browse/trunk/engine/src/test/jme3test/model/TestSphere.java">TestSphere.java</a></td></tr><tr
class="row8"><th
class="col0">Manipulate the surface of an object (wood vs stone vs metal etc)</th><td
class="col1 leftalign">Textures, AssetManager.</td><td
class="col2"><a
href="/com/jme3/gde/core/docs/jme3/beginner/hello_material.html">Hello Material</a> <br/> <a
href="/com/jme3/gde/core/docs/jme3/advanced/materials_overview.html">Materials Overview</a> <br/> <a
href="http://code.google.com/p/jmonkeyengine/source/browse/trunk/engine/src/test/jme3test/material/TestSimpleBumps.java">TestSimpleBumps.java</a> <br/> <a
href="http://wiki.blender.org/index.php/Doc:Manual/Textures/Maps/Bump_and_Normal_Maps">Blender: Creating Bump Maps and Normal maps</a></td></tr><tr
class="row9"><th
class="col0">Make objects cast a shadow</th><td
class="col1">com.jme3.shadow.BasicShadowRenderer, com.jme3.light.DirectionalLight <br/> setShadowMode()</td><td
class="col2"> <a
href="/com/jme3/gde/core/docs/jme3/advanced/light_and_shadow.html">Light and Shadow</a> <br/> <a
href="http://code.google.com/p/jmonkeyengine/source/browse/trunk/engine/src/test/jme3test/jme3test/fx/TestEverything.java">TestEverything.java</a>, <a
href="http://code.google.com/p/jmonkeyengine/source/browse/trunk/engine/src/test/jme3test/jme3test/light/TestShadow.java">TestShadow.java</a></td></tr><tr
class="row10"><th
class="col0">Render transparent objects (glass, window panes, water, tree leaves)</th><td
class="col1">Assign a transparent texture to the Material and set material.getAdditionalRenderState().setBlendMode(BlendMode.Alpha);</td><td
class="col2"><a
href="/com/jme3/gde/core/docs/jme3/beginner/hello_material.html">Hello Material</a> <br/> <a
href="/com/jme3/gde/core/docs/jme3/advanced/materials_overview.html">Materials Overview</a></td></tr><tr
class="row11"><th
class="col0">Force or disable Backface culling</th><td
class="col1">com.jme3.material.RenderState.FaceCullMode: Back, Front, FrontAndBack, Off <br/> e.g. material.getAdditionalRenderState(). setFaceCullMode(FaceCullMode.FrontAndBack);</td><td
class="col2">N/A</td></tr><tr
class="row12"><th
class="col0">Make procedural or custom shapes</th><td
class="col1">com.jme3.scene.Mesh</td><td
class="col2"><a
href="/com/jme3/gde/core/docs/jme3/advanced/custom_meshes.html">Custom Meshes</a></td></tr><tr
class="row13"><th
class="col0">Keep my models, textures, sound files in order</th><td
class="col1">Put all assets in subdirectories of a project directory named <code>assets</code> and use the assetManager to load them.</td><td
class="col2"><a
href="/com/jme3/gde/core/docs/jme3/beginner/hello_asset.html">Hello Asset</a>, <a
href="/com/jme3/gde/core/docs/jme3/advanced/asset_manager.html">Asset Manager</a></td></tr><tr
class="row14"><th
class="col0">Identify Named Sub-Mesh in Model</th><td
class="col1">Geometry result = spatial.getName().startsWith(name);</td><td
class="col2"><a
href="/com/jme3/gde/core/docs/jme3/advanced/spatial.html">Spatial</a></td></tr></table></div></div><h2><a
name="actions_interactions_physics">Actions, Interactions, Physics</a></h2><div
class="level2"><div
class="table sectionedit3"><table
class="inline"><tr
class="row0"><th
class="col0">How do I…?</th><th
class="col1">Use this JME 3 Feature!</th><th
class="col2">Learn more here…</th></tr><tr
class="row1"><th
class="col0">Implement the game logic and game mechanics</th><td
class="col1"> Use Controls to define behaviours of types of Spatials. Use Application States to implement global behaviours. Use the <code>simpleUpdate()</code> loop for the remaining tests and interactions. Use Cinematics to remote-control objects in scenes.</td><td
class="col2"><a
href="/com/jme3/gde/core/docs/jme3/beginner/hello_main_event_loop.html">Hello Loop</a> <br/> <a
href="/com/jme3/gde/core/docs/jme3/advanced/update_loop.html">Update Loop</a> <br/> <a
href="/com/jme3/gde/core/docs/jme3/advanced/custom_controls.html">Custom Controls</a> <br/> <a
href="/com/jme3/gde/core/docs/jme3/advanced/application_states.html">Application States</a> <br/> <a
href="/com/jme3/gde/core/docs/jme3/advanced/cinematics.html">Cinematics</a></td></tr><tr
class="row2"><th
class="col0">Let players interact by pressing keyboard keys</th><td
class="col1">com.jme3.input.KeyInput, com.jme3.input.binding.BindingListener</td><td
class="col2"><a
href="/com/jme3/gde/core/docs/jme3/beginner/hello_input_system.html">Hello Input</a> <br/> <a
href="/com/jme3/gde/core/docs/jme3/advanced/input_handling.html">Input Handling</a></td></tr><tr
class="row3"><th
class="col0">Let players interact by clicking, e.g. picking up objects, opening doors, shooting</th><td
class="col1">Intersect a Ray from the player with the Bounding Volume of the target: com.jme3.bounding.*, com.jme3.math.Ray, com.jme3.collision.CollisionResults.</td><td
class="col2"><a
href="/com/jme3/gde/core/docs/jme3/beginner/hello_picking.html">Hello Picking</a> <br/> <a
href="/com/jme3/gde/core/docs/jme3/advanced/collision_and_intersection.html">Collision and Intersection</a> <br/> <a
href="http://code.google.com/p/jmonkeyengine/source/browse/trunk/engine/src/test/jme3test/bounding/TestRayCollision.java">TestRayCollision.java</a></td></tr><tr
class="row4"><th
class="col0">Animate objects and characters</th><td
class="col1">Create an animated OgreMesh model with Bones in a 3-D editor (e.g. Blender). <br/> com.jme3.animation.*</td><td
class="col2"> <a
href="/com/jme3/gde/core/docs/jme3/beginner/hello_animation.html">Hello Animation</a> <br/> <a
href="/com/jme3/gde/core/docs/jme3/advanced/animation.html">Animation</a> <br/> <a
href="http://code.google.com/p/jmonkeyengine/source/browse/trunk/engine/src/test/jme3test/model/anim/">animation</a>, <a
href="http://wiki.blender.org/index.php/Doc:Tutorials/Animation/BSoD/Character_Animation">Blender animation tutorial</a></td></tr><tr
class="row5"><th
class="col0">Keep players walking on floors of scenes</th><td
class="col1">Collision detection – raycasting or physics.</td><td
class="col2"><a
href="/com/jme3/gde/core/docs/jme3/beginner/hello_collision.html">Hello Collision</a> <br/> <a
href="/com/jme3/gde/core/docs/jme3/advanced/physics.html">Physics</a></td></tr><tr
class="row6"><th
class="col0">Prevent players from walking through walls in scenes</th><td
class="col1">Collision detection using physics and bounding volumes. <br/> com.jme3.bullet.*, CapsuleCollisionShape / CompoundCollisionShape, PhysicsCharacterNode / PhysicsNode <br/> geo.setModelBound(); geo.updateModelBound();</td><td
class="col2"><a
href="/com/jme3/gde/core/docs/jme3/beginner/hello_collision.html">Hello Collision</a> <br/> <a
href="/com/jme3/gde/core/docs/jme3/advanced/physics.html">Physics</a></td></tr><tr
class="row7"><th
class="col0">Let balls, cars, etc bounce off obstacles and roll on floors</th><td
class="col1">Use physics nodes and bounding volumes: com.jme3.bounding.*, com.jme3.bullet.collisions, com.jme3.bullet.nodes.PhysicsNode etc <br/> geo.setModelBound(); geo.updateModelBound();</td><td
class="col2"><a
href="/com/jme3/gde/core/docs/jme3/beginner/hello_physics.html">Hello Physics</a> <br/> <a
href="/com/jme3/gde/core/docs/jme3/advanced/physics.html">Physics</a> <br/> <a
href="http://code.google.com/p/jmonkeyengine/source/browse/trunk/engine/src/test/jme3test/bullet/TestSimplePhysics.java">TestSimplePhysics.java</a>, <a
href="http://code.google.com/p/jmonkeyengine/source/browse/trunk/engine/src/test/jme3test/bullet">more samples</a></td></tr><tr
class="row8"><th
class="col0">Steer cars, motorcycles, etc</th><td
class="col1">Use physics characters and vehicles: com.jme3.bullet.*, PhysicsCharacterNode, PhysicsVehicleNode</td><td
class="col2"><a
href="/com/jme3/gde/core/docs/jme3/advanced/vehicles.html">Vehicles</a> <br/> <a
href="http://code.google.com/p/jmonkeyengine/source/browse/trunk/engine/src/test/jme3test/bullet/TestFancyCar.java">TestFancyCar.java</a>, <a
href="http://code.google.com/p/jmonkeyengine/source/browse/trunk/engine/src/test/jme3test/bullet/TestPhysicsCharacter.java">TestPhysicsCharacter.java</a> <br/> (Press HUJK keys to steer, spacebar to jump.)</td></tr><tr
class="row9"><th
class="col0">Let an object swing like a pendulum or chain links</th><td
class="col1">Use physics joints: com.jme3.bullet.joints.PhysicsHingeJoint</td><td
class="col2"><a
href="/com/jme3/gde/core/docs/jme3/advanced/hinges_and_joints.html">Hinges and Joints</a> <br/> <a
href="http://code.google.com/p/jmonkeyengine/source/browse/trunk/engine/src/test/jme3test/bullet/TestPhysicsHingeJoint.java">TestPhysicsHingeJoint.java</a> <br/> (Press HK keys to turn, spacebar to swing.)</td></tr></table></div></div><h2><a
name="gui_display">GUI Display</a></h2><div
class="level2"><div
class="table sectionedit4"><table
class="inline"><tr
class="row0"><th
class="col0">How do I…?</th><th
class="col1">Use this JME 3 Feature!</th><th
class="col2">Learn more here…</th></tr><tr
class="row1"><th
class="col0">Get rid of default debug display (fps, stats etc) in SimpleApplication</th><td
class="col1"> app.setDisplayFps(false); <br/> app.setDisplayStatView(false);</td><td
class="col2"> N/A</td></tr><tr
class="row2"><th
class="col0">Display text (score, health), flat mini-maps or status icons</th><td
class="col1">Attach a picture to the orthogonal <code>guiNode</code> to create a heads-up display (<a
href="http://en.wikipedia.org/wiki/HUD_%28video_gaming%29">HUD</a>). <br/> com.jme3.font.*, com.jme3.ui.Picture. guiNode.attachChild()</td><td
class="col2"> <a
href="/com/jme3/gde/core/docs/jme3/advanced/hud.html">HUD</a> <br/> <a
href="http://code.google.com/p/jmonkeyengine/source/browse/trunk/engine/src/test/jme3test/gui/TestOrtho.java">TestOrtho.java</a>, <a
href="http://code.google.com/p/jmonkeyengine/source/browse/trunk/engine/src/test/jme3test/gui/TestBitmapFont.java">TestBitmapFont.java</a></td></tr><tr
class="row3"><th
class="col0">Display buttons to let the player switch between the game/settings/score screens</th><td
class="col1">Nifty <acronym
title="Graphical User Interface">GUI</acronym></td><td
class="col2"><a
href="/com/jme3/gde/core/docs/jme3/advanced/nifty_gui.html">Nifty GUI</a> <br/> <a
href="http://code.google.com/p/jmonkeyengine/source/browse/trunk/engine/src/test/jme3test/niftygui/TestNiftyGui.java">TestNiftyGui.java</a></td></tr></table></div></div><h2><a
name="environment_effectssound_landscape">Environment Effects: Sound, Landscape</a></h2><div
class="level2"><div
class="table sectionedit5"><table
class="inline"><tr
class="row0"><th
class="col0">How do I…?</th><th
class="col1">Use this JME 3 Feature!</th><th
class="col2">Learn more here…</th></tr><tr
class="row1"><th
class="col0">Play sounds and noises</th><td
class="col1 leftalign">AudioRenderer, Listener, and AudioNode from com.jme3.audio.*</td><td
class="col2"><a
href="/com/jme3/gde/core/docs/jme3/beginner/hello_audio.html">Hello Audio</a> <br/> <a
href="/com/jme3/gde/core/docs/jme3/advanced/audio.html">Audio</a> <br/> <a
href="http://code.google.com/p/jmonkeyengine/source/browse/trunk/engine/src/test/jme3test/audio">audio</a></td></tr><tr
class="row2"><th
class="col0">Simulate fire, flames, smoke, explosions, swarms, dust, magic spells</th><td
class="col1">Use particle emitters: <br/> com.jme3.effect.EmitterSphereShape, <br/> com.jme3.effect.ParticleEmitter</td><td
class="col2"><a
href="/com/jme3/gde/core/docs/jme3/beginner/hello_effects.html">Hello Effects</a> <br/> <a
href="/com/jme3/gde/core/docs/jme3/advanced/particle_emitters.html">Particle Emitters</a> <br/> <a
href="/com/jme3/gde/core/docs/jme3/advanced/bloom_and_glow.html">Bloom and Glow</a> <br/> <a
href="/com/jme3/gde/core/docs/jme3/advanced/effects_overview.html">Effects Overview</a> <br/> <a
href="http://code.google.com/p/jmonkeyengine/source/browse/trunk/engine/src/test/jme3test/fx/TestExplosionEffect.java">TestExplosionEffect.java</a>, <a
href="http://code.google.com/p/jmonkeyengine/source/browse/trunk/engine/src/test/jme3test/fx/TestParticleEmitter.java">TestParticleEmitter.java</a></td></tr><tr
class="row3"><th
class="col0">Simulate water, waves, reflections</th><td
class="col1">com.jme3.water.*</td><td
class="col2"> <a
href="/com/jme3/gde/core/docs/jme3/advanced/water.html">Water</a> <br/> <a
href="/com/jme3/gde/core/docs/jme3/advanced/post-processor_water.html">Post-Processor Water</a> <br/> <a
href="http://code.google.com/p/jmonkeyengine/source/browse/trunk/engine/src/test/jme3test/water/TestSceneWater.java">TestSceneWater.java</a></td></tr><tr
class="row4"><th
class="col0">Generate a terrain</th><td
class="col1">com.jme3.terrain.*</td><td
class="col2"><a
href="/com/jme3/gde/core/docs/jme3/beginner/hello_terrain.html">Hello Terrain</a> <br/> <a
href="/com/jme3/gde/core/docs/jme3/advanced/terrain.html">Terrain</a> <br/> <a
href="http://code.google.com/p/jmonkeyengine/source/browse/trunk/engine/src/test/jme3test/terrain/TestTerrain.java">TestTerrain.java</a></td></tr><tr
class="row5"><th
class="col0">Simulate a sky</th><td
class="col1"><pre>rootNode.attachChild&#40;SkyFactory.createSky&#40; assetManager,
&quot;Textures/Sky/Bright/BrightSky.dds&quot;, false&#41;&#41;;
skyGeo.setQueueBucket&#40;Bucket.Sky&#41; </pre></td><td
class="col2"><a
href="/com/jme3/gde/core/docs/jme3/advanced/sky.html">Sky</a> <br/> <a
href="http://code.google.com/p/jmonkeyengine/source/browse/trunk/engine/src/test/jme3test/texture/TestCubeMap.java">TestCubeMap.java</a></td></tr></table></div></div><h2><a
name="back-end_properties">Back-End Properties</a></h2><div
class="level2"><div
class="table sectionedit6"><table
class="inline"><tr
class="row0"><th
class="col0">How do I…?</th><th
class="col1">Use this JME 3 Feature!</th><th
class="col2">Learn more here…</th></tr><tr
class="row1"><th
class="col0">Check graphic card capabilities</th><td
class="col1">com.jme3.renderer.Caps <br/> Collection&lt;Caps&gt; caps = renderer.getCaps(); <br/> Logger.getLogger(HelloJME3.class.getName()).log(Level.INFO, &quot;Caps: {0}&quot; + caps.toString());</td><td
class="col2"> N/A</td></tr><tr
class="row2"><th
class="col0">Optimize the heck out of the scenegraph</th><td
class="col1">jme3tools.optimize.GeometryBatchFactory <br/> GeometryBatchFactory.optimize(rootNode);</td><td
class="col2"> N/A</td></tr></table></div></div>
<p><em><a href="http://jmonkeyengine.org/wiki/doku.php/jme3:intermediate:api_feature_mapping?do=export_xhtmlbody">view online version</a></em></p>

@ -1,37 +0,0 @@
<h1><a
name="jme3_headless_server">jME3 Headless Server</a></h1><div
class="level1"><p> When adding multiplayer to your game, you may find that your server needs to know about game state (e.g. where are players, objects? Was that a direct hit? etc.) You can code all this up yourself, but there&#039;s an easier way.</p><p> It&#039;s very easy to change your current (client) game to function as a server as well.</p></div><h2><a
name="client_code">Client Code</a></h2><div
class="level2"><p> First, let&#039;s take a look at the default way of creating a new game (in its simplest form):</p><pre>public static void main&#40;String&#91;&#93; args&#41; &#123;
Application app = new Main&#40;&#41;;
app.start&#40;&#41;;
&#125;</pre></div><h2><a
name="headless_server_code">Headless Server Code</a></h2><div
class="level2"><p> Now, with a simple change you can start your game in Headless mode. This means that all input and audio/visual output will be ignored. That&#039;s a good thing for a server.</p><pre>import com.jme3.system.JmeContext;
import com.jme3.system.JmeContext.Type;
&nbsp;
public static void main&#40;String&#91;&#93; args&#41; &#123;
Application app = new Main&#40;&#41;;
app.start&#40;JmeContext.Type.Headless&#41;;
&#125;</pre><p><p><div
class="noteclassic">Although all input/output is ignored, the server <em>does</em> keep game state and <em>does</em> call the <code>simpleUpdate()</code> as expected.</div></p></p></div><h2><a
name="next_steps">Next steps</a></h2><div
class="level2"><p> Okay, so you can now start your game in a headless &#039;server mode&#039;, where to go from here?</p><ul><li
class="level1"><div
class="li"> Parse <code>String[] args</code> from the <code>main</code>-method to enable server mode on demand (e.g. start your server like <code>java -jar mygame.jar –server</code>.</div></li><li
class="level1"><div
class="li"> Integrate <a
href="/com/jme3/gde/core/docs/spidermonkey.html">SpiderMonkey</a>, to provide game updates to the server over a network.</div></li><li
class="level1"><div
class="li"> Only execute code that&#039;s needed. (E.g. place all rendering code inside an <code>if (servermode)</code>-block) (or <code>if (!servermode)</code> for the client).</div></li><li
class="level1"><div
class="li"> Add decent <a
href="/com/jme3/gde/core/docs/jme3/advanced/logging.html">logging</a> so your server actually makes sense.</div></li></ul><div
class="tags"><span> <a
href="/wiki/doku.php/tag:intermediate?do=showtag&amp;tag=tag%3Aintermediate">intermediate</a>, <a
href="/wiki/doku.php/tag:server?do=showtag&amp;tag=tag%3Aserver">server</a>, <a
href="/wiki/doku.php/tag:spidermonkey?do=showtag&amp;tag=tag%3Aspidermonkey">spidermonkey</a>, <a
href="/wiki/doku.php/tag:headless?do=showtag&amp;tag=tag%3Aheadless">headless</a>, <a
href="/wiki/doku.php/tag:network?do=showtag&amp;tag=tag%3Anetwork">network</a>, <a
href="/wiki/doku.php/tag:documentation?do=showtag&amp;tag=tag%3Adocumentation">documentation</a> </span></div></div>
<p><em><a href="http://jmonkeyengine.org/wiki/doku.php/jme3:intermediate:headlessserver?do=export_xhtmlbody">view online version</a></em></p>

@ -1,204 +0,0 @@
<h3><a
name="terrain_collision">Terrain Collision</a></h3><div
class="level3"><p> <strong>*Work in progress</strong>*</p><p> This page will extend (not the Java keyword!) the Hello_Terrain tutorial in a few small ways in order to show you a quick way to create a Collision Shape out of the map we have generated. A Collision Shape allows a player (who is also a Collision Shape in this tutorial) to collide with the map, i.e. clip, walk on, stand on, etc. in order to create the type of world and interactivity most gamers are familiar with in FPS or MMOs.</p><div
class="tags"><span> <a
href="/wiki/doku.php/tag:about?do=showtag&amp;tag=tag%3Aabout">about</a> </span></div></div><h3><a
name="sample_code">Sample Code</a></h3><div
class="level3"><pre>package mygame;
&nbsp;
import jme3tools.converters.ImageToAwt;
import com.jme3.app.SimpleBulletApplication;
import com.jme3.bullet.collision.shapes.CapsuleCollisionShape;
import com.jme3.bullet.collision.shapes.HeightfieldCollisionShape;
import com.jme3.bullet.nodes.PhysicsCharacterNode;
import com.jme3.bullet.nodes.PhysicsNode;
import com.jme3.input.KeyInput;
import com.jme3.input.controls.ActionListener;
import com.jme3.input.controls.KeyTrigger;
import com.jme3.material.Material;
import com.jme3.math.Vector3f;
import com.jme3.renderer.Camera;
import com.jme3.terrain.geomipmap.TerrainLodControl;
import com.jme3.terrain.heightmap.AbstractHeightMap;
import com.jme3.terrain.heightmap.ImageBasedHeightMap;
import com.jme3.terrain.geomipmap.TerrainQuad;
import com.jme3.texture.Texture;
import com.jme3.texture.Texture.WrapMode;
import java.util.ArrayList;
import java.util.List;
&nbsp;
public class Main extends SimpleBulletApplication &#123;
&nbsp;
private TerrainQuad terrain;
PhysicsCharacterNode player;
Boolean left = false, right = false, up = false, down = false;
private Vector3f walkDirection = new Vector3f&#40;&#41;;
&nbsp;
public static void main&#40;String&#91;&#93; args&#41; &#123;
Main app = new Main&#40;&#41;;
app.start&#40;&#41;;
&#125;
&nbsp;
@Override
public void simpleInitApp&#40;&#41; &#123;
setupKeys&#40;&#41;;
setupPlayer&#40;&#41;;
&nbsp;
Material terrain_mat;
PhysicsNode landscape;
&nbsp;
/** 1. Create terrain material and load four textures into it. */
terrain_mat = new Material&#40;assetManager, &quot;Common/MatDefs/Terrain/Terrain.j3md&quot;&#41;;
&nbsp;
/** 1.1) Add ALPHA map (for red-blue-green coded splat textures) */
terrain_mat.setTexture&#40;&quot;m_Alpha&quot;, assetManager.loadTexture&#40;&quot;Textures/Terrain/splat/alphamap.png&quot;&#41;&#41;;
&nbsp;
/** 1.2) Add GRASS texture into the red layer (m_Tex1). */
Texture grass = assetManager.loadTexture&#40;&quot;Textures/Terrain/splat/grass.jpg&quot;&#41;;
grass.setWrap&#40;WrapMode.Repeat&#41;;
terrain_mat.setTexture&#40;&quot;m_Tex1&quot;, grass&#41;;
terrain_mat.setFloat&#40;&quot;m_Tex1Scale&quot;, 64f&#41;;
&nbsp;
/** 1.3) Add DIRT texture into the green layer (m_Tex2) */
Texture dirt = assetManager.loadTexture&#40;&quot;Textures/Terrain/splat/dirt.jpg&quot;&#41;;
dirt.setWrap&#40;WrapMode.Repeat&#41;;
terrain_mat.setTexture&#40;&quot;m_Tex2&quot;, dirt&#41;;
terrain_mat.setFloat&#40;&quot;m_Tex2Scale&quot;, 32f&#41;;
&nbsp;
/** 1.4) Add ROAD texture into the blue layer (m_Tex3) */
Texture rock = assetManager.loadTexture&#40;&quot;Textures/Terrain/splat/road.jpg&quot;&#41;;
rock.setWrap&#40;WrapMode.Repeat&#41;;
terrain_mat.setTexture&#40;&quot;m_Tex3&quot;, rock&#41;;
terrain_mat.setFloat&#40;&quot;m_Tex3Scale&quot;, 128f&#41;;
&nbsp;
/** 2. Create the height map */
AbstractHeightMap heightmap = null;
Texture heightMapImage = assetManager.loadTexture&#40;&quot;Textures/Terrain/splat/mountains512.png&quot;&#41;;
heightmap = new ImageBasedHeightMap&#40;
ImageToAwt.convert&#40;heightMapImage.getImage&#40;&#41;, false, true, 0&#41;&#41;;
heightmap.load&#40;&#41;;
&nbsp;
<span>/** 3. We have prepared material and heightmap. Now we create the actual terrain:
* 3.1) We create a TerrainQuad and name it &quot;my terrain&quot;.
* 3.2) A good value for terrain tiles is 64x64 -- so we supply 64+1=65.
* 3.3) We prepared a heightmap of size 512x512 -- so we supply 512+1=513.
* 3.4) At last, we supply the prepared heightmap itself.*/</span>
terrain = new TerrainQuad&#40;&quot;my terrain&quot;, 65, 513, heightmap.getHeightMap&#40;&#41;&#41;;
&nbsp;
HeightfieldCollisionShape sceneShape = new HeightfieldCollisionShape&#40;heightmap.getHeightMap&#40;&#41;&#41;;
landscape = new PhysicsNode&#40;terrain, sceneShape, 0&#41;;
&nbsp;
&nbsp;
/** 4. The LOD (level of detail) depends on were the camera is: */
List&lt;Camera&gt; cameras = new ArrayList&lt;Camera&gt;&#40;&#41;;
cameras.add&#40;getCamera&#40;&#41;&#41;;
TerrainLodControl control = new TerrainLodControl&#40;terrain, cameras&#41;;
terrain.addControl&#40;control&#41;;
&nbsp;
/** 5. We give the terrain its material, position &amp; scale it, and attach it. */
terrain.setMaterial&#40;terrain_mat&#41;;
landscape.setLocalTranslation&#40;0, -100, 0&#41;;
rootNode.attachChild&#40;landscape&#41;;
getPhysicsSpace&#40;&#41;.add&#40;landscape&#41;;
&#125;
&nbsp;
@Override
public void simpleUpdate&#40;float tpf&#41; &#123;
Vector3f camDir = cam.getDirection&#40;&#41;.clone&#40;&#41;.multLocal&#40;0.2f&#41;;
Vector3f camLeft = cam.getLeft&#40;&#41;.clone&#40;&#41;.multLocal&#40;0.1f&#41;;
walkDirection.set&#40;0, 0, 0&#41;;
if &#40;left&#41; &#123;
walkDirection.addLocal&#40;camLeft&#41;;
&#125;
if &#40;right&#41; &#123;
walkDirection.addLocal&#40;camLeft.negate&#40;&#41;&#41;;
&#125;
if &#40;up&#41; &#123;
walkDirection.addLocal&#40;camDir&#41;;
walkDirection.y = 0;
&#125;
if &#40;down&#41; &#123;
walkDirection.addLocal&#40;camDir.negate&#40;&#41;&#41;;
walkDirection.y = 0;
&#125;
player.setWalkDirection&#40;walkDirection&#41;;
cam.setLocation&#40;player.getLocalTranslation&#40;&#41;&#41;;
&#125;
&nbsp;
public void setupPlayer&#40;&#41; &#123;
player = new PhysicsCharacterNode&#40;new CapsuleCollisionShape&#40;1.2f, 3f, 1&#41;, .05f&#41;;
player.setJumpSpeed&#40;20&#41;; //10 default
player.setFallSpeed&#40;30&#41;; //30 default
player.setGravity&#40;30&#41;; //30 default
player.setLocalTranslation&#40;new Vector3f&#40;0f, 250f, 150f&#41;&#41;;
rootNode.attachChild&#40;player&#41;;
getPhysicsSpace&#40;&#41;.add&#40;player&#41;;
&#125;
&nbsp;
private void setupKeys&#40;&#41; &#123;
inputManager.addMapping&#40;&quot;Lefts&quot;, new KeyTrigger&#40;KeyInput.KEY_A&#41;&#41;;
inputManager.addMapping&#40;&quot;Rights&quot;, new KeyTrigger&#40;KeyInput.KEY_D&#41;&#41;;
inputManager.addMapping&#40;&quot;Ups&quot;, new KeyTrigger&#40;KeyInput.KEY_W&#41;&#41;;
inputManager.addMapping&#40;&quot;Downs&quot;, new KeyTrigger&#40;KeyInput.KEY_S&#41;&#41;;
inputManager.addMapping&#40;&quot;Jumps&quot;, new KeyTrigger&#40;KeyInput.KEY_SPACE&#41;&#41;;
inputManager.addListener&#40;actionListener, new String&#91;&#93;&#123;&quot;Lefts&quot;, &quot;Rights&quot;, &quot;Ups&quot;,
&quot;Downs&quot;, &quot;Jumps&quot;&#125;&#41;;
&#125;
private ActionListener&#40;&#41; &#123;
&nbsp;
public void onAction&#40;String binding, boolean value, float tpf&#41; &#123;
if &#40;binding.equals&#40;&quot;Lefts&quot;&#41;&#41; &#123;
if &#40;value &amp;&amp; player.onGround&#40;&#41;&#41; &#123;
left = true;
&#125; else &#123;
left = false;
&#125;
&#125; else if &#40;binding.equals&#40;&quot;Rights&quot;&#41;&#41; &#123;
if &#40;value &amp;&amp; player.onGround&#40;&#41;&#41; &#123;
right = true;
&#125; else &#123;
right = false;
&#125;
&#125; else if &#40;binding.equals&#40;&quot;Ups&quot;&#41;&#41; &#123;
if &#40;value &amp;&amp; player.onGround&#40;&#41;&#41; &#123;
up = true;
&#125; else &#123;
up = false;
&#125;
&#125; else if &#40;binding.equals&#40;&quot;Downs&quot;&#41;&#41; &#123;
if &#40;value &amp;&amp; player.onGround&#40;&#41;&#41; &#123;
down = true;
&#125; else &#123;
down = false;
&#125;
&#125; else if &#40;binding.equals&#40;&quot;Jumps&quot;&#41; &amp;&amp; player.onGround&#40;&#41;&#41; &#123;
player.jump&#40;&#41;;
&#125;
&#125;
&#125;;
&#125;</pre></div><h3><a
name="what_s_going_on">What&#039;s Going On?</a></h3><div
class="level3"><p> To try this code, go into a New Project → JME3 → BasicGame using the default settings (if you haven&#039;t already made a default project before) the name should be BasicGame and the package would be called myGame, then just paste this over the entire preconstructed main.java text. Then Add the jme3-test-data library which is available through your library list. This should compile and run from there.</p></div><h3><a
name="explaining_the_code">Explaining the Code</a></h3><div
class="level3"><p> I will only briefly describe the sections that are covered in the original Hello_Terrain. Most detail will be given to the additives.</p><p> Imports are to bring in the appropriate class definitions.</p><pre>private TerrainQuad terrain;</pre><p> Holds our map.</p><pre>PhysicsCharacterNode player;</pre><p> Creates our character in the style of FPS that many gamers are familiar with.</p><pre>Boolean left = false, right = false, up = false, down = false;</pre><p> Variables for creating fluid movement.</p><pre>private Vector3f walkDirection = new Vector3f&#40;&#41;;</pre><p> The direction we determine from combinations of the booleans.</p><p> The main function is standard.
In simpleInit we run setupKeys() first and create the common WASD and SPACEBAR to jump.</p><pre>inputManager.addListener(actionListener, new String[]{&quot;Lefts&quot;, &quot;Rights&quot;, &quot;Ups&quot;, &quot;Downs&quot;, &quot;Jumps&quot;})</pre><p> This line indicates our actionListener function and what to do when each command (the string names) is sent.</p><p> The onAction function basically sets the booleans true based on which directions we&#039;re pressing or makes us jump.
The simpleUpdate function constants changed our direction based on the boolean (ie the directions) we&#039;re pressing.</p><p> The real collisioning happens in these parts;</p><pre>player = new PhysicsCharacterNode(new CapsuleCollisionShape(1.2f, 3f, 1), .05f);
rootNode.attachChild(player);
getPhysicsSpace().add(player);
HeightfieldCollisionShape sceneShape = new HeightfieldCollisionShape(heightmap.getHeightMap());
landscape = new PhysicsNode(terrain, sceneShape, 0);
landscape.setLocalTranslation(0, -100, 0);
rootNode.attachChild(landscape);
getPhysicsSpace().add(landscape);</pre><p> The first chunk makes our player into a collision shape that&#039;s a capsule, kinda like a human right? And then attaches it to the rootNode and gets it&#039;s physics (important!).
The second chunk feeds the heightmap we made into a heightfield collision shape generator to create the collidable shape of the land mass.
The third chunk sets our land and it&#039;s collision down some, attaches em to root, and gets the physics.</p></div><h3><a
name="conclusion">Conclusion</a></h3><div
class="level3"><p> You should spawn high up in the area and fall down to the map, giving you a few seconds to survey the domain. Then walk around and see how you like the lay of the land.</p><hr
/><p> See also:</p><ul><li
class="level1"><div
class="li"> <a
href="/com/jme3/gde/core/docs/jme3/beginner/hello_terrain.html">Hello Terrain</a>,</div></li><li
class="level1"><div
class="li"> <a
href="/com/jme3/gde/core/docs/jme3/advanced/terrain.html">Terrain</a></div></li></ul></div>
<p><em><a href="http://jmonkeyengine.org/wiki/doku.php/jme3:intermediate:terrain_collision?do=export_xhtmlbody">view online version</a></em></p>
Loading…
Cancel
Save