MinieExamples/src/main/java/jme3utilities/minie/test/BuoyDemo.java
/**
     * Callback invoked once per frame.
     *
     * @param tpf the time interval between frames (in seconds, &ge;0)
     */
Callback invoked once per frame.

@param tpf the time interval between frames (in seconds, ≥0)
Callback invoked once per frame . @param tpf the time interval between frames ( in seconds ≥0 )
@Override
    public void simpleUpdate(float tpf) {
        super.simpleUpdate(tpf);
        Signals signals = getSignals();
        float rotateAngle = 0f;
        if (signals.test("rotateRight")) {
            rotateAngle += tpf;
        }
        if (signals.test("rotateLeft")) {
            rotateAngle -= tpf;
        }
        if (rotateAngle != 0f) {
            rotateAngle /= speed;
            Quaternion orientation = MySpatial.worldOrientation(cgModel, null);
            Quaternion rotate = new Quaternion();
            rotate.fromAngles(0f, rotateAngle, 0f);
            rotate.mult(orientation, orientation);
            MySpatial.setWorldOrientation(cgModel, orientation);
        }
    }
@ Override public void simpleUpdate ( float tpf ) { super . simpleUpdate ( tpf ) ; Signals signals = getSignals ( ) ; float rotateAngle = 0f ; if ( signals . test ( "rotateRight" ) ) { rotateAngle += tpf ; } if ( signals . test ( "rotateLeft" ) ) { rotateAngle -= tpf ; } if ( rotateAngle != 0f ) { rotateAngle /= speed ; Quaternion orientation = MySpatial . worldOrientation ( cgModel , null ) ; Quaternion rotate = new Quaternion ( ) ; rotate . fromAngles ( 0f , rotateAngle , 0f ) ; rotate . mult ( orientation , orientation ) ; MySpatial . setWorldOrientation ( cgModel , orientation ) ; } }
Callback invoked once per frame.
Callback invoked once per frame .