Sfoglia il codice sorgente

- remove usage of Box mesh constructor with position from BasicGame template
- deprecate Box mesh constructor with position and add cause to javadoc
- BOOYA

git-svn-id: https://jmonkeyengine.googlecode.com/svn/trunk@10064 75d07b2b-3a1a-0410-a2c5-0572b91ccdca

nor..67 12 anni fa
parent
commit
4f02b407cf

+ 4 - 0
engine/src/core/com/jme3/scene/shape/Box.java

@@ -95,11 +95,15 @@ public class Box extends AbstractBox {
      * the given amount in <em>each</em> direction. So, for example, a box
      * with extent of 0.5 would be the unit cube.
      * 
+     * @Deprecated: Due to constant confusion of geometry centers and the center
+     * of the box mesh this method has been deprecated.
+     * 
      * @param center the center of the box.
      * @param x the size of the box along the x axis, in both directions.
      * @param y the size of the box along the y axis, in both directions.
      * @param z the size of the box along the z axis, in both directions.
      */
+    @Deprecated
     public Box(Vector3f center, float x, float y, float z) {
         super();
         updateGeometry(center, x, y, z);

+ 1 - 1
sdk/BasicGameTemplate/src/mygame/Main.java

@@ -21,7 +21,7 @@ public class Main 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");

BIN
sdk/jme3-templates/src/com/jme3/gde/templates/BasicGameProject.zip