MinieLibrary/src/main/java/com/jme3/bullet/animation/DacLinks.java
/**
     * Sort the controls of the controlled spatial, such that this Control will
     * come BEFORE the specified Control.
     *
     * @param otherSgc (not null)
     */
Sort the controls of the controlled spatial, such that this Control will
come BEFORE the specified Control.

@param otherSgc (not null)
Sort the controls of the controlled spatial such that this Control will come BEFORE the specified Control . @param otherSgc ( not null )
private void sortControls(Control otherSgc) {
        assert otherSgc != null;
        Spatial spatial = getSpatial();
        int dacIndex = MySpatial.findIndex(spatial, this);
        assert dacIndex != -1;
        int otherIndex = MySpatial.findIndex(spatial, otherSgc);
        assert otherIndex != -1;
        assert dacIndex != otherIndex;
        if (dacIndex > otherIndex) {
            /*
             * Remove the other Control and re-add it to make sure it will get
             * updated *after* this control. TODO also arrange with AnimComposer/AnimControl
             */
            spatial.removeControl(otherSgc);
            spatial.addControl(otherSgc);
            dacIndex = MySpatial.findIndex(spatial, this);
            assert dacIndex != -1;
            otherIndex = MySpatial.findIndex(spatial, otherSgc);
            assert otherIndex != -1;
            assert dacIndex < otherIndex;
        }
    }
private void sortControls ( Control otherSgc ) { assert otherSgc != null ; Spatial spatial = getSpatial ( ) ; int dacIndex = MySpatial . findIndex ( spatial , this ) ; assert dacIndex != - 1 ; int otherIndex = MySpatial . findIndex ( spatial , otherSgc ) ; assert otherIndex != - 1 ; assert dacIndex != otherIndex ; if ( dacIndex > otherIndex ) { /*
             * Remove the other Control and re-add it to make sure it will get
             * updated *after* this control. TODO also arrange with AnimComposer/AnimControl
             */ spatial . removeControl ( otherSgc ) ; spatial . addControl ( otherSgc ) ; dacIndex = MySpatial . findIndex ( spatial , this ) ; assert dacIndex != - 1 ; otherIndex = MySpatial . findIndex ( spatial , otherSgc ) ; assert otherIndex != - 1 ; assert dacIndex < otherIndex ; } }
Sort the controls of the controlled spatial, such that this Control will
 come BEFORE the specified Control.
Sort the controls of the controlled spatial such that this Control will come BEFORE the specified Control .