From 11e23de0eceea945e835fc8939d72a2887a7bf13 Mon Sep 17 00:00:00 2001 From: "nor..67" Date: Thu, 15 Dec 2011 00:57:14 +0000 Subject: [PATCH] SDK: - update some help files from wiki git-svn-id: https://jmonkeyengine.googlecode.com/svn/trunk@8931 75d07b2b-3a1a-0410-a2c5-0572b91ccdca --- .../docs/jme3/advanced/asset_manager.html | 13 +- .../gde/core/docs/jme3/advanced/audio.html | 59 +++-- .../docs/jme3/advanced/custom_controls.html | 48 +++- .../docs/jme3/advanced/effects_overview.html | 11 + .../docs/jme3/advanced/hinges_and_joints.html | 11 +- .../docs/jme3/advanced/light_and_shadow.html | 11 +- .../core/docs/jme3/advanced/monkey_zone.html | 4 +- .../core/docs/jme3/advanced/nifty_gui.html | 2 +- .../jme3/advanced/nifty_gui_xml_layout.html | 2 +- .../gde/core/docs/jme3/advanced/physics.html | 172 +++++++++------ .../docs/jme3/advanced/save_and_load.html | 63 +++++- .../com/jme3/gde/core/docs/jme3/android.html | 22 +- .../core/docs/jme3/beginner/hello_node.html | 50 +++-- .../beginner/hello_simpleapplication.html | 207 +++++++++++------- .../docs/jme3/beginner/hello_terrain.html | 3 + .../core/docs/jme3/build_from_sources.html | 6 +- .../com/jme3/gde/core/docs/jme3/faq.html | 16 +- .../docs/jme3/intermediate/appsettings.html | 13 +- .../jme3/intermediate/headlessserver.html | 14 +- ...impleapplication_from_the_commandline.html | 14 +- .../gde/core/docs/sdk/project_creation.html | 52 ++--- .../jme3/gde/core/docs/sdk/use_own_jme.html | 2 +- 22 files changed, 522 insertions(+), 273 deletions(-) diff --git a/sdk/jme3-core/javahelp/com/jme3/gde/core/docs/jme3/advanced/asset_manager.html b/sdk/jme3-core/javahelp/com/jme3/gde/core/docs/jme3/advanced/asset_manager.html index 8652682ed..b61327a42 100644 --- a/sdk/jme3-core/javahelp/com/jme3/gde/core/docs/jme3/advanced/asset_manager.html +++ b/sdk/jme3-core/javahelp/com/jme3/gde/core/docs/jme3/advanced/asset_manager.html @@ -68,11 +68,14 @@ Creating a material instance with the definition "Unshaded.j3md":

Material mat_brick = new Material( 
-    assetManager, "Common/MatDefs/Misc/Unshaded.j3md");
- 
+    assetManager, "Common/MatDefs/Misc/Unshaded.j3md");
+ +

