MinieExamples/src/main/java/jme3utilities/minie/test/RopeDemo.java
/**
     * Kinematically curl a branch of the specified Armature around the
     * specified axis.
     *
     * @param armature the Armature to pose (not null)
     * @param branchIndex (&ge;0)
     * @param axis (in each joint's local coordinates, not null, not zero)
     * @param totalAngle the angle between the first and last steps (in radians,
     * may be negative)
     */
Kinematically curl a branch of the specified Armature around the
specified axis.

@param armature the Armature to pose (not null)
@param branchIndex (≥0)
@param axis (in each joint's local coordinates, not null, not zero)
@param totalAngle the angle between the first and last steps (in radians,
may be negative)
Kinematically curl a branch of the specified Armature around the specified axis . @param armature the Armature to pose ( not null ) @param branchIndex ( ≥0 ) @param axis ( in each joint ' s local coordinates not null not zero ) @param totalAngle the angle between the first and last steps ( in radians may be negative )
private void curlBranch(Armature armature, int branchIndex, Vector3f axis,
            float totalAngle) {
        assert !MyVector3f.isZero(axis);
        /*
         * Count the steps in this branch.
         */
        int numSteps = countSteps(armature, branchIndex);
        assert numSteps > 1 : numSteps;
        /*
         * Calculate local rotation.
         */
        float turnAngle = totalAngle / (numSteps - 1);
        Quaternion turn = new Quaternion().fromAngleAxis(turnAngle, axis);
        /*
         * Apply the rotation to each Joint.
         */
        for (int stepIndex = 0; stepIndex < numSteps; ++stepIndex) {
            String jointName = jointName(branchIndex, stepIndex);
            Joint joint = armature.getJoint(jointName);
            joint.setLocalRotation(turn);
        }
    }
private void curlBranch ( Armature armature , int branchIndex , Vector3f axis , float totalAngle ) { assert ! MyVector3f . isZero ( axis ) ; /*
         * Count the steps in this branch.
         */ int numSteps = countSteps ( armature , branchIndex ) ; assert numSteps > 1 : numSteps ; /*
         * Calculate local rotation.
         */ float turnAngle = totalAngle / ( numSteps - 1 ) ; Quaternion turn = new Quaternion ( ) . fromAngleAxis ( turnAngle , axis ) ; /*
         * Apply the rotation to each Joint.
         */ for ( int stepIndex = 0 ; stepIndex < numSteps ; ++ stepIndex ) { String jointName = jointName ( branchIndex , stepIndex ) ; Joint joint = armature . getJoint ( jointName ) ; joint . setLocalRotation ( turn ) ; } }
Kinematically curl a branch of the specified Armature around the
 specified axis.
Kinematically curl a branch of the specified Armature around the specified axis .