MinieExamples/src/main/java/jme3utilities/minie/test/RopeDemo.java
/**
     * Add a rope ring to the scene.
     *
     * @param kinematicSplice true to pre-splice the ends kinematically, false
     * to leave it linear until dynamic mode is set
     * @return the new DAC (added to the spatial and physics space, in kinematic
     * mode)
     */
Add a rope ring to the scene.

@param kinematicSplice true to pre-splice the ends kinematically, false
to leave it linear until dynamic mode is set
@return the new DAC (added to the spatial and physics space, in kinematic
mode)
Add a rope ring to the scene . @param kinematicSplice true to pre - splice the ends kinematically false to leave it linear until dynamic mode is set @return the new DAC ( added to the spatial and physics space in kinematic mode )
private void addRopeRing(boolean kinematicSplice) {
        /*
         * Generate a double-ended straight-line Armature.
         */
        int[] stepCounts = {8, 8};
        Vector3f[] stepOffsets = {
            new Vector3f(stepLength, 0f, 0f),
            new Vector3f(-stepLength, 0f, 0f)
        };
        Armature armature = makeArmature(stepCounts, stepOffsets);
        TubeTreeMesh ropeMesh = new TubeTreeMesh(armature, ropeRadius,
                0f, loopsPerSegment, samplesPerLoop);
        String geometryName = geometryNamer.unique("rope ring");
        Geometry geometry = new Geometry(geometryName, ropeMesh);
        addRopeSpatial(armature, geometry);
        if (kinematicSplice) {
            /*
             * Curl branch0 and branch1 toward one another, 180 degrees each.
             */
            curlBranch(armature, 0, Vector3f.UNIT_Y, FastMath.PI);
            curlBranch(armature, 1, Vector3f.UNIT_Y, -FastMath.PI);
        }
    }
private void addRopeRing ( boolean kinematicSplice ) { /*
         * Generate a double-ended straight-line Armature.
         */ int [ ] stepCounts = { 8 , 8 } ; Vector3f [ ] stepOffsets = { new Vector3f ( stepLength , 0f , 0f ) , new Vector3f ( - stepLength , 0f , 0f ) } ; Armature armature = makeArmature ( stepCounts , stepOffsets ) ; TubeTreeMesh ropeMesh = new TubeTreeMesh ( armature , ropeRadius , 0f , loopsPerSegment , samplesPerLoop ) ; String geometryName = geometryNamer . unique ( "rope ring" ) ; Geometry geometry = new Geometry ( geometryName , ropeMesh ) ; addRopeSpatial ( armature , geometry ) ; if ( kinematicSplice ) { /*
             * Curl branch0 and branch1 toward one another, 180 degrees each.
             */ curlBranch ( armature , 0 , Vector3f . UNIT_Y , FastMath . PI ) ; curlBranch ( armature , 1 , Vector3f . UNIT_Y , - FastMath . PI ) ; } }
Add a rope ring to the scene.
Add a rope ring to the scene .