Browse Source

jme3-examples: delete 7 tests for issues specific to native Bullet (#1488)

Stephen Gold 4 years ago
parent
commit
1f8add20d9

+ 0 - 104
jme3-examples/src/main/java/jme3test/bullet/TestIssue1029.java

@@ -1,104 +0,0 @@
-/*
- * Copyright (c) 2019 jMonkeyEngine
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are
- * met:
- *
- * * Redistributions of source code must retain the above copyright
- *   notice, this list of conditions and the following disclaimer.
- *
- * * Redistributions in binary form must reproduce the above copyright
- *   notice, this list of conditions and the following disclaimer in the
- *   documentation and/or other materials provided with the distribution.
- *
- * * Neither the name of 'jMonkeyEngine' nor the names of its contributors
- *   may be used to endorse or promote products derived from this software
- *   without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
- * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
- * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
- * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
- * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
- * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
- * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
- * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
- * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
- * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-package jme3test.bullet;
-
-import com.jme3.app.Application;
-import com.jme3.app.SimpleApplication;
-import com.jme3.bullet.BulletAppState;
-import com.jme3.bullet.PhysicsSpace;
-import com.jme3.bullet.collision.PhysicsCollisionEvent;
-import com.jme3.bullet.collision.PhysicsCollisionListener;
-import com.jme3.bullet.collision.shapes.CollisionShape;
-import com.jme3.bullet.collision.shapes.SphereCollisionShape;
-import com.jme3.bullet.objects.PhysicsGhostObject;
-import com.jme3.bullet.objects.PhysicsRigidBody;
-
-/**
- * Test case for JME issue #1029: sphere-sphere collisions not reported.
- * <p>
- * If successful, the app will terminate normally, without a RuntimeException.
- *
- * @author Stephen Gold [email protected]
- */
-public class TestIssue1029
-        extends SimpleApplication
-        implements PhysicsCollisionListener {
-
-    private double elapsedSeconds = 0.0;
-
-    public static void main(String[] arguments) {
-        Application application = new TestIssue1029();
-        application.start();
-    }
-
-    @Override
-    public void simpleInitApp() {
-        BulletAppState bulletAppState = new BulletAppState();
-        stateManager.attach(bulletAppState);
-        bulletAppState.setDebugEnabled(true);
-
-        PhysicsSpace physicsSpace = bulletAppState.getPhysicsSpace();
-        physicsSpace.addCollisionListener(this);
-
-        CollisionShape shape;
-        shape = new SphereCollisionShape(1f);
-        //shape = new BoxCollisionShape(new Vector3f(1f, 1f, 1f));
-
-        PhysicsRigidBody staticBody = new PhysicsRigidBody(shape, 0f);
-        physicsSpace.add(staticBody);
-
-        PhysicsGhostObject ghost = new PhysicsGhostObject(shape);
-        physicsSpace.add(ghost);
-    }
-
-    @Override
-    public void simpleUpdate(float tpf) {
-        super.simpleUpdate(tpf);
-
-        elapsedSeconds += tpf;
-        if (elapsedSeconds > 1.0) {
-            throw new RuntimeException("No collisions reported!");
-        }
-    }
-
-    @Override
-    public void collision(PhysicsCollisionEvent event) {
-        Class aClass = event.getObjectA().getCollisionShape().getClass();
-        String aShape = aClass.getSimpleName().replace("CollisionShape", "");
-        Class bClass = event.getObjectB().getCollisionShape().getClass();
-        String bShape = bClass.getSimpleName().replace("CollisionShape", "");
-
-        System.out.printf("%s-%s collision reported at t = %f sec%n",
-                aShape, bShape, elapsedSeconds);
-        stop();
-    }
-}

+ 0 - 303
jme3-examples/src/main/java/jme3test/bullet/TestIssue1283.java

@@ -1,303 +0,0 @@
-/*
- * Copyright (c) 2020 jMonkeyEngine
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are
- * met:
- *
- * * Redistributions of source code must retain the above copyright
- *   notice, this list of conditions and the following disclaimer.
- *
- * * Redistributions in binary form must reproduce the above copyright
- *   notice, this list of conditions and the following disclaimer in the
- *   documentation and/or other materials provided with the distribution.
- *
- * * Neither the name of 'jMonkeyEngine' nor the names of its contributors
- *   may be used to endorse or promote products derived from this software
- *   without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
- * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
- * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
- * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
- * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
- * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
- * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
- * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
- * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
- * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-package jme3test.bullet;
-
-import com.jme3.app.SimpleApplication;
-import com.jme3.bullet.BulletAppState;
-import com.jme3.bullet.PhysicsSpace;
-import com.jme3.bullet.collision.PhysicsCollisionObject;
-import com.jme3.bullet.control.RigidBodyControl;
-import com.jme3.font.BitmapText;
-import com.jme3.input.KeyInput;
-import com.jme3.input.MouseInput;
-import com.jme3.input.controls.ActionListener;
-import com.jme3.input.controls.KeyTrigger;
-import com.jme3.input.controls.MouseButtonTrigger;
-import com.jme3.input.controls.Trigger;
-import com.jme3.light.AmbientLight;
-import com.jme3.light.DirectionalLight;
-import com.jme3.material.Material;
-import com.jme3.math.ColorRGBA;
-import com.jme3.math.Quaternion;
-import com.jme3.math.Vector2f;
-import com.jme3.math.Vector3f;
-import com.jme3.scene.Geometry;
-import com.jme3.scene.Mesh;
-import com.jme3.scene.shape.Box;
-import com.jme3.scene.shape.Sphere;
-import com.jme3.system.AppSettings;
-import java.util.logging.Logger;
-
-/**
- * Test case for issue #1283: collision-group filter not applied to CCD.
- * <p>
- * Click RMB or press the "B" key to shoot a ball at the wall. In a successful
- * test, all balls will pass through the wall. If any ball rebounds, or is
- * deflected, the has test failed.
- *
- * @author Stephen Gold [email protected]
- */
-public class TestIssue1283 extends SimpleApplication {
-    // *************************************************************************
-    // constants and loggers
-
-    /**
-     * radius of projectiles
-     */
-    final private static float projectileRadius = 0.7f;
-    /**
-     * message logger for this class
-     */
-    final public static Logger logger
-            = Logger.getLogger(TestIssue1283.class.getName());
-    /**
-     * Mesh to visualize projectiles
-     */
-    final private static Mesh projectileMesh
-            = new Sphere(32, 32, projectileRadius, true, false);
-    // *************************************************************************
-    // fields
-
-    /**
-     * Material to visualize projectiles
-     */
-    private Material projectileMaterial;
-    /**
-     * Material to visualize the wall
-     */
-    private Material wallMaterial;
-    /**
-     * space for physics simulation
-     */
-    private PhysicsSpace physicsSpace;
-    // *************************************************************************
-    // new methods exposed
-
-    /**
-     * Main entry point for the TestIssue1283 application.
-     *
-     * @param ignored array of command-line arguments (not null)
-     */
-    public static void main(String[] ignored) {
-        TestIssue1283 application = new TestIssue1283();
-        AppSettings appSettings = new AppSettings(true);
-        application.setSettings(appSettings);
-        application.start();
-    }
-    // *************************************************************************
-    // SimpleApplication methods
-
-    /**
-     * Initialize this application.
-     */
-    @Override
-    public void simpleInitApp() {
-        configureCamera();
-        configureMaterials();
-        viewPort.setBackgroundColor(ColorRGBA.Blue.clone());
-        addLighting();
-        configurePhysics();
-        addWall();
-        configureInputs();
-        showHints();
-    }
-    // *************************************************************************
-    // private methods
-
-    /**
-     * Add lighting to the scene.
-     */
-    private void addLighting() {
-        ColorRGBA ambientColor = new ColorRGBA(0.2f, 0.2f, 0.2f, 1f);
-        AmbientLight ambient = new AmbientLight(ambientColor);
-        rootNode.addLight(ambient);
-
-        Vector3f direction = new Vector3f(1f, -2f, -2f).normalizeLocal();
-        ColorRGBA sunColor = new ColorRGBA(0.5f, 0.5f, 0.5f, 1f);
-        DirectionalLight sun = new DirectionalLight(direction, sunColor);
-        rootNode.addLight(sun);
-    }
-
-    /**
-     * Add a thin wall to the scene and physics space.
-     */
-    private void addWall() {
-        float thickness = 0.1f;
-        Box wallMesh = new Box(10f, 10f, thickness);
-        Geometry geometry = new Geometry("wall", wallMesh);
-        rootNode.attachChild(geometry);
-        geometry.setMaterial(wallMaterial);
-
-        float mass = 0f; // static rigid body
-        RigidBodyControl physicsControl = new RigidBodyControl(mass);
-        geometry.addControl(physicsControl);
-
-        physicsControl.setRestitution(0.8f);
-        physicsSpace.add(physicsControl);
-    }
-
-    /**
-     * Configure the camera during startup.
-     */
-    private void configureCamera() {
-        float fHeight = cam.getFrustumTop() - cam.getFrustumBottom();
-        float fWidth = cam.getFrustumRight() - cam.getFrustumLeft();
-        float fAspect = fWidth / fHeight;
-        float yDegrees = 45f;
-        float near = 0.2f;
-        float far = 100f;
-        cam.setFrustumPerspective(yDegrees, fAspect, near, far);
-
-        flyCam.setDragToRotate(true);
-        flyCam.setMoveSpeed(200f);
-
-        cam.setLocation(new Vector3f(-2f, 2f, 30f));
-        cam.setRotation(new Quaternion(0f, 1f, 0f, 0f));
-    }
-
-    /**
-     * Configure the InputManager during startup.
-     */
-    private void configureInputs() {
-        final String launchActionName = "launch";
-        ActionListener actionListener = new ActionListener() {
-            @Override
-            public void onAction(String name, boolean ongoing, float tpf) {
-                if (ongoing) {
-                    if (name.equals(launchActionName)) {
-                        launchProjectile();
-                    }
-                }
-            }
-        };
-
-        Trigger bTrigger = new KeyTrigger(KeyInput.KEY_B);
-        Trigger rmbTrigger = new MouseButtonTrigger(MouseInput.BUTTON_RIGHT);
-        inputManager.addMapping(launchActionName, bTrigger, rmbTrigger);
-        inputManager.addListener(actionListener, launchActionName);
-    }
-
-    /**
-     * Configure materials during startup.
-     */
-    private void configureMaterials() {
-        wallMaterial = new Material(assetManager,
-                "Common/MatDefs/Misc/Unshaded.j3md");
-        wallMaterial.setColor("Color", ColorRGBA.White.clone());
-        wallMaterial.getAdditionalRenderState().setWireframe(true);
-
-        projectileMaterial = new Material(assetManager,
-                "Common/MatDefs/Light/Lighting.j3md");
-        projectileMaterial.setBoolean("UseMaterialColors", true);
-        projectileMaterial.setColor("Ambient", ColorRGBA.Red.clone());
-        projectileMaterial.setColor("Diffuse", ColorRGBA.Red.clone());
-        projectileMaterial.setColor("Specular", ColorRGBA.Black.clone());
-    }
-
-    /**
-     * Configure physics during startup.
-     */
-    private void configurePhysics() {
-        BulletAppState bulletAppState = new BulletAppState();
-        stateManager.attach(bulletAppState);
-        physicsSpace = bulletAppState.getPhysicsSpace();
-        Vector3f gravityVector = new Vector3f(0f, -30f, 0f);
-        physicsSpace.setGravity(gravityVector);
-    }
-
-    /**
-     * Add a projectile to the scene and physics space. Its initial position and
-     * velocity are determined by the camera the and mouse pointer.
-     */
-    private void launchProjectile() {
-        Vector2f screenXY = inputManager.getCursorPosition();
-        float nearZ = 0f;
-        Vector3f nearLocation = cam.getWorldCoordinates(screenXY, nearZ);
-        float farZ = 1f;
-        Vector3f farLocation = cam.getWorldCoordinates(screenXY, farZ);
-        Vector3f direction = farLocation.subtract(nearLocation);
-        direction.normalizeLocal();
-
-        Geometry geometry = new Geometry("projectile", projectileMesh);
-        rootNode.attachChild(geometry);
-        geometry.setLocalTranslation(nearLocation);
-        geometry.setMaterial(projectileMaterial);
-
-        float mass = 1f;
-        RigidBodyControl physicsControl = new RigidBodyControl(mass);
-        geometry.addControl(physicsControl);
-
-        physicsControl.setCcdMotionThreshold(0.01f);
-        physicsControl.setCcdSweptSphereRadius(projectileRadius);
-        physicsControl.setCollisionGroup(
-                PhysicsCollisionObject.COLLISION_GROUP_02);
-        physicsControl.setCollideWithGroups(
-                PhysicsCollisionObject.COLLISION_GROUP_02);
-        physicsControl.setRestitution(0.8f);
-
-        float projectileSpeed = 250f; // physics-space units per second
-        Vector3f initialVelocity = direction.mult(projectileSpeed);
-        physicsControl.setLinearVelocity(initialVelocity);
-
-        physicsSpace.add(physicsControl);
-    }
-
-    /**
-     * Attach hint text to the GUI node.
-     */
-    private void showHints() {
-        guiFont = assetManager.loadFont("Interface/Fonts/Default.fnt");
-
-        int numLines = 4;
-        BitmapText lines[] = new BitmapText[numLines];
-        for (int lineIndex = 0; lineIndex < numLines; ++lineIndex) {
-            lines[lineIndex] = new BitmapText(guiFont);
-        }
-
-        lines[0].setText("Test for jMonkeyEngine issue #1283");
-        lines[1].setText("Click RMB or press the B key to shoot a ball.");
-        lines[2].setText("Use W/A/S/D/Q/Z keys to move the camera.");
-        lines[3].setText("F5: toggle render statistics,"
-                + " C: print camera position, M: print memory statistics");
-
-        float textHeight = guiFont.getCharSet().getLineHeight();
-        float viewHeight = cam.getHeight();
-        float viewWidth = cam.getWidth();
-        for (int lineIndex = 0; lineIndex < numLines; ++lineIndex) {
-            float lineWidth = lines[lineIndex].getLineWidth();
-            float leftX = Math.round((viewWidth - lineWidth) / 2f);
-            float topY = viewHeight - lineIndex * textHeight;
-            lines[lineIndex].setLocalTranslation(leftX, topY, 0f);
-            guiNode.attachChild(lines[lineIndex]);
-        }
-    }
-}

+ 0 - 185
jme3-examples/src/main/java/jme3test/bullet/TestIssue894.java

@@ -1,185 +0,0 @@
-/*
- * Copyright (c) 2018 jMonkeyEngine
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are
- * met:
- *
- * * Redistributions of source code must retain the above copyright
- *   notice, this list of conditions and the following disclaimer.
- *
- * * Redistributions in binary form must reproduce the above copyright
- *   notice, this list of conditions and the following disclaimer in the
- *   documentation and/or other materials provided with the distribution.
- *
- * * Neither the name of 'jMonkeyEngine' nor the names of its contributors
- *   may be used to endorse or promote products derived from this software
- *   without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
- * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
- * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
- * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
- * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
- * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
- * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
- * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
- * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
- * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-package jme3test.bullet;
-
-/**
- * Test case for JME issue #894: SliderJoint.setRestitutionOrthoLin() sets wrong
- * joint parameter. The bug existed in Native Bullet only.
- * <p>
- * If successful, no exception will be thrown during initialization.
- */
-import com.jme3.app.SimpleApplication;
-import com.jme3.bullet.collision.shapes.CollisionShape;
-import com.jme3.bullet.collision.shapes.SphereCollisionShape;
-import com.jme3.bullet.joints.SliderJoint;
-import com.jme3.bullet.objects.PhysicsRigidBody;
-import com.jme3.math.Vector3f;
-
-public class TestIssue894 extends SimpleApplication {
-
-    public static void main(String[] args) {
-        TestIssue894 app = new TestIssue894();
-        app.start();
-    }
-
-    @Override
-    public void simpleInitApp() {
-        float radius = 1f;
-        CollisionShape sphere = new SphereCollisionShape(radius);
-
-        PhysicsRigidBody rb1 = new PhysicsRigidBody(sphere);
-        PhysicsRigidBody rb2 = new PhysicsRigidBody(sphere);
-        rb2.setPhysicsLocation(new Vector3f(4f, 0f, 0f));
-
-        SliderJoint joint = new SliderJoint(rb1, rb2,
-                new Vector3f(2f, 0f, 0f),
-                new Vector3f(-2f, 0f, 0f), true);
-
-        joint.setLowerAngLimit(-0.01f);
-        joint.setLowerLinLimit(-0.02f);
-        joint.setUpperAngLimit(0.01f);
-        joint.setUpperLinLimit(0.02f);
-
-        joint.setDampingDirAng(0.03f);
-        joint.setDampingDirLin(0.04f);
-        joint.setDampingLimAng(0.05f);
-        joint.setDampingLimLin(0.06f);
-        joint.setDampingOrthoAng(0.07f);
-        joint.setDampingOrthoLin(0.08f);
-
-        joint.setRestitutionDirAng(0.09f);
-        joint.setRestitutionDirLin(0.10f);
-        joint.setRestitutionLimAng(0.11f);
-        joint.setRestitutionLimLin(0.12f);
-        joint.setRestitutionOrthoAng(0.13f);
-        joint.setRestitutionOrthoLin(0.14f);
-
-        joint.setSoftnessDirAng(0.15f);
-        joint.setSoftnessDirLin(0.16f);
-        joint.setSoftnessLimAng(0.17f);
-        joint.setSoftnessLimLin(0.18f);
-        joint.setSoftnessOrthoAng(0.19f);
-        joint.setSoftnessOrthoLin(0.20f);
-
-        joint.setMaxAngMotorForce(0.21f);
-        joint.setMaxLinMotorForce(0.22f);
-
-        joint.setTargetAngMotorVelocity(0.23f);
-        joint.setTargetLinMotorVelocity(0.24f);
-
-        RuntimeException e = new RuntimeException();
-
-        if (joint.getLowerAngLimit() != -0.01f) {
-            throw new RuntimeException();
-        }
-        if (joint.getLowerLinLimit() != -0.02f) {
-            throw new RuntimeException();
-        }
-        if (joint.getUpperAngLimit() != 0.01f) {
-            throw new RuntimeException();
-        }
-        if (joint.getUpperLinLimit() != 0.02f) {
-            throw new RuntimeException();
-        }
-
-        if (joint.getDampingDirAng() != 0.03f) {
-            throw new RuntimeException();
-        }
-        if (joint.getDampingDirLin() != 0.04f) {
-            throw new RuntimeException();
-        }
-        if (joint.getDampingLimAng() != 0.05f) {
-            throw new RuntimeException();
-        }
-        if (joint.getDampingLimLin() != 0.06f) {
-            throw new RuntimeException();
-        }
-        if (joint.getDampingOrthoAng() != 0.07f) {
-            throw new RuntimeException();
-        }
-        if (joint.getDampingOrthoLin() != 0.08f) {
-            throw new RuntimeException();
-        }
-
-        if (joint.getRestitutionDirAng() != 0.09f) {
-            throw new RuntimeException();
-        }
-        if (joint.getRestitutionDirLin() != 0.10f) {
-            throw new RuntimeException();
-        }
-        if (joint.getRestitutionLimAng() != 0.11f) {
-            throw new RuntimeException();
-        }
-        if (joint.getRestitutionLimLin() != 0.12f) {
-            throw new RuntimeException();
-        }
-        if (joint.getRestitutionOrthoAng() != 0.13f) {
-            throw new RuntimeException();
-        }
-        if (joint.getRestitutionOrthoLin() != 0.14f) {
-            throw new RuntimeException();
-        }
-
-        if (joint.getSoftnessDirAng() != 0.15f) {
-            throw new RuntimeException();
-        }
-        if (joint.getSoftnessDirLin() != 0.16f) {
-            throw new RuntimeException();
-        }
-        if (joint.getSoftnessLimAng() != 0.17f) {
-            throw new RuntimeException();
-        }
-        if (joint.getSoftnessLimLin() != 0.18f) {
-            throw new RuntimeException();
-        }
-        if (joint.getSoftnessOrthoAng() != 0.19f) {
-            throw new RuntimeException();
-        }
-        if (joint.getSoftnessOrthoLin() != 0.20f) {
-            throw new RuntimeException();
-        }
-
-        if (joint.getMaxAngMotorForce() != 0.21f) {
-            throw new RuntimeException();
-        }
-        if (joint.getMaxLinMotorForce() != 0.22f) {
-            throw new RuntimeException();
-        }
-
-        if (joint.getTargetAngMotorVelocity() != 0.23f) {
-            throw new RuntimeException();
-        }
-        if (joint.getTargetLinMotorVelocity() != 0.24f) {
-            throw new RuntimeException();
-        }
-    }
-}

+ 0 - 76
jme3-examples/src/main/java/jme3test/bullet/TestIssue911.java

@@ -1,76 +0,0 @@
-/*
- * Copyright (c) 2018 jMonkeyEngine
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are
- * met:
- *
- * * Redistributions of source code must retain the above copyright
- *   notice, this list of conditions and the following disclaimer.
- *
- * * Redistributions in binary form must reproduce the above copyright
- *   notice, this list of conditions and the following disclaimer in the
- *   documentation and/or other materials provided with the distribution.
- *
- * * Neither the name of 'jMonkeyEngine' nor the names of its contributors
- *   may be used to endorse or promote products derived from this software
- *   without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
- * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
- * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
- * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
- * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
- * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
- * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
- * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
- * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
- * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-package jme3test.bullet;
-
-import com.jme3.app.SimpleApplication;
-import com.jme3.bullet.collision.shapes.CollisionShape;
-import com.jme3.bullet.collision.shapes.SphereCollisionShape;
-import com.jme3.bullet.objects.PhysicsRigidBody;
-
-/**
- * Test case for JME issue #911: PhysicsRigidBody sleeping threshold setters
- * have unexpected side effects. The bug existed in Native Bullet only.
- * <p>
- * If successful, no exception will be thrown.
- */
-public class TestIssue911 extends SimpleApplication {
-    // *************************************************************************
-    // new methods exposed
-
-    public static void main(String[] args) {
-        TestIssue911 app = new TestIssue911();
-        app.start();
-    }
-    // *************************************************************************
-    // SimpleApplication methods
-
-    @Override
-    public void simpleInitApp() {
-        CollisionShape capsule = new SphereCollisionShape(1f);
-        PhysicsRigidBody body = new PhysicsRigidBody(capsule, 1f);
-        assert body.getAngularSleepingThreshold() == 1f;
-        assert body.getLinearSleepingThreshold() == 0.8f;
-
-        body.setAngularSleepingThreshold(0.03f);
-
-        assert body.getAngularSleepingThreshold() == 0.03f;
-        float lst = body.getLinearSleepingThreshold();
-        assert lst == 0.8f : lst; // fails, actual value is 1f
-
-        body.setLinearSleepingThreshold(0.17f);
-
-        float ast = body.getAngularSleepingThreshold();
-        assert ast == 0.03f : ast; // fails, actual value is 1f
-
-        stop();
-    }
-}

+ 0 - 81
jme3-examples/src/main/java/jme3test/bullet/TestIssue918.java

@@ -1,81 +0,0 @@
-/*
- * Copyright (c) 2018 jMonkeyEngine
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are
- * met:
- *
- * * Redistributions of source code must retain the above copyright
- *   notice, this list of conditions and the following disclaimer.
- *
- * * Redistributions in binary form must reproduce the above copyright
- *   notice, this list of conditions and the following disclaimer in the
- *   documentation and/or other materials provided with the distribution.
- *
- * * Neither the name of 'jMonkeyEngine' nor the names of its contributors
- *   may be used to endorse or promote products derived from this software
- *   without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
- * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
- * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
- * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
- * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
- * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
- * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
- * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
- * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
- * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-package jme3test.bullet;
-
-import com.jme3.app.SimpleApplication;
-import com.jme3.bullet.collision.shapes.CollisionShape;
-import com.jme3.bullet.collision.shapes.SphereCollisionShape;
-import com.jme3.bullet.joints.Point2PointJoint;
-import com.jme3.bullet.objects.PhysicsRigidBody;
-import com.jme3.math.Vector3f;
-
-/**
- * Test case for JME issue #918: Point2PointJoint.getImpulseClamp() and
- * .getTau() return the damping value instead. The bug existed in Native Bullet
- * only.
- * <p>
- * If successful, no UnsatisfiedLinkError exception will be thrown.
- */
-public class TestIssue918 extends SimpleApplication {
-    // *************************************************************************
-    // new methods exposed
-
-    public static void main(String[] args) {
-        TestIssue918 app = new TestIssue918();
-        app.start();
-    }
-    // *************************************************************************
-    // SimpleApplication methods
-
-    @Override
-    public void simpleInitApp() {
-        CollisionShape capsule = new SphereCollisionShape(1f);
-        PhysicsRigidBody body1 = new PhysicsRigidBody(capsule, 1f);
-        PhysicsRigidBody body2 = new PhysicsRigidBody(capsule, 1f);
-        Vector3f pivot1 = new Vector3f();
-        Vector3f pivot2 = new Vector3f();
-        Point2PointJoint joint
-                = new Point2PointJoint(body1, body2, pivot1, pivot2);
-
-        joint.setImpulseClamp(42f);
-        joint.setTau(99f);
-
-        if (joint.getImpulseClamp() != 42f) {
-            throw new RuntimeException();
-        }
-        if (joint.getTau() != 99f) {
-            throw new RuntimeException();
-        }
-
-        stop();
-    }
-}

+ 0 - 72
jme3-examples/src/main/java/jme3test/bullet/TestIssue919.java

@@ -1,72 +0,0 @@
-/*
- * Copyright (c) 2018 jMonkeyEngine
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are
- * met:
- *
- * * Redistributions of source code must retain the above copyright
- *   notice, this list of conditions and the following disclaimer.
- *
- * * Redistributions in binary form must reproduce the above copyright
- *   notice, this list of conditions and the following disclaimer in the
- *   documentation and/or other materials provided with the distribution.
- *
- * * Neither the name of 'jMonkeyEngine' nor the names of its contributors
- *   may be used to endorse or promote products derived from this software
- *   without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
- * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
- * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
- * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
- * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
- * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
- * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
- * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
- * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
- * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-package jme3test.bullet;
-
-import com.jme3.app.SimpleApplication;
-import com.jme3.bullet.collision.shapes.CollisionShape;
-import com.jme3.bullet.collision.shapes.SphereCollisionShape;
-import com.jme3.bullet.joints.SixDofJoint;
-import com.jme3.bullet.objects.PhysicsRigidBody;
-import com.jme3.math.Vector3f;
-
-/**
- * Test case for JME issue #919: native implementation of
- * TranslationalLimitMotor.getLimitSoftness() has wrong name. The bug existed in
- * Native Bullet only.
- * <p>
- * If successful, no UnsatisfiedLinkError exception will be thrown.
- */
-public class TestIssue919 extends SimpleApplication {
-    // *************************************************************************
-    // new methods exposed
-
-    public static void main(String[] args) {
-        TestIssue919 app = new TestIssue919();
-        app.start();
-    }
-    // *************************************************************************
-    // SimpleApplication methods
-
-    @Override
-    public void simpleInitApp() {
-        CollisionShape capsule = new SphereCollisionShape(1f);
-        PhysicsRigidBody body1 = new PhysicsRigidBody(capsule, 1f);
-        PhysicsRigidBody body2 = new PhysicsRigidBody(capsule, 1f);
-        Vector3f pivot1 = new Vector3f();
-        Vector3f pivot2 = new Vector3f();
-        SixDofJoint joint = new SixDofJoint(body1, body2, pivot1, pivot2, true);
-
-        joint.getTranslationalLimitMotor().getLimitSoftness();
-
-        stop();
-    }
-}

+ 0 - 81
jme3-examples/src/main/java/jme3test/bullet/TestIssue928.java

@@ -1,81 +0,0 @@
-/*
- * Copyright (c) 2018 jMonkeyEngine
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are
- * met:
- *
- * * Redistributions of source code must retain the above copyright
- *   notice, this list of conditions and the following disclaimer.
- *
- * * Redistributions in binary form must reproduce the above copyright
- *   notice, this list of conditions and the following disclaimer in the
- *   documentation and/or other materials provided with the distribution.
- *
- * * Neither the name of 'jMonkeyEngine' nor the names of its contributors
- *   may be used to endorse or promote products derived from this software
- *   without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
- * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
- * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
- * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
- * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
- * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
- * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
- * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
- * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
- * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-package jme3test.bullet;
-
-import com.jme3.app.SimpleApplication;
-import com.jme3.bullet.BulletAppState;
-import com.jme3.bullet.BulletAppState.ThreadingType;
-
-/**
- * Test case for JME issue #928: crash after 64 attached and detached
- * BulletAppStates with parallel threading. The bug existed in Native Bullet
- * only.
- * <p>
- * If successful, no crash will occur.
- */
-public class TestIssue928 extends SimpleApplication {
-    private int count = 0;
-    private int frame = 0;
-    private BulletAppState bulletAppState;
-
-    // *************************************************************************
-    // new methods exposed
-
-    public static void main(String[] args) {
-        TestIssue928 app = new TestIssue928();
-        app.start();
-    }
-
-    // *************************************************************************
-    // SimpleApplication methods
-
-    @Override
-    public void simpleInitApp() {
-    }
-
-    @Override
-    public void simpleUpdate(float tpf) {
-        if (frame % 4 == 0) {
-            System.out.println(++count);
-            bulletAppState = new BulletAppState();
-            bulletAppState.setThreadingType(ThreadingType.PARALLEL);
-            stateManager.attach(bulletAppState);
-        } else if (frame % 4 == 2) {
-            stateManager.detach(bulletAppState);
-        }
-
-        frame++;
-        if (count == 70) {
-            stop();
-        }
-    }
-}