Просмотр исходного кода

test: don't use deprecated box constructor

Kirill Vainer 9 лет назад
Родитель
Сommit
112a77fd5d
43 измененных файлов с 68 добавлено и 52 удалено
  1. 1 1
      jme3-android/src/main/java/jme3test/android/SimpleTexturedTest.java
  2. 2 1
      jme3-core/src/main/java/com/jme3/cinematic/MotionPath.java
  3. 2 1
      jme3-examples/src/main/java/jme3test/animation/TestCameraMotionPath.java
  4. 2 1
      jme3-examples/src/main/java/jme3test/animation/TestCinematic.java
  5. 2 1
      jme3-examples/src/main/java/jme3test/animation/TestMotionPath.java
  6. 1 1
      jme3-examples/src/main/java/jme3test/app/TestAppStateLifeCycle.java
  7. 1 1
      jme3-examples/src/main/java/jme3test/app/TestBareBonesApp.java
  8. 1 1
      jme3-examples/src/main/java/jme3test/app/TestReleaseDirectMemory.java
  9. 1 1
      jme3-examples/src/main/java/jme3test/audio/TestAmbient.java
  10. 1 1
      jme3-examples/src/main/java/jme3test/awt/TestAwtPanels.java
  11. 1 1
      jme3-examples/src/main/java/jme3test/awt/TestSafeCanvas.java
  12. 2 2
      jme3-examples/src/main/java/jme3test/batching/TestBatchNode.java
  13. 1 1
      jme3-examples/src/main/java/jme3test/batching/TestBatchNodeCluster.java
  14. 1 1
      jme3-examples/src/main/java/jme3test/batching/TestBatchNodeTower.java
  15. 1 1
      jme3-examples/src/main/java/jme3test/bullet/TestAttachDriver.java
  16. 2 2
      jme3-examples/src/main/java/jme3test/bullet/TestBrickTower.java
  17. 2 2
      jme3-examples/src/main/java/jme3test/bullet/TestBrickWall.java
  18. 1 1
      jme3-examples/src/main/java/jme3test/bullet/TestCcd.java
  19. 1 1
      jme3-examples/src/main/java/jme3test/bullet/TestCollisionGroups.java
  20. 1 1
      jme3-examples/src/main/java/jme3test/bullet/TestGhostObject.java
  21. 1 1
      jme3-examples/src/main/java/jme3test/bullet/TestRagdollCharacter.java
  22. 1 1
      jme3-examples/src/main/java/jme3test/bullet/TestWalkingChar.java
  23. 4 2
      jme3-examples/src/main/java/jme3test/collision/TestMousePick.java
  24. 2 2
      jme3-examples/src/main/java/jme3test/effect/TestSoftParticles.java
  25. 9 4
      jme3-examples/src/main/java/jme3test/games/CubeField.java
  26. 1 1
      jme3-examples/src/main/java/jme3test/helloworld/HelloAssets.java
  27. 1 1
      jme3-examples/src/main/java/jme3test/helloworld/HelloInput.java
  28. 2 1
      jme3-examples/src/main/java/jme3test/light/TestDirectionalLightShadow.java
  29. 2 1
      jme3-examples/src/main/java/jme3test/light/TestPssmShadow.java
  30. 1 1
      jme3-examples/src/main/java/jme3test/light/TestShadow.java
  31. 1 1
      jme3-examples/src/main/java/jme3test/light/TestShadowsPerf.java
  32. 1 1
      jme3-examples/src/main/java/jme3test/light/TestSpotLight.java
  33. 1 1
      jme3-examples/src/main/java/jme3test/light/TestSpotLightShadows.java
  34. 2 1
      jme3-examples/src/main/java/jme3test/model/shape/TestBillboard.java
  35. 0 1
      jme3-examples/src/main/java/jme3test/model/shape/TestBox.java
  36. 1 1
      jme3-examples/src/main/java/jme3test/niftygui/TestNiftyGui.java
  37. 1 1
      jme3-examples/src/main/java/jme3test/niftygui/TestNiftyToMesh.java
  38. 2 1
      jme3-examples/src/main/java/jme3test/post/TestBloom.java
  39. 2 1
      jme3-examples/src/main/java/jme3test/post/TestCrossHatch.java
  40. 2 1
      jme3-examples/src/main/java/jme3test/post/TestPosterization.java
  41. 1 1
      jme3-examples/src/main/java/jme3test/post/TestRenderToMemory.java
  42. 2 2
      jme3-examples/src/main/java/jme3test/post/TestRenderToTexture.java
  43. 1 1
      jme3-examples/src/main/java/jme3test/water/TestPostWater.java