+ Applying a texture to the material: -<code java> -mat_brick.setTexture("ColorMap", + +

+
mat_brick.setTexture("ColorMap", 
     assetManager.loadTexture("Textures/Terrain/BrickWall/BrickWall.jpg"));

@@ -139,7 +142,7 @@ rootNode.attachChild(scene); - +

NullPointerException: Cannot locate resource?

diff --git a/sdk/jme3-core/javahelp/com/jme3/gde/core/docs/jme3/advanced/audio.html b/sdk/jme3-core/javahelp/com/jme3/gde/core/docs/jme3/advanced/audio.html index b95dbe6e2..d66889707 100644 --- a/sdk/jme3-core/javahelp/com/jme3/gde/core/docs/jme3/advanced/audio.html +++ b/sdk/jme3-core/javahelp/com/jme3/gde/core/docs/jme3/advanced/audio.html @@ -13,23 +13,46 @@ Place audio files in the assets/Sound/ directory of your project. j -

Creating Audio Nodes

+

Creating Audio Nodes: Streamed or Buffered

The main class to look at is com.jme3.audio.AudioNode. -By default, a new audio node is buffered, i.e. JME loads the whole file into memory before playing:

-
AudioNode boom = new AudioNode(assetManager, "Sound/boom.wav");
+ -

+

-If it is a long file, you set the boolean to true to stream the audio. +

Getting AudioNode Properties

+
+
+ + + + + + + + + + + + +
AudioNode MethodUsage
getStatus()Returns either Status.Playing, Status.Stopped, or Status.Paused.
getVolume()Returns the volume.
getPitch()Returns the pitch.
+ +

+There are other obvious getters to poll the status of corresponding setters below.

-
AudioNode music = new AudioNode(assetManager, "Sound/music.wav", true);
@@ -40,24 +63,22 @@ If it is a long file, you set the boolean to true to stream the audio. AudioNode MethodUsage - getStatus()Returns either Status.Playing, Status.Stopped, or Status.Paused. - - - setVolume(1)Sets the volume gain. 1 is the default volume, 2 is twice as loud, 0 is mute. + setVolume(1)Sets the volume gain. 1 is the default volume, 2 is twice as loud, etc. 0 is silent/mute. - setPitch(1)Makes the sound play in a higher or lower pitch. Default is 1. + setPitch(1)Makes the sound play in a higher or lower pitch. Default is 1. 2 is twice as high, .5f is half as low. -
+
- + - +
AudioNode MethodUsage
setLooping(false)Configures the sound that, if it is played, it plays once and stops. This is the default.setLooping(false)Configures the sound so that, if it is played, it plays once and stops. This is the default.
setLooping(true)Configures the sound that, if it is played, it plays repeats from the beginning, until stop() or pause() are called. Good for ambient background noises. setLooping(true)Configures the sound so that, if it is played, it plays repeats from the beginning, until stop() or pause() are called. Good for ambient background noises.
+Does not work for streamed sounds!
setPositional(false)
@@ -70,7 +91,7 @@ setDirectional(false)
All 3D effects switched off. This sound is global setMaxDistance(100f)Maximum distance the sound can be heard, in world units. Default is 20.
-
+
@@ -82,7 +103,7 @@ setLocalTranslation(…)
AudioNode MethodUsage
Activates 3D audio: The sound appears to come f setReverbEnabled(true)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.
-
+
@@ -95,7 +116,7 @@ setDirection(…)
AudioNode MethodUsage
Activates 3D audio: This sound can only be heard from setOuterAngle()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!
- +

Play, Pause, Stop

@@ -164,7 +185,7 @@ Optionally, You can choose from the following environmental presets from c Closet 1.00f1.0f1.0f1.00f0.15f1.0f0.600f0.0025f0.500f0.0006f - +

Activate the preset with setEnvironment(). E.g. in a dungeon environment: @@ -179,7 +200,7 @@ A sound engineer can create a custom com.​jme3.​audio.Environment

-You can find more info about OpenAL and its advanced features here: +You can find more info about OpenAL and its advanced features here: . It depends on the hardware whether audio effects are supported (if not, you get the message OpenAL EFX not available! Audio effects won't work.)

sound, diff --git a/sdk/jme3-core/javahelp/com/jme3/gde/core/docs/jme3/advanced/custom_controls.html b/sdk/jme3-core/javahelp/com/jme3/gde/core/docs/jme3/advanced/custom_controls.html index bfcf06a74..7c61809a5 100644 --- a/sdk/jme3-core/javahelp/com/jme3/gde/core/docs/jme3/advanced/custom_controls.html +++ b/sdk/jme3-core/javahelp/com/jme3/gde/core/docs/jme3/advanced/custom_controls.html @@ -90,12 +90,17 @@ If you want to create a Control that also extends an existing class, then create

public class ControlledThing extends MyThing implements MyControl {
+ 
     protected Spatial spatial;
+ 
     protected boolean enabled = true;
-    public ControlledThing() { }
-    public ControlledThing(int x) {
+ 
+    public ControlledThing() { } // empty serialization constructor
+ 
+    public ControlledThing(int x) { // custom constructor
         super(x);
     }
+ 
     @Override
     public void update(float tpf) {
         if (enabled && spatial != null) {
@@ -103,30 +108,36 @@ If you want to create a Control that also extends an existing class, then create
             // Write custom code to control the spatial here!
         }
     }
+ 
     @Override
     public void render(RenderManager rm, ViewPort vp) {
-        // optional, e.g. to display a debug shape
+        // optional for advanced users, e.g. to display a debug shape
     }
+ 
     @Override
     public Control cloneForSpatial(Spatial spatial) {
         ControlledThing control = new ControlledThing(y);
-        // ... // set custom properties
+        // set custom properties
         spatial.setControl(control);
         return control;
     }
+ 
     @Override
     public void setEnabled(boolean enabled) {
         this.enabled = enabled;
         // ...
     }
+ 
     @Override
     public boolean isEnabled() {
         return enabled;
     }
+ 
     @Override
     public void setSomething(int z) {
-        // your custom method ...
+        // You can add custom methods ...
     }
+ 
     @Override
     public void write(JmeExporter ex) throws IOException {
         super.write(ex);
@@ -151,6 +162,7 @@ If you want to create a Control that also extends an existing class, then create
 

+ This class can be found under com.jme3.scene.control.AbstractControl.

    @@ -163,43 +175,59 @@ This class can be found under com.jme3.scene.control.AbstractControl

    -Usage: Your custom subclass implements the three methods controlUpdate(), controlRender(), and cloneForSpatial() as shown here: +Usage: Your custom subclass implements the three methods controlUpdate(), controlRender(), setSpatial(), and cloneForSpatial() as shown here:

    public class MyControl extends AbstractControl implements Savable, Cloneable {
    -  private Thing thing; // some custom class of yours
    + 
    +  private Thing thing; // some custom field of yours
    + 
       public MyControl(){} // empty serialization constructor
    + 
       public MyControl(thing) { // some custom constructor
    -    super(spatial);
         this.thing = thing;
    +    // Note: you can not access spatial here
    +  }
    + 
    +  @Override
    +  public void setSpatial(Spatial spatial) {
    +    super.setSpatial(spatial);
    +    // optional init method
    +    // you can get and set user data in the spatial here
       }
    + 
       @Override
       protected void controlUpdate(float tpf){
         if(spatial != null && thing != null) {
           // Implement your custom control here ...
    -      // Change scene graph etc
    +      // Change scene graph, access and modify userdata in the spatial, etc
         }
       }
    + 
       @Override
       protected void controlRender(RenderManager rm, ViewPort vp){
    -     // optional rendering manipulation (advanced)
    +     // optional rendering manipulation (for advanced users)
       }
    + 
       @Override
       public Control cloneForSpatial(Spatial spatial){
         final MyControl control = new MyControl(...);
         control.setSpatial(spatial);
         return control;
       }
    + 
       @Override
       public void read(JmeImporter im) throws IOException {
           super.read(im);
           // im.getCapsule(this).read(...);
       }
    + 
       @Override
       public void write(JmeExporter ex) throws IOException {
           super.write(ex);
           // ex.getCapsule(this).write(...);
       }
    + 
     }
diff --git a/sdk/jme3-core/javahelp/com/jme3/gde/core/docs/jme3/advanced/effects_overview.html b/sdk/jme3-core/javahelp/com/jme3/gde/core/docs/jme3/advanced/effects_overview.html index 6ae74dccc..3e55f5ade 100644 --- a/sdk/jme3-core/javahelp/com/jme3/gde/core/docs/jme3/advanced/effects_overview.html +++ b/sdk/jme3-core/javahelp/com/jme3/gde/core/docs/jme3/advanced/effects_overview.html @@ -93,6 +93,17 @@ See also the Grass System + +
  • Contribution:
    +
  • + + + +

    Light and Shadows

    diff --git a/sdk/jme3-core/javahelp/com/jme3/gde/core/docs/jme3/advanced/hinges_and_joints.html b/sdk/jme3-core/javahelp/com/jme3/gde/core/docs/jme3/advanced/hinges_and_joints.html index e0db1cc0d..9019ac5c2 100644 --- a/sdk/jme3-core/javahelp/com/jme3/gde/core/docs/jme3/advanced/hinges_and_joints.html +++ b/sdk/jme3-core/javahelp/com/jme3/gde/core/docs/jme3/advanced/hinges_and_joints.html @@ -146,18 +146,23 @@ You create the PhysicsHingeJoint after you have created the nodes that are to be   joint=new HingeJoint(hookNode.getControl(RigidBodyControl.class), // A pendulumNode.getControl(RigidBodyControl.class), // B - new Vector3f(0f, 0f, 0f), // pivot point of A - new Vector3f(0f,-1f, 0f), // pivot point of B + new Vector3f(0f, 0f, 0f), // pivot point local to A + new Vector3f(0f, 1f, 0f), // pivot point local to B Vector3f.UNIT_Z, // DoF Axis of A (Z axis) Vector3f.UNIT_Z ); // DoF Axis of B (Z axis) +

    + +The pivot point's position will be at (0,0,0) in the global 3D space. In A's local space that is at (0,0,0) and in B's local space (remember B's position was set to (0,-1,0)) that is at (0,1,0). +

    +

    Specify the following parameters for each joint:

    PhysicsControls Code Samples

    @@ -273,7 +275,12 @@ model.addControl(character_phys); bulletAppState.getPhysicsSpace().add(character_phys);

    -Tip: Spheres and Boxes can fall back to the correct default Collision Shape if you do not specify a Collision Shape in the RigidBodyControl constructor. For example, the following creates a box with the correct Box Collision Shape: +

    Spheres and Boxes can fall back to the correct default CollisionShape if you do not specify a CollisionShape in the RigidBodyControl constructor. +

    +

    + +

    +For example, the following creates a box with the correct Box Collision Shape:

    Box(1,1,1);
     myBox.addControl(new RigidBodyControl( 1.0f )); // implicit BoxCollisionShape
    @@ -286,7 +293,7 @@ bulletAppState.getPhysicsSpace().add(myBox);

    -The Physics Space is an object in BulletAppState that is like a rootNode for Physics Controls. +The Physics Space is an object in BulletAppState that is like a rootNode for Physics Controls. It manages global settings.

    1. You can specify parameters such as gravity and accuracy.
      bulletAppState.getPhysicsSpace().setGravity(new Vector3f(0f,-1f,0f));
      @@ -306,7 +313,7 @@ bulletAppState.getPhysicsSpace().setAccuracy(0.005f);

      -You remove physical objects from the scene like this: +You remove physical entities from the scene by removing their PhysicsControl from the PhysicsSpace and also their Spatial from the rootNode:

      bulletAppState.getPhysicsSpace().remove(myPhysicsControl);
      @@ -314,7 +321,7 @@ myModel.removeFromParent();
      -

      Properties of Physical Objects

      +

      Properties of Physical Entities

      @@ -326,50 +333,56 @@ On a PhysicsControl, you can set the following physical properties. RigidBodyControl Method Property - setFriction(1f) Friction. + setGravity(new Vector3f(0f,-10f,0f)) You can change the gravity of individual physics entities after they were added to the physics space. Gravity is a vector pointing towards the center of gravity. The longer the vector, the stronger is gravity. If gravity is the same absolute direction for all entities, set this vector globally on the physics space. If the center of gravity is relative (e.g. towards a planet's core or towards a black hole) then you have to use this method to adjust the vectors of all entities at each tick of the update loop. - setMass(1f) Sets the mass. Dynamic objects have masses > 0.0f.
      -Static immobile obstacles (including buildings and terrains) have mass 0.0f. + setFriction(1f) Friction. Ice and slides have low friction, the are slippery. Soil, concrete and rock have high friction. - setPhysicsLocation()Positions the object. Do not use setLocalTranslation(). + setMass(1f) Sets the mass. Dynamic entities have masses > 0.0f. Heavy dynamic entities need more force to be moved and light ones move with small amounts of force.
      +Static immobile entities (obstacles, including buildings and terrains) must have mass = 0.0f. - setPhysicsRotation()Rotates the object. Do not use setLocalRotate(). + setPhysicsLocation()Positions the entity. Do not use setLocalTranslation() for physical entities.. Important: Make certain not to make CollisionShapes overlap when positioning them (Use the debug mode to check the shapes). - setRestitution(0.0f) How bouncy the object is. For a rubber object set this > 0.0f. This setting has an impact on performance. + setPhysicsRotation()Rotates the entity. Do not use setLocalRotate() for physical entities. - setKinematic(true) A kinematic Spatial is not affected by gravity, but it is solid and affects other physics objects. It has a mass its position is updated from the spatials translation. You can attach joints to it. + setRestitution(0.0f) How bouncy an entity is, normally 0.0f.
      +For a bouncy, such as rubber balls, set this > 0.0f. This setting has an impact on performance, so use it sparingly. - setGravity(new Vector3f(0f,-1f,0f)) You can change the gravity of a physics object after it was added to the physics space. + setKinematic(true) A kinematic RigidBodyControl'ed entity is not affected by gravity or other forces! You write translation and rotation code in the update loop to describe the motion of physical entities. A kinematic has a mass and is solid (e.g. characters can stand on it), this means a kinematic affects other physics entities that bump into it (e.g. pushes them away). You also can attach joints and hinges to it ("air hook"). The position of a kinematic RigidBodyControl is updated depending on its spatial's translation.
      +By default, PhysicsControls are not kinematic. - setCcdMotionThreshold(0.1f) The amount of motion in 1 physics tick to trigger the continuous motion detection. + setCcdMotionThreshold(0.1f) The amount of motion in 1 physics tick to trigger the continuous motion detection. Rarely used, but necessary if you need to fiddle with details. +

      +
      - + - + - + - + - +
      CharacterControl Method Property
      setFallSpeed(1f) Fall speed (down) setUpAxis(1) CharacterControls have a fixed upward axis! This means they cannot fall over.
      +Values: 0 = X axis , 1 = Y axis , 2 = Z axis.
      +Default: 1, because for characters and vehicle, up is typically along the Y axis.
      setJumpSpeed(1f) Jump speed (up) setJumpSpeed(1f) Jump speed (movement along up axis)
      setMaxSlope(1.5f) How steep the slopes are that the character can still climb. setFallSpeed(1f) Fall speed (movement along negative up axis)
      setUpAxis(1) 0 = X axis , 1 = Y axis , 2 = Z axis. E.g. for characters and vehicle, up is usually along the the Y axis. setMaxSlope(1.5f) How steep the slopes and steps are that the character can climb without considering them an obstacle. Higher obstacles need to be jumped. In world units.
      setGravity(1f) You can change the Gravity of a physics object after it was added to the physics space setGravity(1f) The intensity of gravity for this CharacterControl'ed entity. To change the direction of gravity for a character, modify the up axis.
      - +

      Kinematic vs Dynamic vs Static

      @@ -377,75 +390,83 @@ Static immobile obstacles (including buildings and terrains) have mass 0.0f. -All physical objects… +All physical entities…

      • must not overlap.
      • can detect collisions and report several values about the impact.
      • -
      • can respond dynamically or statically or kinematically to collisions.
        +
      • can respond dynamically, or statically, or kinematically to collisions.
      - + - + - + - + - + + + + - + - +
      Property Static Dynamic Kinematic Property Static Kinematic Dynamic
      Does it have a mass?no, 0fyes, >0fyes, >0f (Inertia is calculated for kinematic objects you need mass to do that) ExamplesImmobile obstacles: Floors, walls, buildings, …Remote-controlled entities: Airships, meteorites, doors; networked or remote-controlled NPCs; invisible "airhooks" for hinges and joints.Interactive entities: Rolling balls, movable crates, falling pillar, space ship…
      How does it move?neversetWalkDirection(), setLinearVelocity(), applyForce(), etcsetLocalTranslation(), move() Does it have a mass?no, 0.0fyes1), >0.0f yes, >0.0f
      Can it move and push others?noyesyes How does it move?neversetLocalTranslation();setLinearVelocity(); applyForce();
      +setWalkDirection(); for CharacterControl
      Is is affected by forces?
      -(Falls when it mid-air? Can be pushed by others?)
      noyesno How to place in scene?setPhysicsLocation();
      +setPhysicsRotation()
      setLocalTranslation();
      +setLocalRotation();
      setPhysicsLocation();
      + setPhysicsRotation()
      Can it move and push others?noyesyes
      ExamplesImmobile obstacles: Floor, wall, buildings, …Interactive objects: Soccer ball, movable crate, falling pillar, …Remote-controlled objects: Airship, meteorites, networked NPCs, invisible "airhooks" for hinges and joints. Is is affected by forces?
      +(Falls when it mid-air? Can be pushed by others?)
      nonoyes
      How to activate? setMass(0f), (By default, objects are not kinematics)setMass(1f), setKinematic(false)setMass(1f), setKinematic(true) How to activate? setMass(0f);
      +setKinematic(false);
      setMass(1f);
      +setKinematic(false);
      setMass(1f);
      +setKinematic(true);
      - +

      - -Tip: Typically, Spatials with a kinematic RigidBodyControl are moved programmatically, e.g. using setLocalTranslation() or move() in the update() loop, or by an Animation Path. You can also "hang them up in mid-air" and attach other PhysicsControls to them using hinges and joints. - +

      You move Spatials with a kinematic RigidBodyControl programmatically, that is by using setLocalTranslation() or move() in the update() loop, or using a MotionPath. You can also "hang them up in mid-air" and attach other PhysicsControls to them using hinges and joints. +

      -
      airhook.setKinematic(true);
      -

      Forces: Moving Physical Objects

      +

      Forces: Moving Physical Entities

      -Use the following methods to move physics objects. +Use the following methods to move physics entities.

      - + - + - + - + - + @@ -460,10 +481,11 @@ Use the following methods to move physics objects.
      PhysicsControl Method Motion
      setLinearVelocity(new Vector3f(0f,0f,1f))  Set the linear speed of this object. setLinearVelocity(new Vector3f(0f,0f,1f)) Set the linear speed of this entity.
      setAngularVelocity(new Vector3f(0f,0f,1f)) Set the rotational speed of the object; the x, y and z component are the speed of rotation around that axis. setAngularVelocity(new Vector3f(0f,0f,1f)) Set the rotational speed of the entity; the x, y and z component are the speed of rotation around that axis.
      applyCentralForce(…) Move (push) the object once with a certain moment, expressed as a Vector3f. applyCentralForce(…) Move (push) the entity once with a certain moment, expressed as a Vector3f.
      applyForce(…) Move (push) the object once with a certain moment, expressed as a Vector3f. Optionally, you can specify where on the object the pushing force hits. applyForce(…) Move (push) the entity once with a certain moment, expressed as a Vector3f. Optionally, you can specify where on the entity the pushing force hits.
      applyTorque(…) Rotate (twist) the object once around its axes, expressed as a Vector3f. applyTorque(…) Rotate (twist) the entity once around its axes, expressed as a Vector3f.
      applyImpulse(…) An idealised change of momentum. This is the kind of push that you would use on a pool billiard ball. clearForces()Cancels out all forces (force, torque) etc and stops the motion.
      - +

      -Note: 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. +

      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 entity overlaps with another! Within the game, you typically use the setters shown here exclusively. +

      @@ -480,7 +502,7 @@ PhysicsControls also supports the following features: setCollideWithGroups()
      setCollisionGroup()
      addCollideWithGroup(COLLISION_GROUP_01)
      -removeCollideWithGroup(COLLISION_GROUP_01)Collision Groups are integer bit masks – enums are available in CollisionObject. All physics objects are by default in COLLISION_GROUP_01. Two objects collide when the collideWithGroups set of one contains, the Collision Group of the other. +removeCollideWithGroup(COLLISION_GROUP_01)Collision Groups are integer bit masks – enums are available in CollisionObject. All physics entities are by default in COLLISION_GROUP_01. Two entities collide when the collideWithGroups set of one contains, the Collision Group of the other. setDamping(float, float)The first value is the linear threshold and the second the angular. @@ -492,10 +514,10 @@ removeCollideWithGroup(COLLISION_GROUP_01)Collision Groups are integer setCcdSweptSphereRadius()? - setSleepingThreshold(float,float)Sets the sleeping thresholds wich define when the object gets deactivated to save ressources. Low values keep the object active when it barely moves. The first value is the linear threshold and the second the angular. + setSleepingThreshold(float,float)Sets the sleeping thresholds which define when the entity gets deactivated to save resources. Low values keep the entity active when it barely moves. The first value is the linear threshold and the second the angular.

      - +

      Best Practices

      @@ -517,7 +539,7 @@ removeCollideWithGroup(COLLISION_GROUP_01)Collision Groups are integer
      • -
      • For large static meshes like shooter levels or terrain it is best to divide the scene model into multiple physics objects, with each its own CollisionShape. A huge city level should not be one huge mesh (model) of pavement and streets and buildings. Instead, you make individual models for buildings, for pieces of pavement, for pieces of streets, etc. Position them next to one another to form the whole city, and give each piece its own optimal CollisionShape. E.g. streets can use a fast PlaneCollisionShape if you keep them separate for buildings. Breaking the level into manageable pieces helps the engine improve performance: The less CPU-intensive can now filter out parts of the scene that are behind you or out of reach, and it only calculates the details of collisions for parts that are actually close to the action.
        +
      • For large static meshes like shooter levels or terrain it is best to divide the scene model into multiple physics entities, with each its own CollisionShape. A huge city level should not be one huge mesh (model) of pavement and streets and buildings. Instead, you make individual models for buildings, for pieces of pavement, for pieces of streets, etc. Position them next to one another to form the whole city, and give each piece its own optimal CollisionShape. E.g. streets can use a fast PlaneCollisionShape if you keep them separate for buildings. Breaking the level into manageable pieces helps the engine improve performance: The less CPU-intensive can now filter out parts of the scene that are behind you or out of reach, and it only calculates the details of collisions for parts that are actually close to the action.
      @@ -526,5 +548,9 @@ removeCollideWithGroup(COLLISION_GROUP_01)Collision Groups are integer control
      + +
      +
      1) +Inertia is calculated for kinematic entities, and you need mass to do that.

      view online version

      \ No newline at end of file diff --git a/sdk/jme3-core/javahelp/com/jme3/gde/core/docs/jme3/advanced/save_and_load.html b/sdk/jme3-core/javahelp/com/jme3/gde/core/docs/jme3/advanced/save_and_load.html index 13e7a28c4..064f4a3a7 100644 --- a/sdk/jme3-core/javahelp/com/jme3/gde/core/docs/jme3/advanced/save_and_load.html +++ b/sdk/jme3-core/javahelp/com/jme3/gde/core/docs/jme3/advanced/save_and_load.html @@ -4,7 +4,7 @@

      -You can save and load scenes and individual Nodes using com.jme3.export.binary.BinaryExporter and com.jme3.export.binary.BinaryImporter. Use standard Java serialization to load game data. The jMonkeyEngine binary file format is .j3o. You can open, view, and edit .j3o files in the jMonkeyEngine SDK. +You can save and load scenes and individual Nodes using com.jme3.export.binary.BinaryExporter and com.jme3.export.binary.BinaryImporter. Use standard Java serialization to load game data or use the Savable interface. The jMonkeyEngine binary file format is .j3o. You can open, view, and edit .j3o files in the jMonkeyEngine SDK.

      @@ -53,5 +53,66 @@ You can save and load scenes and individual Nodes using com.jme3.export.binary.B ...   + + +

      Custom Savable

      +
      + +

      + +If you have a custom class that you want to save or assign using setUserData(), the class must implement the com.jme3.export.Savable interface. +

      +
      import com.jme3.export.InputCapsule;
      +import com.jme3.export.JmeExporter;
      +import com.jme3.export.JmeImporter;
      +import com.jme3.export.OutputCapsule;
      +import com.jme3.export.Savable;
      +import com.jme3.material.Material;
      +import java.io.IOException;
      + 
      +public class MyCustomClass implements Savable {
      +    private int      someIntValue;
      +    private float    someFloatValue;
      +    private Material someJmeObject;
      + 
      +    ...
      +    // your other code...
      +    ...
      + 
      +    public void write(JmeExporter ex) throws IOException {
      +        OutputCapsule capsule = ex.getCapsule(this);
      +        capsule.write(someIntValue,   "someIntValue",   1);
      +        capsule.write(someFloatValue, "someFloatValue", 0f);
      +        capsule.write(someJmeObject,  "someJmeObject",  new Material());
      +    }
      + 
      +    public void read(JmeImporter im) throws IOException {
      +        InputCapsule capsule = im.getCapsule(this);
      +        someIntValue   = capsule.readInt(    "someIntValue",   1);
      +        someFloatValue = capsule.readFloat(  "someFloatValue", 0f);
      +        someJmeObject  = capsule.readSavable("someJmeObject",  new Material());
      +    }
      +}
      + +

      +For each class field that you want to save and load, +

      +
        +
      • Add one line that write()s the data to the JmeExport output capsule.
        +
          +
        • Specify the variable to save, give it String name (can be the same as the variable name), and specify a default value.
          +
        • +
        +
      • +
      • Add one line that read…()s the data to the JmeImport input capsule.
        +
          +
        • On the left side of the assignment, specify the class field that you are restoring
          +
        • +
        • One the right side, use the appropriate capsule.read…() method for the data type. Specify the String name of the variable (must be the same ones that you used in the write() method) and a default value.
          +
        • +
        +
      • +
      +

      view online version

      \ No newline at end of file diff --git a/sdk/jme3-core/javahelp/com/jme3/gde/core/docs/jme3/android.html b/sdk/jme3-core/javahelp/com/jme3/gde/core/docs/jme3/android.html index c5da66f32..b6d0ee533 100644 --- a/sdk/jme3-core/javahelp/com/jme3/gde/core/docs/jme3/android.html +++ b/sdk/jme3-core/javahelp/com/jme3/gde/core/docs/jme3/android.html @@ -149,8 +149,6 @@ Open your game project in the jMonkeyEngine SDK. + +
    2. When finished testing, click the "x" next to the run status in the lower right to quit the logging output.
      +

    @@ -180,6 +182,10 @@ The default android run target uses the default device set in the Android config Optionally, download

    +

    +During build, the libraries and main jar file from the main project are copied to the android project libs folder for access. During this operation the desktop-specific libraries are replaced with android specific JARs. +

    +

    Installing NBAndroid

    @@ -199,12 +205,12 @@ Activating the nbandroid plugin in the jMonkeyEngine Hello Node

    -Prerequisites: This tutorial assumes that: +Prerequisites: This tutorial assumes that you have .

    -
      -
    • You have (or set up the jMonkeyEngine3 in another IDE of your choice)
      + +

      +In this tutorial series, we assume that you use the jMonkeyEngine SDK. As an intermediate or advanced Java developer, you will quickly see that, in general, you can develop jMonkeyEngine code in any integrated development environment (NetBeans IDE, Eclipse, IntelliJ) or even from the command line. +

      + +

      +OK, let's get ready to create our first jMonkeyEngine3 application. +

      + + + +

      Create a Project

      +
      + +

      + +In the jMonkeyEngine SDK: +

      +
        +
      1. Choose File→New Project… from the main menu.
      2. -
      3. +
      4. In the New Project wizard, select the template JME3→Basic Game. Click Next.
        +
          +
        1. Specify a project name, e.g. "HelloWorldTutorial"
        2. -
    +
  • Specify a path where to store your new project, e.g. a jMonkeyProjects directory in your home directory.
    +
  • + + +
  • Click Finish.
    +
  • +

    -You are ready to create your first jMonkeyEngine3 game! You can generally use the tutorials in this introductory series with any integrated development environment (IDE), such as the jMonkeyEngine SDK, NetBeans, Eclipse, or run them straight from the commandline. In the following, we will use the jMonkeyEngine SDK. +If you have questions, read more about Project Creation here. +

    + +

    +

    We recommend to go through the steps yourself, as described in the tutorials. Alternatively, you can create a project based on the JmeTests template in the jMonkeyEngine SDK. It will create a project that already contains the jme3test.helloworld samples (and many others). For example, you can use the JmeTests project to verify whether you got the solution right. +

    -

    Writing a SimpleApplication

    +

    Write a SimpleApplication

    -Create a jme3test.helloworld package and a file HelloJME3.java in it. +For this tutorial, you want to create a jme3test.helloworld package in your project, and create a file HelloJME3.java in it.

    -In the jMonkeyEngine SDK, you right-click the Source Packages node: +In the jMonkeyEngine SDK:

    -
      -
    • Select New… > Java Class to create a new file.
      +
        +
      1. Right-click the Source Packages node of your project.
        +
      2. +
      3. Choose New…→Java Class to create a new file.
      4. -
      5. Enter a class name: HelloJME3
        +
      6. Enter the class name: HelloJME3
      7. -
      8. Enter a package: jme3test.helloworld
        +
      9. Enter the package name: jme3test.helloworld.
      10. Click Finish.
      11. -
    + + +

    +The SDK creates the file HelloJME3.java for you. +

    @@ -88,19 +125,21 @@ public class HelloJME3 extends SimpleApplication { }

    -Build and run the HelloJME3 class. If a jme settings dialog pops up, confirm the default settings. +Right-click the HelloJME3 class and choose Run. If a jME3 settings dialog pops up, confirm the default settings.

      -
    1. You should see a simple window displaying a 3-D cube.
      +
    2. You should see a simple window displaying a 3D cube.
      +
    3. +
    4. Press the WASD keys and move the mouse to navigate around.
    5. -
    6. Use the WASD keys and the mouse to navigate around.
      +
    7. Look at the FPS text and object count information in the bottom left. You will use this information during development, and you will remove it for the release. (To read the numbers correctly, consider that the 14 lines of text counts as 14 objects with 914 vertices.)
    8. Press Escape to close the application.

    -Congratulations, it works! How did we do that? +Congratulations! Now let's find out how it works!

    @@ -110,7 +149,42 @@ Congratulations, it works! How did we do that?

    -The code above has initialized the scene, and started the game. +The code above has initialized the scene, and started the application. +

    + + + +

    Start the SimpleApplication

    +
    + +

    + +Look at the first line. The HelloJME3.java class extends com.jme3.app.SimpleApplication. +

    +
    public class HelloJME3 extends SimpleApplication {
    +  // your code...
    +}
    + +

    +Every JME3 game is an instance of com.jme3.app.SimpleApplication. The SimpleApplication class manages your 3D scene graph and automatically draws it to the screen – that is, in short, what a game engine does for you! +

    + +

    +You start every JME3 game from the main() method, as every standard Java application: +

    +
      +
    1. Instantiate your SimpleApplication-based class
      +
    2. +
    3. Call the application's start() method to start the game engine.
      +
    4. +
    +
        public static void main(String[] args){
    +        HelloJME3 app = new HelloJME3(); // instantiate the game
    +        app.start();                     // start the game!
    +    }
    + +

    +This code opens your application window. Let's learn how you put something into the window next.

    @@ -119,44 +193,55 @@ The code above has initialized the scene, and started the game.
    - + + + + - + - + - + - +
    What you want to doHow you say it in JME3 terminologyWhat you want to doHow you say that in JME3 terminology
    You want to create a cube.I create a Geometry with a 1x1x1 Box shape.
    You want to create a cube.You create a Geometry with a 1x1x1 Box shape.You want to use a blue color.I create a Material with a blue Color property.
    You want to use a blue color.You create a Material with a blue Color property.You want to colorize the cube blue.I set the Material of the Box Geometry.
    You want to colorize the cube blue.You set the Geometry's Material.You want to add the cube to the scene.I attach the Box Geometry to the rootNode.
    You want the cube to appear in the scene.You attach the cube to the rootNode.You want the cube to appear in the center.I create the Box at the origin = at Vector3f.ZERO.
    - + +

    + +If you are unfamiliar with the vocabulary, read more about the Scene Graph here. +

    +
    -

    Initializing the Scene

    +

    Initialize the Scene

    -In Java, the creation of a blue cube looks as follows: +Look at rest of the code sample. The simpleInitApp() method is automatically called once at the beginning when the application starts. Every JME3 game must have this method. In the simpleInitApp() method, you load game objects before the game starts.

        public void simpleInitApp() {
    -        Box(Vector3f.ZERO, 1, 1, 1); // create cube shape at the origin
    -        Geometry geom = new Geometry("Box", b);  // create cube geometry from the shape
    -        Material mat = new Material(assetManager,
    -          "Common/MatDefs/Misc/Unshaded.j3md");  // create a simple material
    -        mat.setColor("Color", ColorRGBA.Blue);   // set color of material to blue
    -        geom.setMaterial(mat);                   // set the cube's material
    -        rootNode.attachChild(geom);              // make the cube appear in the scene
    +       // your initialization code...
         }

    -In the simpleInitApp() method, you create or load all game objects before the game starts. The simpleInitApp() method is automatically called once at the beginning of every JME3 game. +The initialization code of a blue cube looks as follows:

    +
        public void simpleInitApp() {
    +        Box(Vector3f.ZERO, 1, 1, 1); // create a 1x1x1 box shape at the origin
    +        Geometry geom = new Geometry("Box", b);  // create a cube geometry from the box shape
    +        Material mat = new Material(assetManager,
    +          "Common/MatDefs/Misc/Unshaded.j3md");  // create a simple material
    +        mat.setColor("Color", ColorRGBA.Blue);   // set color of material to blue
    +        geom.setMaterial(mat);                   // set the cube geometry 's material
    +        rootNode.attachChild(geom);              // make the cube geometry appear in the scene
    +    }

    A typical JME3 game has the following initialization process: @@ -168,23 +253,23 @@ A typical JME3 game has the following initialization process:

  • You make objects appear in the scene by attaching them to the rootNode.
  • -
  • Examples: Load player, terrain, sky, enemies, obstacles, and place them in their start positions.
    +
  • Examples: Load player, terrain, sky, enemies, obstacles, …, and place them in their start positions.
  • You initialize variables
      -
    • You set variables to their start values.
      +
    • You create variables to track the game state.
    • -
    • You want to use variables track the game state.
      +
    • You set variables to their start values.
    • -
    • Examples: Set the score to 0, set health to 100%, and so on.
      +
    • Examples: Set the score to 0, set health to 100%, …
  • -
  • You initialize keys and mouse actions
    +
  • You initialize keys and mouse actions.
      -
    • The following input bindings are pre-configured by default:
      +
    • The following input bindings are pre-configured:
      • W,A,S,D keys – Move around in the scene
      • @@ -194,9 +279,9 @@ A typical JME3 game has the following initialization process:
    • -
    • Add your own keys and mouse clicks.
      +
    • Define your own additional keys and mouse click actions.
    • -
    • Examples: Click to shoot, press Space to jump, etc.
      +
    • Examples: Click to shoot, press Space to jump, …
  • @@ -204,37 +289,11 @@ A typical JME3 game has the following initialization process:
    -

    Starting the Game

    -
    - -

    - -The HelloJME3.java class extends com.jme3.app.SimpleApplication, which is a subclass of com.jme3.app.Application. Every JME3 game is an instance of com.jme3.app.SimpleApplication. -

    - -

    -To run a JME3 game, you first instantiate your SimpleApplication-based class, and then call its start() method: -

    -
        public static void main(String[] args){
    -        HelloJME3 app = new HelloJME3();
    -        app.start(); // start the game
    -    }
    - -

    -Typically you start a game from your Java application's main() method. -

    - -
    -

    Conclusion

    -These few lines of code simply display a static 3D cube. You can navigate around in this 3D scene. -

    - -

    You have learned that a SimpleApplication is a good starting point because it provides you with:

      @@ -248,23 +307,23 @@ You have learned that a SimpleApplication is a good starting point because it pr

      -When developing a game application, you will now want to: +When developing a game application, you want to:

        -
      1. Initialize your game world,
        +
      2. Initialize the game scene
      3. -
      4. Trigger actions in the event loop,
        +
      5. Trigger game actions
      6. Respond to user input.

      -In the following tutorials you learn how accomplish these tasks with the jMonkeyEngine 3. +The now following tutorials teach how you accomplish these tasks with the jMonkeyEngine 3.

      -Continue with the Hello Node tutorial, where we will first show you more details about how to initialize the game world, also known as the scene graph. +Continue with the Hello Node tutorial, where you learn more details about how to initialize the game world, also known as the scene graph.


      diff --git a/sdk/jme3-core/javahelp/com/jme3/gde/core/docs/jme3/beginner/hello_terrain.html b/sdk/jme3-core/javahelp/com/jme3/gde/core/docs/jme3/beginner/hello_terrain.html index 51f3fa1bc..e153f41de 100644 --- a/sdk/jme3-core/javahelp/com/jme3/gde/core/docs/jme3/beginner/hello_terrain.html +++ b/sdk/jme3-core/javahelp/com/jme3/gde/core/docs/jme3/beginner/hello_terrain.html @@ -23,6 +23,7 @@ One way to create a 3D landscape is to sculpt a huge terrain model. This gives y   import com.jme3.app.SimpleApplication; import com.jme3.material.Material; +import com.jme3.renderer.Camera; import com.jme3.terrain.geomipmap.TerrainLodControl; import com.jme3.terrain.heightmap.AbstractHeightMap; import com.jme3.terrain.geomipmap.TerrainQuad; @@ -32,6 +33,8 @@ import com.jme3.terrain.heightmap.ImageBasedHeightMap; import com.jme3.texture.Texture; import com.jme3.texture.Texture.WrapMode; import jme3tools.converters.ImageToAwt; +import java.util.ArrayList; +import java.util.List;   public class HelloTerrain extends SimpleApplication {   diff --git a/sdk/jme3-core/javahelp/com/jme3/gde/core/docs/jme3/build_from_sources.html b/sdk/jme3-core/javahelp/com/jme3/gde/core/docs/jme3/build_from_sources.html index 043eeda71..4eed5239b 100644 --- a/sdk/jme3-core/javahelp/com/jme3/gde/core/docs/jme3/build_from_sources.html +++ b/sdk/jme3-core/javahelp/com/jme3/gde/core/docs/jme3/build_from_sources.html @@ -4,7 +4,7 @@

      -We recommend downloading the - but of course you can also build the jMonkeyEngine yourself from the sources. You need Subversion installed. +We recommend downloading the - but of course you can also build the jMonkeyEngine yourself from the sources. In this case, you need the file version system installed (svn).

        @@ -17,7 +17,7 @@ We recommend downloading the -
      1. Use: Create a Java SE project and place dist/jMonkeyEngine3.jar and all JARs from the dist/lib directory on the classpath.
        +
      2. Use: Create a Java SE project and place all JARs from the dist/lib directory on the classpath.
        • You can now extend your first game from com.jme3.app.SimpleApplication.
        • diff --git a/sdk/jme3-core/javahelp/com/jme3/gde/core/docs/jme3/faq.html b/sdk/jme3-core/javahelp/com/jme3/gde/core/docs/jme3/faq.html index 8122885ea..ba440061d 100644 --- a/sdk/jme3-core/javahelp/com/jme3/gde/core/docs/jme3/faq.html +++ b/sdk/jme3-core/javahelp/com/jme3/gde/core/docs/jme3/faq.html @@ -510,14 +510,24 @@ Use PhysicsControl's joints. -

          How do I get rid of the debug display (fps, stats)?

          +

          What are these FPS/Objects/Vertices/Triangles statistics?

          +
          + +

          +At the bottom left of every default SimpleGame, you see the StatsView and the FPS (frames per seconds) view. It provides you with extra information during the development phase. For example, if the object count is increasing and the FPS slows down, then you now that your code attaches too many and does not detach enough objects. +

          + +
          + +

          How do I get rid of the FPS/Objects statistics?

          In the application's simpleInitApp() method, call: +

          -
          setDisplayFps(false);
          -setDisplayStatView(false);
          +
          setDisplayFps(false); // to hide the FPS
          +setDisplayStatView(false); // to hide the statistics 
          diff --git a/sdk/jme3-core/javahelp/com/jme3/gde/core/docs/jme3/intermediate/appsettings.html b/sdk/jme3-core/javahelp/com/jme3/gde/core/docs/jme3/intermediate/appsettings.html index b8f9f6543..72a4450d5 100644 --- a/sdk/jme3-core/javahelp/com/jme3/gde/core/docs/jme3/intermediate/appsettings.html +++ b/sdk/jme3-core/javahelp/com/jme3/gde/core/docs/jme3/intermediate/appsettings.html @@ -43,8 +43,9 @@ Set the boolean in the AppSettings contructor to true if you want to keep the de Settings Property (Video)DescriptionDefault - setRenderer(AppSettings.LWJGL_OPENGL2)
          -setRenderer(AppSettings.LWJGL_OPENGL3)Switch Video RendererOpenGL 2 + setRenderer(AppSettings.LWJGL_OPENGL1)
          +setRenderer(AppSettings.LWJGL_OPENGL2)
          +setRenderer(AppSettings.LWJGL_OPENGL3)Switch Video Renderer to OpenGL 1.1, OpenGL 2, or OpenGL 3.3. If your graphic card does not support all OpenGL2 features (UnsupportedOperationException: GLSL and OpenGL2 is required for the LWJGL renderer), then you can force your SimpleApplication to use OpenGL1 compatibility. (Then you still can't use special OpenGL2 features, but at least the error goes away and you can continue with the rest.) OpenGL 2 setBitsPerPixel(32)Set the color depth.
          @@ -74,7 +75,7 @@ Set VSync to false to deactivate vertical syncing (faster, but possible page tea 60 fps -
          +
          @@ -85,7 +86,7 @@ Set VSync to false to deactivate vertical syncing (faster, but possible page tea
          Settings Property (Input)DescriptionDefault
          setUseJoysticks(true)Activate optional joystick supportfalse
          -
          +
          @@ -96,7 +97,7 @@ Set VSync to false to deactivate vertical syncing (faster, but possible page tea
          Settings Property (Audio)DescriptionDefault
          setStereo3D(true)Enable 3D stereo. This feature requires hardware support from the GPU driver. See . Currently, your everday user's hardware does not support this, so you can ignore it for now.false
          -
          +
          @@ -111,7 +112,7 @@ ImageIO.read(new File("")), …});
          Settings Property (Branding)DescriptionDefault
          This specifies the little a setSettingsDialogImage("/path/to/splash.png")A custom splashscreen image in the assets directory which is displayed when the settings dialog is shown."/com/jme3/app/Monkey.png"
          - +

          Saving and Loading Settings

          diff --git a/sdk/jme3-core/javahelp/com/jme3/gde/core/docs/jme3/intermediate/headlessserver.html b/sdk/jme3-core/javahelp/com/jme3/gde/core/docs/jme3/intermediate/headlessserver.html index e5d4de37d..8092ab56e 100644 --- a/sdk/jme3-core/javahelp/com/jme3/gde/core/docs/jme3/intermediate/headlessserver.html +++ b/sdk/jme3-core/javahelp/com/jme3/gde/core/docs/jme3/intermediate/headlessserver.html @@ -87,6 +87,14 @@ var BP_DTheme = { var ajax_image = "http://jmonkeyengine.org/wp-content/plugins/cd-bp-avatar-bubble/_inc/images"; var ajax_delay = "0"; + @@ -151,7 +159,7 @@ var NS='jme3:intermediate';var JSINFO = {"id":"jme3:intermediate:headlessserver" - + @@ -307,7 +315,7 @@ You've followed a link to a topic that doesn't exist yet. If permissio
          -
            +
           
          @@ -351,7 +359,7 @@ You've followed a link to a topic that doesn't exist yet. If permissio - +
          diff --git a/sdk/jme3-core/javahelp/com/jme3/gde/core/docs/jme3/simpleapplication_from_the_commandline.html b/sdk/jme3-core/javahelp/com/jme3/gde/core/docs/jme3/simpleapplication_from_the_commandline.html index 3dced4955..515df107f 100644 --- a/sdk/jme3-core/javahelp/com/jme3/gde/core/docs/jme3/simpleapplication_from_the_commandline.html +++ b/sdk/jme3-core/javahelp/com/jme3/gde/core/docs/jme3/simpleapplication_from_the_commandline.html @@ -70,20 +70,18 @@ mkdir HelloJME3/src/hello

          -Next we copy the necessary JAR libraries. You only have to do this set of steps once every time you download a new JME3 build. +Next you copy the necessary JAR libraries from the download to your project. You only have to do this set of steps once every time you download a new JME3 build.

          mkdir HelloJME3/build 
           mkdir HelloJME3/lib
          -cp jme3/jMonkeyEngine3.jar HelloJME3/lib
          -cp jme3/lib/*.*            HelloJME3/lib
          +cp jme3/lib/*.* HelloJME3/lib

          -If you have built JME3 from the sources, then the paths are different: +If you have built JME3 from the sources, then the copy paths are different:

          mkdir HelloJME3/build 
           mkdir HelloJME3/lib
          -cp jme3/dist/jMonkeyEngine3.jar HelloJME3/lib
          -cp jme3/dist/*.*                HelloJME3/lib
          +cp jme3/dist/*.* HelloJME3/lib
          @@ -132,13 +130,13 @@ public class HelloJME3 extends SimpleApplication { We build the sample application into the build directory…

          cd HelloJME3
          -javac -d build -cp "lib/eventbus-1.4.jar:lib/j-ogg-oggd.jar:lib/j-ogg-vorbisd.jar:lib/jME3-lwjgl-natives.jar:lib/jMonkeyEngine3.jar:lib/jbullet.jar:lib/jheora-jst-debug-0.6.0.jar:lib/jinput.jar:lib/jme3test.jar:lib/jme3testdata.jar:lib/lwjgl.jar:lib/nifty-1.3-SNAPSHOT.jar:lib/nifty-default-controls-1.3-SNAPSHOT.jar:lib/nifty-examples-1.3-SNAPSHOT.jar:lib/nifty-style-black-1.3-SNAPSHOT.jar:lib/nifty-style-grey-1.0.jar:lib/stack-alloc.jar:lib/vecmath.jar:lib/xmlpull-xpp3-1.1.4c.jar:." src/hello/HelloJME3.java 
          +javac -d build -cp "lib/eventbus-1.4.jar:lib/j-ogg-oggd.jar:lib/j-ogg-vorbisd.jar:lib/jME3-lwjgl-natives.jar:lib/jbullet.jar:lib/jinput.jar:lib/lwjgl.jar:lib/stack-alloc.jar:lib/vecmath.jar:lib/xmlpull-xpp3-1.1.4c.jar:lib/jME3-blender.jar:lib/jME3-core.jar:lib/jME3-desktop.jar:lib/jME3-jogg.jar:lib/jME3-plugins.jar:lib/jME3-terrain.jar:lib/jME3-testdata.jar:lib/jME3-niftygui.jar:lib/nifty-default-controls.jar:lib/nifty-examples.jar:lib/nifty-style-black.jar:lib/nifty.jar:." src/hello/HelloJME3.java

          … and run it.

          cd build
          -java -cp "../lib/eventbus-1.4.jar:../lib/j-ogg-oggd.jar:../lib/j-ogg-vorbisd.jar:../lib/jME3-lwjgl-natives.jar:../lib/jMonkeyEngine3.jar:../lib/jbullet.jar:../lib/jheora-jst-debug-0.6.0.jar:../lib/jinput.jar:../lib/jme3test.jar:../lib/jme3testdata.jar:../lib/lwjgl.jar:../lib/nifty-1.3-SNAPSHOT.jar:../lib/nifty-default-controls-1.3-SNAPSHOT.jar:../lib/nifty-examples-1.3-SNAPSHOT.jar:../lib/nifty-style-black-1.3-SNAPSHOT.jar:../lib/nifty-style-grey-1.0.jar:../lib/stack-alloc.jar:../lib/vecmath.jar:../lib/xmlpull-xpp3-1.1.4c.jar:." hello/HelloJME3
          +java -cp "../lib/eventbus-1.4.jar:../lib/j-ogg-oggd.jar:../lib/j-ogg-vorbisd.jar:../lib/jME3-lwjgl-natives.jar:../lib/jbullet.jar:../lib/jinput.jar:../lib/lwjgl.jar:../lib/stack-alloc.jar:../lib/vecmath.jar:../lib/xmlpull-xpp3-1.1.4c.jar:../lib/jME3-blender.jar:../lib/jME3-core.jar:../lib/jME3-desktop.jar:../lib/jME3-jogg.jar:../lib/jME3-plugins.jar:../lib/jME3-terrain.jar:../lib/jME3-testdata.jar:../lib/jME3-niftygui.jar:../lib/nifty-default-controls.jar:../lib/nifty-examples.jar:../lib/nifty-style-black.jar:../lib/nifty.jar:." hello/HelloJME3

          Note: If you use Windows, the classpath separator is ";" instead of ":". diff --git a/sdk/jme3-core/javahelp/com/jme3/gde/core/docs/sdk/project_creation.html b/sdk/jme3-core/javahelp/com/jme3/gde/core/docs/sdk/project_creation.html index d3ecde1f7..0cb829358 100644 --- a/sdk/jme3-core/javahelp/com/jme3/gde/core/docs/sdk/project_creation.html +++ b/sdk/jme3-core/javahelp/com/jme3/gde/core/docs/sdk/project_creation.html @@ -47,7 +47,7 @@ Let's have a look at the abstract project structure in the Project Explorer

        • Source Packages node: This is where you manage your packages and classes. For a newly created project, it contains one package and one class, Main.java. Double click Main.java to open it in the editor.
        • -
        • Libraries node: An overview of all libraies on your game's classpath. The classpath is already set-up for the jme3 framework (including LWJGL, JOGG, JOAL, JOGL, etc).
          +
        • Libraries node: An overview of all libraies on your game's classpath. The classpath is already set-up for the jme3 framework (including LWJGL, Bullet, Nifty GUI, etc).
        @@ -128,23 +128,25 @@ Right-Click the project to open the Project properties.

        +You may want to use external Java libraries in your jME project, for example content generators or artificial intelligence implementations. +

        + +

        Add the library to the global library list:

        • Select Tools→Libraries in the main menu.
        • -
        • Click "New Library", enter a name for the library and press OK
          +
        • Click "New Library", enter a name for the library, and press OK
        • In the "Classpath" tab, press "Add JAR/Folder" and select the jar file(s) needed for the library
        • -
        • In the "JavaDoc" tab, press "Add ZIP/Folder" and select the javadoc for the library (zipped or folder)
          +
        • (Optional) In the "JavaDoc" tab, press "Add ZIP/Folder" and select the javadoc for the library, as zip file or folder.
        • -
        • In the "Sources" tab you can select a folder or jar file containing the source files of the library if available
          +
        • (Optional) In the "Sources" tab you can select a folder or jar file containing the source files of the library.
        • Press OK
        • -
        • Right-Click your project
          -

        @@ -162,7 +164,7 @@ Add the library to a project:

        -Thats it, your project can now use the external library. +That's it, your project can now use the external library. If you also linked the javadoc and sources, the SDK will assist you with javadoc popups, code completion (ctrl-space) and source navigation (ctrl-click).

        @@ -170,9 +172,9 @@ Thats it, your project can now use the external library.

        Development Process

          -
        • Creating new files and packages: Select the Source Packages node (or any of its subnodes), and press ctrl-N (File>New File): Use the New File wizard to create new Java classes, Java packages, Java beans, Swing forms, Junit files, JME3 Materials and Models, and many more.
          +
        • Creating new files and packages: Select the Source Packages node (or any of its subnodes), and press ctrl-N (File→New File): Use the New File wizard to create new Java classes, Java packages, Java beans, Swing forms, JUnit files, j3m Materials, j3o scenes, j3f filters, and many more.
        • -
        • Editing files: Open the Projects Explorer and double-click a Java file from the Source Packages to open it in the Editor. The jMonkeyEngine SDK Code Editor assists you in many ways, including Syntactic and semantic code coloring, code completion, and javadoc. (More...)
          +
        • Editing files: Open the Projects Explorer and double-click a Java file from the Source Packages to open it in the Editor. The jMonkeyEngine SDK Code Editor assists you in many ways, including syntactic and semantic code coloring, code completion, and javadoc. (More...)
        • Adding Assets:
            @@ -182,7 +184,7 @@ Thats it, your project can now use the external library.
        • -
        • ToDo List: The tasks window automatically lists all lines containing errors and warnings, and all lines that you have marked with comment keywords such as FIXME, @todo, TODO.
          +
        • ToDo List: The tasks window automatically lists all lines containing errors and warnings, and all lines that you have marked with the comment keywords FIXME, @todo, or TODO.
        • Integrated tools: Debugging, Testing, Profiling.
        • @@ -230,30 +232,24 @@ Thats it, your project can now use the external library.

          Running Sample Projects

          -
            -
          1. Choose File > New Project from the main menu.
            -
          2. -
          3. In the New Project Wizard, select JME3 > JME3 Tests
            -
          4. -
          5. Click next to pick a path where to store the JME3Tests project.
            -
          6. -
          7. Click Finish. The sample project opens.
            -
          8. -
          9. Right-click the JME3Tests project and choose Run.
            + +

            + +The SDK contains Sample Code (read more). +

            + +

            +Open the Source Packages node of the JmeTests project. +

              -
            • Use the TestChooser to try out the included jMonkeyEngine demos!
              +
            • Right-click the JME3Tests project and choose Run.
              +Choose samples from the TestChooser and try out the included demos.
            • -
            -
          10. -
          11. Open the Source Packages node of the sample's project.
            -
              -
            • Browse a demo's source code to learn how a feature is implemented.
              +
            • Browse a demo's source code in the SDK's Project window to learn how a feature is implemented and used.
            • Feel free to modify the code samples and experiment! If you break something, you can always recreate the packaged samples from the JME3 Tests template.
            -
          12. -

          view online version

          \ No newline at end of file diff --git a/sdk/jme3-core/javahelp/com/jme3/gde/core/docs/sdk/use_own_jme.html b/sdk/jme3-core/javahelp/com/jme3/gde/core/docs/sdk/use_own_jme.html index 001b6c4c7..d6a6fb43b 100644 --- a/sdk/jme3-core/javahelp/com/jme3/gde/core/docs/sdk/use_own_jme.html +++ b/sdk/jme3-core/javahelp/com/jme3/gde/core/docs/sdk/use_own_jme.html @@ -16,7 +16,7 @@
        • Press "Add Jar/Folder"
        • -
        • Select jMonkeyEngine3.jar from the dist dir of the compiled jme3 version
          +
        • Select all JAR files from the dist dir of the compiled jme3 version
        • Add the src folder of the jme3 project in the "sources" tab