MinieExamples/src/main/java/jme3utilities/minie/test/RopeDemo.java
/**
     * Choose 3 distinct vertices in the end cap of the indexed branch.
     *
     * @param branchIndex which branch (&ge;0)
     * @return a new array of 3 vertex specifiers
     */
Choose 3 distinct vertices in the end cap of the indexed branch.

@param branchIndex which branch (≥0)
@return a new array of 3 vertex specifiers
Choose 3 distinct vertices in the end cap of the indexed branch . @param branchIndex which branch ( ≥0 ) @return a new array of 3 vertex specifiers
private String[] capSpecs(int branchIndex) {
        int capVertex0 = capVertex0(branchIndex);
        String geometryName = dacs.peekLast().getSpatial().getName();
        String[] result = new String[3];
        result[0] = String.format("%d/%s", capVertex0, geometryName);
        if (samplesPerLoop == 6) {
            result[1] = String.format("%d/%s", capVertex0 + 1, geometryName);
            result[2] = String.format("%d/%s", capVertex0 + 7, geometryName);
        } else if (samplesPerLoop == 9) {
            result[1] = String.format("%d/%s", capVertex0 + 4, geometryName);
            result[2] = String.format("%d/%s", capVertex0 + 13, geometryName);
        } else if (samplesPerLoop == 12) {
            result[1] = String.format("%d/%s", capVertex0 + 7, geometryName);
            result[2] = String.format("%d/%s", capVertex0 + 19, geometryName);
        } else {
            String message = "samplesPerLoop = " + samplesPerLoop;
            throw new IllegalStateException(message);
        }
        return result;
    }
private String [ ] capSpecs ( int branchIndex ) { int capVertex0 = capVertex0 ( branchIndex ) ; String geometryName = dacs . peekLast ( ) . getSpatial ( ) . getName ( ) ; String [ ] result = new String [ 3 ] ; result [ 0 ] = String . format ( "%d/%s" , capVertex0 , geometryName ) ; if ( samplesPerLoop == 6 ) { result [ 1 ] = String . format ( "%d/%s" , capVertex0 + 1 , geometryName ) ; result [ 2 ] = String . format ( "%d/%s" , capVertex0 + 7 , geometryName ) ; } else if ( samplesPerLoop == 9 ) { result [ 1 ] = String . format ( "%d/%s" , capVertex0 + 4 , geometryName ) ; result [ 2 ] = String . format ( "%d/%s" , capVertex0 + 13 , geometryName ) ; } else if ( samplesPerLoop == 12 ) { result [ 1 ] = String . format ( "%d/%s" , capVertex0 + 7 , geometryName ) ; result [ 2 ] = String . format ( "%d/%s" , capVertex0 + 19 , geometryName ) ; } else { String message = "samplesPerLoop = " + samplesPerLoop ; throw new IllegalStateException ( message ) ; } return result ; }
Choose 3 distinct vertices in the end cap of the indexed branch.
Choose 3 distinct vertices in the end cap of the indexed branch .