MinieLibrary/src/main/java/com/jme3/bullet/PhysicsSpace.java
/**
     * Remove the specified object from this space. For compatibility with the
     * jme3-bullet library.
     *
     * @param object the PhysicsControl, Spatial-with-PhysicsControl,
     * PhysicsCollisionObject, or PhysicsJoint to remove, or null
     */
Remove the specified object from this space. For compatibility with the
jme3-bullet library.


Remove the specified object from this space . For compatibility with the jme3 - bullet library .
@Override
    public void remove(Object object) {
        if (object instanceof PhysicsControl) {
            ((PhysicsControl) object).setPhysicsSpace(null);
        } else if (object instanceof Spatial) {
            Spatial node = (Spatial) object;
            for (int i = 0; i < node.getNumControls(); ++i) {
                if (node.getControl(i) instanceof PhysicsControl) {
                    remove((node.getControl(i)));
                }
            }
        } else if (object instanceof PhysicsJoint) {
            removeJoint((PhysicsJoint) object);
        } else {
            super.remove(object);
        }
    }
@ Override public void remove ( Object object ) { if ( object instanceof PhysicsControl ) { ( ( PhysicsControl ) object ) . setPhysicsSpace ( null ) ; } else if ( object instanceof Spatial ) { Spatial node = ( Spatial ) object ; for ( int i = 0 ; i < node . getNumControls ( ) ; ++ i ) { if ( node . getControl ( i ) instanceof PhysicsControl ) { remove ( ( node . getControl ( i ) ) ) ; } } } else if ( object instanceof PhysicsJoint ) { removeJoint ( ( PhysicsJoint ) object ) ; } else { super . remove ( object ) ; } }
Remove the specified object from this space.
Remove the specified object from this space .