+ 1 - 1
jme3-android/src/main/java/jme3test/android/SimpleTexturedTest.java

@@ -46,7 +46,7 @@ public class SimpleTexturedTest extends SimpleApplication {
 
 
 		shapeSphere = new Sphere(16, 16, .5f);
-		shapeBox = new Box(Vector3f.ZERO, 0.3f, 0.3f, 0.3f);
+            shapeBox = new Box(0.3f, 0.3f, 0.3f);
 
 
 	//	ModelConverter.optimize(geom);

+ 2 - 1
jme3-core/src/main/java/com/jme3/cinematic/MotionPath.java

@@ -121,7 +121,8 @@ public class MotionPath implements Savable {
             Material m = assetManager.loadMaterial("Common/Materials/RedColor.j3m");
             for (Iterator<Vector3f> it = spline.getControlPoints().iterator(); it.hasNext();) {
                 Vector3f cp = it.next();
-                Geometry geo = new Geometry("box", new Box(cp, 0.3f, 0.3f, 0.3f));
+                Geometry geo = new Geometry("box", new Box(0.3f, 0.3f, 0.3f));
+                geo.setLocalTranslation(cp);
                 geo.setMaterial(m);
                 debugNode.attachChild(geo);
 

+ 2 - 1
jme3-examples/src/main/java/jme3test/animation/TestCameraMotionPath.java

@@ -139,7 +139,8 @@ public class TestCameraMotionPath extends SimpleApplication {
 
 
         rootNode.attachChild(teapot);
-        Geometry soil = new Geometry("soil", new Box(new Vector3f(0, -1.0f, 0), 50, 1, 50));
+        Geometry soil = new Geometry("soil", new Box(50, 1, 50));
+        soil.setLocalTranslation(0, -1, 0);
         soil.setMaterial(matSoil);
         rootNode.attachChild(soil);
         DirectionalLight light = new DirectionalLight();

+ 2 - 1
jme3-examples/src/main/java/jme3test/animation/TestCinematic.java

@@ -222,7 +222,8 @@ public class TestCinematic extends SimpleApplication {
         matSoil.setColor("Diffuse", ColorRGBA.Green);
         matSoil.setColor("Specular", ColorRGBA.Black);
 
-        Geometry soil = new Geometry("soil", new Box(new Vector3f(0, -6.0f, 0), 50, 1, 50));
+        Geometry soil = new Geometry("soil", new Box(50, 1, 50));
+        soil.setLocalTranslation(0, -6, 0);
         soil.setMaterial(matSoil);
         soil.setShadowMode(ShadowMode.Receive);
         rootNode.attachChild(soil);

+ 2 - 1
jme3-examples/src/main/java/jme3test/animation/TestMotionPath.java

@@ -136,7 +136,8 @@ public class TestMotionPath extends SimpleApplication {
 
 
         rootNode.attachChild(teapot);
-        Geometry soil = new Geometry("soil", new Box(new Vector3f(0, -1.0f, 0), 50, 1, 50));
+        Geometry soil = new Geometry("soil", new Box(50, 1, 50));
+        soil.setLocalTranslation(0, -1, 0);
         soil.setMaterial(matSoil);
 
         rootNode.attachChild(soil);

+ 1 - 1
jme3-examples/src/main/java/jme3test/app/TestAppStateLifeCycle.java

@@ -57,7 +57,7 @@ public class TestAppStateLifeCycle extends SimpleApplication {
 
     @Override
     public void simpleInitApp() {
-        Box b = new Box(Vector3f.ZERO, 1, 1, 1);
+        Box b = new Box(1, 1, 1);
         Geometry geom = new Geometry("Box", b);
         Material mat = new Material(assetManager, "Common/MatDefs/Misc/Unshaded.j3md");
         mat.setTexture("ColorMap", assetManager.loadTexture("Interface/Logo/Monkey.jpg"));

+ 1 - 1
jme3-examples/src/main/java/jme3test/app/TestBareBonesApp.java

@@ -56,7 +56,7 @@ public class TestBareBonesApp extends LegacyApplication {
         System.out.println("Initialize");
 
         // create a box
-        boxGeom = new Geometry("Box", new Box(Vector3f.ZERO, 2, 2, 2));
+        boxGeom = new Geometry("Box", new Box(2, 2, 2));
 
         // load some default material
         boxGeom.setMaterial(assetManager.loadMaterial("Interface/Logo/Logo.j3m"));

+ 1 - 1
jme3-examples/src/main/java/jme3test/app/TestReleaseDirectMemory.java

@@ -50,7 +50,7 @@ public class TestReleaseDirectMemory extends SimpleApplication {
 
     @Override
     public void simpleInitApp() {
-        Box b = new Box(Vector3f.ZERO, 1, 1, 1);
+        Box b = new Box(1, 1, 1);
         Geometry geom = new Geometry("Box", b);
         Material mat = new Material(assetManager, "Common/MatDefs/Misc/Unshaded.j3md");
         mat.setTexture("ColorMap", assetManager.loadTexture("Interface/Logo/Monkey.jpg"));

+ 1 - 1
jme3-examples/src/main/java/jme3test/audio/TestAmbient.java

@@ -69,7 +69,7 @@ public class TestAmbient extends SimpleApplication {
     nature.play();
     
     // just a blue box to mark the spot
-    Box box1 = new Box(Vector3f.ZERO, .5f, .5f, .5f);
+    Box box1 = new Box(.5f, .5f, .5f);
     Geometry player = new Geometry("Player", box1);
     Material mat1 = new Material(assetManager,
             "Common/MatDefs/Misc/Unshaded.j3md");

+ 1 - 1
jme3-examples/src/main/java/jme3test/awt/TestAwtPanels.java

@@ -90,7 +90,7 @@ public class TestAwtPanels extends SimpleApplication {
     public void simpleInitApp() {
         flyCam.setDragToRotate(true);
         
-        Box b = new Box(Vector3f.ZERO, 1, 1, 1);
+        Box b = new Box(1, 1, 1);
         Geometry geom = new Geometry("Box", b);
         Material mat = new Material(assetManager, "Common/MatDefs/Misc/Unshaded.j3md");
         mat.setTexture("ColorMap", assetManager.loadTexture("Interface/Logo/Monkey.jpg"));

+ 1 - 1
jme3-examples/src/main/java/jme3test/awt/TestSafeCanvas.java

@@ -59,7 +59,7 @@ public class TestSafeCanvas extends SimpleApplication {
     public void simpleInitApp() {
         flyCam.setDragToRotate(true);
 
-        Box b = new Box(Vector3f.ZERO, 1, 1, 1);
+        Box b = new Box(1, 1, 1);
         Geometry geom = new Geometry("Box", b);
         Material mat = new Material(assetManager, "Common/MatDefs/Misc/Unshaded.j3md");
         mat.setTexture("ColorMap", assetManager.loadTexture("Interface/Logo/Monkey.jpg"));

+ 2 - 2
jme3-examples/src/main/java/jme3test/batching/TestBatchNode.java

@@ -82,7 +82,7 @@ public class TestBatchNode extends SimpleApplication {
          * A cube with a color "bleeding" through transparent texture. Uses
          * Texture from jme3-test-data library!
          */
-        Box boxshape4 = new Box(Vector3f.ZERO, 1f, 1f, 1f);
+        Box boxshape4 = new Box(1f, 1f, 1f);
         cube = new Geometry("cube1", boxshape4);
         Material mat = assetManager.loadMaterial("Textures/Terrain/Pond/Pond.j3m");
         cube.setMaterial(mat);
@@ -93,7 +93,7 @@ public class TestBatchNode extends SimpleApplication {
          * A cube with a color "bleeding" through transparent texture. Uses
          * Texture from jme3-test-data library!
          */
-        Box box = new Box(Vector3f.ZERO, 1f, 1f, 1f);
+        Box box = new Box(1f, 1f, 1f);
         cube2 = new Geometry("cube2", box);
         cube2.setMaterial(mat);
 

+ 1 - 1
jme3-examples/src/main/java/jme3test/batching/TestBatchNodeCluster.java

@@ -166,7 +166,7 @@ public class TestBatchNodeCluster extends SimpleApplication {
     public void randomGenerator() {
         for (int i = startAt; i < maxCubes - 1; i++) {
             randomize();
-            Geometry box = new Geometry("Box" + i, new Box(Vector3f.ZERO, 1, 1, 1));
+            Geometry box = new Geometry("Box" + i, new Box(1, 1, 1));
             box.setLocalTranslation(new Vector3f(xPosition.get(xPosition.size() - 1),
                     yPosition.get(yPosition.size() - 1),
                     zPosition.get(zPosition.size() - 1)));

+ 1 - 1
jme3-examples/src/main/java/jme3test/batching/TestBatchNodeTower.java

@@ -193,7 +193,7 @@ public class TestBatchNodeTower extends SimpleApplication {
     }
 
     public void initFloor() {
-        Box floorBox = new Box(Vector3f.ZERO, 10f, 0.1f, 5f);
+        Box floorBox = new Box(10f, 0.1f, 5f);
         floorBox.scaleTextureCoordinates(new Vector2f(3, 6));
 
         Geometry floor = new Geometry("floor", floorBox);

+ 1 - 1
jme3-examples/src/main/java/jme3test/bullet/TestAttachDriver.java

@@ -112,7 +112,7 @@ public class TestAttachDriver extends SimpleApplication implements ActionListene
         tex.setMinFilter(Texture.MinFilter.Trilinear);
         mat.setTexture("ColorMap", tex);
 
-        Box floor = new Box(Vector3f.ZERO, 100, 1f, 100);
+        Box floor = new Box(100, 1f, 100);
         Geometry floorGeom = new Geometry("Floor", floor);
         floorGeom.setMaterial(mat);
         floorGeom.setLocalTranslation(new Vector3f(0f, -3, 0f));

+ 2 - 2
jme3-examples/src/main/java/jme3test/bullet/TestBrickTower.java

@@ -126,7 +126,7 @@ public class TestBrickTower extends SimpleApplication {
         bullet.setTextureMode(TextureMode.Projected);
         bulletCollisionShape = new SphereCollisionShape(0.4f);
 
-        brick = new Box(Vector3f.ZERO, brickWidth, brickHeight, brickDepth);
+        brick = new Box(brickWidth, brickHeight, brickDepth);
         brick.scaleTextureCoordinates(new Vector2f(1f, .5f));
         //bulletAppState.getPhysicsSpace().enableDebug(assetManager);
         initMaterial();
@@ -204,7 +204,7 @@ public class TestBrickTower extends SimpleApplication {
     }
 
     public void initFloor() {
-        Box floorBox = new Box(Vector3f.ZERO, 10f, 0.1f, 5f);
+        Box floorBox = new Box(10f, 0.1f, 5f);
         floorBox.scaleTextureCoordinates(new Vector2f(3, 6));
 
         Geometry floor = new Geometry("floor", floorBox);

+ 2 - 2
jme3-examples/src/main/java/jme3test/bullet/TestBrickWall.java

@@ -90,7 +90,7 @@ public class TestBrickWall extends SimpleApplication {
         bullet = new Sphere(32, 32, 0.4f, true, false);
         bullet.setTextureMode(TextureMode.Projected);
         bulletCollisionShape = new SphereCollisionShape(0.4f);
-        brick = new Box(Vector3f.ZERO, bLength, bHeight, bWidth);
+        brick = new Box(bLength, bHeight, bWidth);
         brick.scaleTextureCoordinates(new Vector2f(1f, .5f));
 
         initMaterial();
@@ -151,7 +151,7 @@ public class TestBrickWall extends SimpleApplication {
     }
 
     public void initFloor() {
-        Box floorBox = new Box(Vector3f.ZERO, 10f, 0.1f, 5f);
+        Box floorBox = new Box(10f, 0.1f, 5f);
         floorBox.scaleTextureCoordinates(new Vector2f(3, 6));
 
         Geometry floor = new Geometry("floor", floorBox);

+ 1 - 1
jme3-examples/src/main/java/jme3test/bullet/TestCcd.java

@@ -98,7 +98,7 @@ public class TestCcd extends SimpleApplication implements ActionListener {
         Node node2 = new Node();
         node2.setName("mesh");
         node2.setLocalTranslation(new Vector3f(2.5f, 0, 0f));
-        node2.addControl(new RigidBodyControl(new MeshCollisionShape(new Box(Vector3f.ZERO, 4, 4, 0.1f)), 0));
+        node2.addControl(new RigidBodyControl(new MeshCollisionShape(new Box(4, 4, 0.1f)), 0));
         rootNode.attachChild(node2);
         getPhysicsSpace().add(node2);
 

+ 1 - 1
jme3-examples/src/main/java/jme3test/bullet/TestCollisionGroups.java

@@ -85,7 +85,7 @@ public class TestCollisionGroups extends SimpleApplication {
         getPhysicsSpace().add(node2);
 
         // the floor, does not move (mass=0)
-        Node node3 = PhysicsTestHelper.createPhysicsTestNode(assetManager, new MeshCollisionShape(new Box(Vector3f.ZERO, 100f, 0.2f, 100f)), 0);
+        Node node3 = PhysicsTestHelper.createPhysicsTestNode(assetManager, new MeshCollisionShape(new Box(100f, 0.2f, 100f)), 0);
         node3.getControl(RigidBodyControl.class).setPhysicsLocation(new Vector3f(0f, -6, 0f));
         rootNode.attachChild(node3);
         getPhysicsSpace().add(node3);

+ 1 - 1
jme3-examples/src/main/java/jme3test/bullet/TestGhostObject.java

@@ -65,7 +65,7 @@ public class TestGhostObject extends SimpleApplication {
         bulletAppState.setDebugEnabled(true);
 
         // Mesh to be shared across several boxes.
-        Box boxGeom = new Box(Vector3f.ZERO, 1f, 1f, 1f);
+        Box boxGeom = new Box(1f, 1f, 1f);
         // CollisionShape to be shared across several boxes.
         CollisionShape shape = new BoxCollisionShape(new Vector3f(1, 1, 1));
 

+ 1 - 1
jme3-examples/src/main/java/jme3test/bullet/TestRagdollCharacter.java

@@ -139,7 +139,7 @@ public class TestRagdollCharacter extends SimpleApplication implements AnimEvent
     }
 
     public void initWall(float bLength, float bWidth, float bHeight) {
-        Box brick = new Box(Vector3f.ZERO, bLength, bHeight, bWidth);
+        Box brick = new Box(bLength, bHeight, bWidth);
         brick.scaleTextureCoordinates(new Vector2f(1f, .5f));
         Material mat2 = new Material(assetManager, "Common/MatDefs/Misc/Unshaded.j3md");
         TextureKey key = new TextureKey("Textures/Terrain/BrickWall/BrickWall.jpg");

+ 1 - 1
jme3-examples/src/main/java/jme3test/bullet/TestWalkingChar.java

@@ -171,7 +171,7 @@ public class TestWalkingChar extends SimpleApplication implements ActionListener
         float zOff = -40;
         float startpt = bLength / 4 - xOff;
         float height = 6.1f;
-        brick = new Box(Vector3f.ZERO, bLength, bHeight, bWidth);
+        brick = new Box(bLength, bHeight, bWidth);
         brick.scaleTextureCoordinates(new Vector2f(1f, .5f));
         for (int j = 0; j < 15; j++) {
             for (int i = 0; i < 4; i++) {

+ 4 - 2
jme3-examples/src/main/java/jme3test/collision/TestMousePick.java

@@ -107,8 +107,9 @@ public class TestMousePick extends SimpleApplication {
  
     /** A cube object for target practice */
     protected Geometry makeCube(String name, float x, float y, float z) {
-        Box box = new Box(new Vector3f(x, y, z), 1, 1, 1);
+        Box box = new Box(1, 1, 1);
         Geometry cube = new Geometry(name, box);
+        cube.setLocalTranslation(x, y, z);
         Material mat1 = new Material(assetManager, "Common/MatDefs/Misc/Unshaded.j3md");
         mat1.setColor("Color", ColorRGBA.randomColor());
         cube.setMaterial(mat1);
@@ -117,8 +118,9 @@ public class TestMousePick extends SimpleApplication {
 
     /** A floor to show that the "shot" can go through several objects. */
     protected Geometry makeFloor() {
-        Box box = new Box(new Vector3f(0, -4, -5), 15, .2f, 15);
+        Box box = new Box(15, .2f, 15);
         Geometry floor = new Geometry("the Floor", box);
+        floor.setLocalTranslation(0, -4, -5);
         Material mat1 = new Material(assetManager, "Common/MatDefs/Misc/Unshaded.j3md");
         mat1.setColor("Color", ColorRGBA.Gray);
         floor.setMaterial(mat1);

+ 2 - 2
jme3-examples/src/main/java/jme3test/effect/TestSoftParticles.java

@@ -76,7 +76,7 @@ public class TestSoftParticles extends SimpleApplication {
 
 
         // -------- floor
-        Box b = new Box(Vector3f.ZERO, 10, 0.1f, 10);
+        Box b = new Box(10, 0.1f, 10);
         Geometry geom = new Geometry("Box", b);
         Material mat = new Material(assetManager, "Common/MatDefs/Misc/Unshaded.j3md");
         mat.setColor("Color", ColorRGBA.Gray);
@@ -84,7 +84,7 @@ public class TestSoftParticles extends SimpleApplication {
         geom.setMaterial(mat);
         rootNode.attachChild(geom);
 
-        Box b2 = new Box(Vector3f.ZERO, 1, 1, 1);
+        Box b2 = new Box(1, 1, 1);
         Geometry geom2 = new Geometry("Box", b2);
         Material mat2 = new Material(assetManager, "Common/MatDefs/Misc/Unshaded.j3md");
         mat2.setColor("Color", ColorRGBA.DarkGray);

+ 9 - 4
jme3-examples/src/main/java/jme3test/games/CubeField.java

@@ -197,9 +197,9 @@ public class CubeField extends SimpleApplication implements AnalogListener {
     private Geometry createFirstCube() {
         Vector3f loc = player.getLocalTranslation();
         loc.addLocal(4, 0, 0);
-        Box b = new Box(loc, 1, 1, 1);
-
+        Box b = new Box(1, 1, 1);
         Geometry geom = new Geometry("Box", b);
+        geom.setLocalTranslation(loc);
         Material mat = new Material(assetManager, "Common/MatDefs/Misc/Unshaded.j3md");
         mat.setColor("Color", ColorRGBA.Blue);
         geom.setMaterial(mat);
@@ -216,10 +216,15 @@ public class CubeField extends SimpleApplication implements AnalogListener {
         playerMesh.setMaterial(playerMaterial);
         playerMesh.setName("player");
 
-        Box floor = new Box(Vector3f.ZERO.add(playerMesh.getLocalTranslation().getX(),
-                playerMesh.getLocalTranslation().getY() - 1, 0), 100, 0, 100);
+        Box floor = new Box(100, 0, 100);
+        
         Geometry floorMesh = new Geometry("Box", floor);
 
+        Vector3f translation = Vector3f.ZERO.add(playerMesh.getLocalTranslation().getX(),
+                playerMesh.getLocalTranslation().getY() - 1, 0);
+
+        floorMesh.setLocalTranslation(translation);
+
         floorMaterial = new Material(assetManager, "Common/MatDefs/Misc/Unshaded.j3md");
         floorMaterial.setColor("Color", ColorRGBA.LightGray);
         floorMesh.setMaterial(floorMaterial);

+ 1 - 1
jme3-examples/src/main/java/jme3test/helloworld/HelloAssets.java

@@ -60,7 +60,7 @@ public class HelloAssets extends SimpleApplication {
         rootNode.attachChild(teapot);
 
         /** Create a wall (Box with material and texture from test-data) */
-        Box box = new Box(Vector3f.ZERO, 2.5f,2.5f,1.0f);
+        Box box = new Box(2.5f, 2.5f, 1.0f);
         Spatial wall = new Geometry("Box", box );
         Material mat_brick = new Material( assetManager, "Common/MatDefs/Misc/Unshaded.j3md");
         mat_brick.setTexture("ColorMap", assetManager.loadTexture("Textures/Terrain/BrickWall/BrickWall.jpg"));

+ 1 - 1
jme3-examples/src/main/java/jme3test/helloworld/HelloInput.java

@@ -57,7 +57,7 @@ public class HelloInput extends SimpleApplication {
 
   @Override
   public void simpleInitApp() {
-    Box b = new Box(Vector3f.ZERO, 1, 1, 1);
+      Box b = new Box(1, 1, 1);
     player = new Geometry("Player", b);
     Material mat = new Material(assetManager, "Common/MatDefs/Misc/Unshaded.j3md");
     mat.setColor("Color", ColorRGBA.Blue);

+ 2 - 1
jme3-examples/src/main/java/jme3test/light/TestDirectionalLightShadow.java

@@ -127,9 +127,10 @@ public class TestDirectionalLightShadow extends SimpleApplication implements Act
             t.setLocalTranslation(FastMath.nextRandomFloat() * 200f, FastMath.nextRandomFloat() * 30f + 20, 30f * (i + 2f));
         }
 
-        Box b = new Box(new Vector3f(0, 10, 550), 1000, 2, 1000);
+        Box b = new Box(1000, 2, 1000);
         b.scaleTextureCoordinates(new Vector2f(10, 10));
         ground = new Geometry("soil", b);
+        ground.setLocalTranslation(0, 10, 550);
         matGroundU = new Material(assetManager, "Common/MatDefs/Misc/Unshaded.j3md");
         matGroundU.setColor("Color", ColorRGBA.Green);
 

+ 2 - 1
jme3-examples/src/main/java/jme3test/light/TestPssmShadow.java

@@ -113,9 +113,10 @@ public class TestPssmShadow extends SimpleApplication implements ActionListener
             t.setLocalTranslation(FastMath.nextRandomFloat() * 200f, FastMath.nextRandomFloat() * 30f + 20, 30f * (i + 2f));
         }
 
-        Box b = new Box(new Vector3f(0, 10, 550), 1000, 2, 1000);
+        Box b = new Box(1000, 2, 1000);
         b.scaleTextureCoordinates(new Vector2f(10, 10));
         ground = new Geometry("soil", b);
+        ground.setLocalTranslation(0, 10, 550);
         matGroundU = new Material(assetManager, "Common/MatDefs/Misc/Unshaded.j3md");
         matGroundU.setColor("Color", ColorRGBA.Green);
 

+ 1 - 1
jme3-examples/src/main/java/jme3test/light/TestShadow.java

@@ -76,7 +76,7 @@ public class TestShadow extends SimpleApplication {
 
         Material mat = assetManager.loadMaterial("Common/Materials/WhiteColor.j3m");
         rootNode.setShadowMode(ShadowMode.Off);
-        Box floor = new Box(Vector3f.ZERO, 3, 0.1f, 3);
+        Box floor = new Box(3, 0.1f, 3);
         Geometry floorGeom = new Geometry("Floor", floor);
         floorGeom.setMaterial(mat);
         floorGeom.setLocalTranslation(0,-0.2f,0);

+ 1 - 1
jme3-examples/src/main/java/jme3test/light/TestShadowsPerf.java

@@ -83,7 +83,7 @@ public class TestShadowsPerf extends SimpleApplication {
 
         mat = assetManager.loadMaterial("Textures/Terrain/Pond/Pond.j3m");
 
-        Box b = new Box(Vector3f.ZERO, 800, 1, 700);
+        Box b = new Box(800, 1, 700);
         b.scaleTextureCoordinates(new Vector2f(50, 50));
         Geometry ground = new Geometry("ground", b);
         ground.setMaterial(mat);

+ 1 - 1
jme3-examples/src/main/java/jme3test/light/TestSpotLight.java

@@ -100,7 +100,7 @@ public class TestSpotLight extends SimpleApplication {
       //  mat.setBoolean("VertexLighting", true);
         
         
-        Box floor = new Box(Vector3f.ZERO, 50, 1f, 50);
+        Box floor = new Box(50, 1f, 50);
         TangentBinormalGenerator.generate(floor);
         floor.scaleTextureCoordinates(new Vector2f(5, 5));
         Geometry floorGeom = new Geometry("Floor", floor);

+ 1 - 1
jme3-examples/src/main/java/jme3test/light/TestSpotLightShadows.java

@@ -148,7 +148,7 @@ public class TestSpotLightShadows extends SimpleApplication {
         //  mat.setBoolean("VertexLighting", true);
 
 
-        Box floor = new Box(Vector3f.ZERO, 50, 1f, 50);
+        Box floor = new Box(50, 1f, 50);
         TangentBinormalGenerator.generate(floor);
         floor.scaleTextureCoordinates(new Vector2f(5, 5));
         Geometry floorGeom = new Geometry("Floor", floor);

+ 2 - 1
jme3-examples/src/main/java/jme3test/model/shape/TestBillboard.java

@@ -64,8 +64,9 @@ public class TestBillboard extends SimpleApplication {
         g3.setMaterial(mat2);
         g3.setLocalTranslation(.5f, .5f, .01f);
 
-        Box b = new Box(new Vector3f(0, 0, 3), .25f, .5f, .25f);
+        Box b = new Box(.25f, .5f, .25f);
         Geometry g2 = new Geometry("Box", b);
+        g2.setLocalTranslation(0, 0, 3);
         g2.setMaterial(mat);
 
         Node bb = new Node("billboard");

+ 0 - 1
jme3-examples/src/main/java/jme3test/model/shape/TestBox.java

@@ -34,7 +34,6 @@ package jme3test.model.shape;
 
 import com.jme3.app.SimpleApplication;
 import com.jme3.material.Material;
-import com.jme3.math.Vector3f;
 import com.jme3.scene.Geometry;
 import com.jme3.scene.shape.Box;
 

+ 1 - 1
jme3-examples/src/main/java/jme3test/niftygui/TestNiftyGui.java

@@ -54,7 +54,7 @@ public class TestNiftyGui extends SimpleApplication implements ScreenController
 
     @Override
     public void simpleInitApp() {
-        Box b = new Box(Vector3f.ZERO, 1, 1, 1);
+        Box b = new Box(1, 1, 1);
         Geometry geom = new Geometry("Box", b);
         Material mat = new Material(assetManager, "Common/MatDefs/Misc/Unshaded.j3md");
         mat.setTexture("ColorMap", assetManager.loadTexture("Interface/Logo/Monkey.jpg"));

+ 1 - 1
jme3-examples/src/main/java/jme3test/niftygui/TestNiftyToMesh.java

@@ -79,7 +79,7 @@ public class TestNiftyToMesh extends SimpleApplication{
         niftyView.setClearFlags(true, true, true);
         niftyView.setOutputFrameBuffer(fb);
 
-        Box b = new Box(Vector3f.ZERO, 1, 1, 1);
+        Box b = new Box(1, 1, 1);
         Geometry geom = new Geometry("Box", b);
         Material mat = new Material(assetManager, "Common/MatDefs/Misc/Unshaded.j3md");
         mat.setTexture("ColorMap", tex);

+ 2 - 1
jme3-examples/src/main/java/jme3test/post/TestBloom.java

@@ -102,7 +102,8 @@ public class TestBloom extends SimpleApplication {
 
   
 
-        Geometry soil=new Geometry("soil", new Box(new Vector3f(0, -13, 550), 800, 10, 700));
+        Geometry soil = new Geometry("soil", new Box(800, 10, 700));
+        soil.setLocalTranslation(0, -13, 550);
         soil.setMaterial(matSoil);
         soil.setShadowMode(ShadowMode.CastAndReceive);
         rootNode.attachChild(soil);

+ 2 - 1
jme3-examples/src/main/java/jme3test/post/TestCrossHatch.java

@@ -102,7 +102,8 @@ public class TestCrossHatch extends SimpleApplication {
 
   
 
-        Geometry soil=new Geometry("soil", new Box(new Vector3f(0, -13, 550), 800, 10, 700));
+        Geometry soil = new Geometry("soil", new Box(800, 10, 700));
+        soil.setLocalTranslation(0, -13, 550);
         soil.setMaterial(matSoil);
         soil.setShadowMode(ShadowMode.CastAndReceive);
         rootNode.attachChild(soil);

+ 2 - 1
jme3-examples/src/main/java/jme3test/post/TestPosterization.java

@@ -102,7 +102,8 @@ public class TestPosterization extends SimpleApplication {
 
   
 
-        Geometry soil=new Geometry("soil", new Box(new Vector3f(0, -13, 550), 800, 10, 700));
+        Geometry soil = new Geometry("soil", new Box(800, 10, 700));
+        soil.setLocalTranslation(0, -13, 550);
         soil.setMaterial(matSoil);
         soil.setShadowMode(ShadowMode.CastAndReceive);
         rootNode.attachChild(soil);

+ 1 - 1
jme3-examples/src/main/java/jme3test/post/TestRenderToMemory.java

@@ -202,7 +202,7 @@ public class TestRenderToMemory extends SimpleApplication implements SceneProces
         offView.setOutputFrameBuffer(offBuffer);
 
         // setup framebuffer's scene
-        Box boxMesh = new Box(Vector3f.ZERO, 1,1,1);
+        Box boxMesh = new Box(1, 1, 1);
         Material material = assetManager.loadMaterial("Interface/Logo/Logo.j3m");
         offBox = new Geometry("box", boxMesh);
         offBox.setMaterial(material);

+ 2 - 2
jme3-examples/src/main/java/jme3test/post/TestRenderToTexture.java

@@ -93,7 +93,7 @@ public class TestRenderToTexture extends SimpleApplication implements ActionList
         offView.setOutputFrameBuffer(offBuffer);
 
         // setup framebuffer's scene
-        Box boxMesh = new Box(Vector3f.ZERO, 1,1,1);
+        Box boxMesh = new Box(1, 1, 1);
         Material material = assetManager.loadMaterial("Interface/Logo/Logo.j3m");
         offBox = new Geometry("box", boxMesh);
         offBox.setMaterial(material);
@@ -110,7 +110,7 @@ public class TestRenderToTexture extends SimpleApplication implements ActionList
         cam.lookAt(Vector3f.ZERO, Vector3f.UNIT_Y);
 
         //setup main scene
-        Geometry quad = new Geometry("box", new Box(Vector3f.ZERO, 1,1,1));
+        Geometry quad = new Geometry("box", new Box(1, 1, 1));
 
         Texture offTex = setupOffscreenView();
 

+ 1 - 1
jme3-examples/src/main/java/jme3test/water/TestPostWater.java

@@ -194,7 +194,7 @@ public class TestPostWater extends SimpleApplication {
 
     private void createBox() {
         //creating a transluscent box
-        box = new Geometry("box", new Box(new Vector3f(0, 0, 0), 50, 50, 50));
+        box = new Geometry("box", new Box(50, 50, 50));
         Material mat = new Material(assetManager, "Common/MatDefs/Misc/Unshaded.j3md");
         mat.setColor("Color", new ColorRGBA(1.0f, 0, 0, 0.3f));
         mat.getAdditionalRenderState().setBlendMode(BlendMode.Alpha);