Sfoglia il codice sorgente

Removes the use of the deprecated Box contructor with the mesh origin in HelloNode. also updated the wiki and made the screenshot up to date to what the tutorial produces

git-svn-id: https://jmonkeyengine.googlecode.com/svn/trunk@10719 75d07b2b-3a1a-0410-a2c5-0572b91ccdca
rem..om 12 anni fa
parent
commit
b01ac95cfc
1 ha cambiato i file con 4 aggiunte e 2 eliminazioni
  1. 4 2
      engine/src/test/jme3test/helloworld/HelloNode.java

+ 4 - 2
engine/src/test/jme3test/helloworld/HelloNode.java

@@ -54,16 +54,18 @@ public class HelloNode extends SimpleApplication {
     public void simpleInitApp() {
 
         /** create a blue box at coordinates (1,-1,1) */
-        Box box1 = new Box( new Vector3f(1,-1,1), 1,1,1);
+        Box box1 = new Box(1,1,1);
         Geometry blue = new Geometry("Box", box1);
+        blue.setLocalTranslation(new Vector3f(1,-1,1));
         Material mat1 = new Material(assetManager, 
                 "Common/MatDefs/Misc/Unshaded.j3md");
         mat1.setColor("Color", ColorRGBA.Blue);
         blue.setMaterial(mat1);
 
         /** create a red box straight above the blue one at (1,3,1) */
-        Box box2 = new Box( new Vector3f(1,3,1), 1,1,1);
+        Box box2 = new Box(1,1,1);      
         Geometry red = new Geometry("Box", box2);
+        red.setLocalTranslation(new Vector3f(1,3,1));
         Material mat2 = new Material(assetManager, 
                 "Common/MatDefs/Misc/Unshaded.j3md");
         mat2.setColor("Color", ColorRGBA.Red);