MinieExamples/src/main/java/jme3utilities/minie/test/SeJointDemo.java
/**
     * Clean up after a test.
     */
Clean up after a test.
Clean up after a test .
private void cleanupAfterTest() {
        PhysicsSpace physicsSpace = getPhysicsSpace();
        Collection<PhysicsJoint> jointList = physicsSpace.getJointList();
        for (PhysicsJoint joint : jointList) {
            joint.destroy();
            physicsSpace.removeJoint(joint);
        }
        List<Spatial> seeds = meshesNode.getChildren();
        for (Spatial geometry : seeds) {
            RigidBodyControl rbc = geometry.getControl(RigidBodyControl.class);
            rbc.setPhysicsSpace(null);
            geometry.removeControl(rbc);
            geometry.removeFromParent();
        }
    }
private void cleanupAfterTest ( ) { PhysicsSpace physicsSpace = getPhysicsSpace ( ) ; Collection < PhysicsJoint > jointList = physicsSpace . getJointList ( ) ; for ( PhysicsJoint joint : jointList ) { joint . destroy ( ) ; physicsSpace . removeJoint ( joint ) ; } List < Spatial > seeds = meshesNode . getChildren ( ) ; for ( Spatial geometry : seeds ) { RigidBodyControl rbc = geometry . getControl ( RigidBodyControl . class ) ; rbc . setPhysicsSpace ( null ) ; geometry . removeControl ( rbc ) ; geometry . removeFromParent ( ) ; } }
Clean up after a test.
Clean up after a test .