MinieExamples/src/main/java/jme3utilities/minie/test/RopeDemo.java
/**
     * Add a kinematic rope (with the named shape) to the scene.
     *
     * @param shapeName the name of the shape to add (not null, not empty)
     */
Add a kinematic rope (with the named shape) to the scene.

@param shapeName the name of the shape to add (not null, not empty)
Add a kinematic rope ( with the named shape ) to the scene . @param shapeName the name of the shape to add ( not null not empty )
private void addRope(String shapeName) {
        DynamicAnimControl latestDac = dacs.peekLast();
        if (latestDac != null && latestDac.getTorsoLink().isKinematic()) {
            delete();
        }
        RopeShape shape = RopeShape.valueOf(shapeName);
        switch (shape) {
            case Cross:
                addRopeCross();
                break;
            case Noose:
                addRopeNoose(false);
                break;
            case NooseSpliced:
                addRopeNoose(true);
                break;
            case Ring:
                addRopeRing(false);
                break;
            case RingSpliced:
                addRopeRing(true);
                break;
            case Slackline:
                addRopeSlackline();
                break;
            default:
                throw new IllegalArgumentException(shapeName);
        }
        shapes.addLast(shape);
    }
private void addRope ( String shapeName ) { DynamicAnimControl latestDac = dacs . peekLast ( ) ; if ( latestDac != null && latestDac . getTorsoLink ( ) . isKinematic ( ) ) { delete ( ) ; } RopeShape shape = RopeShape . valueOf ( shapeName ) ; switch ( shape ) { case Cross : addRopeCross ( ) ; break ; case Noose : addRopeNoose ( false ) ; break ; case NooseSpliced : addRopeNoose ( true ) ; break ; case Ring : addRopeRing ( false ) ; break ; case RingSpliced : addRopeRing ( true ) ; break ; case Slackline : addRopeSlackline ( ) ; break ; default : throw new IllegalArgumentException ( shapeName ) ; } shapes . addLast ( shape ) ; }
Add a kinematic rope (with the named shape) to the scene.
Add a kinematic rope ( with the named shape ) to the scene .
// only one kinematic rope at a time
