MinieLibrary/src/main/java/com/jme3/bullet/animation/RagUtils.java
/**
     * Assign each mesh vertex to a bone/torso link and add its location (mesh
     * coordinates in bind pose) to that link's list.
     *
     * @param meshes array of animated meshes to use (not null, unaffected)
     * @param managerMap a map from bone indices to managing link names (not
     * null, unaffected)
     * @return a new map from bone/torso names to sets of vertex coordinates
     */
Assign each mesh vertex to a bone/torso link and add its location (mesh
coordinates in bind pose) to that link's list.

@param meshes array of animated meshes to use (not null, unaffected)
@param managerMap a map from bone indices to managing link names (not
null, unaffected)
@return a new map from bone/torso names to sets of vertex coordinates
Assign each mesh vertex to a bone / torso link and add its location ( mesh coordinates in bind pose ) to that link ' s list . @param meshes array of animated meshes to use ( not null unaffected ) @param managerMap a map from bone indices to managing link names ( not null unaffected ) @return a new map from bone / torso names to sets of vertex coordinates
public static Map<String, VectorSet> coordsMap(Mesh[] meshes,
            String[] managerMap) {
        Validate.nonNull(managerMap, "manager map");
        float[] wArray = new float[4];
        int[] iArray = new int[4];
        Vector3f bindPosition = new Vector3f();
        Map<String, VectorSet> coordsMap = new HashMap<>(32);
        for (Mesh mesh : meshes) {
            int numVertices = mesh.getVertexCount();
            for (int vertexI = 0; vertexI < numVertices; ++vertexI) {
                String managerName = findManager(mesh, vertexI, iArray, wArray,
                        managerMap);
                VectorSet set = coordsMap.get(managerName);
                if (set == null) {
                    set = new VectorSetUsingBuffer(1, false);
                    coordsMap.put(managerName, set);
                }
                MyMesh.vertexVector3f(mesh, VertexBuffer.Type.BindPosePosition,
                        vertexI, bindPosition);
                set.add(bindPosition);
            }
        }
        return coordsMap;
    }
public static Map < String , VectorSet > coordsMap ( Mesh [ ] meshes , String [ ] managerMap ) { Validate . nonNull ( managerMap , "manager map" ) ; float [ ] wArray = new float [ 4 ] ; int [ ] iArray = new int [ 4 ] ; Vector3f bindPosition = new Vector3f ( ) ; Map < String , VectorSet > coordsMap = new HashMap < > ( 32 ) ; for ( Mesh mesh : meshes ) { int numVertices = mesh . getVertexCount ( ) ; for ( int vertexI = 0 ; vertexI < numVertices ; ++ vertexI ) { String managerName = findManager ( mesh , vertexI , iArray , wArray , managerMap ) ; VectorSet set = coordsMap . get ( managerName ) ; if ( set == null ) { set = new VectorSetUsingBuffer ( 1 , false ) ; coordsMap . put ( managerName , set ) ; } MyMesh . vertexVector3f ( mesh , VertexBuffer . Type . BindPosePosition , vertexI , bindPosition ) ; set . add ( bindPosition ) ; } } return coordsMap ; }
Assign each mesh vertex to a bone/torso link and add its location (mesh
 coordinates in bind pose) to that link's list.
Assign each mesh vertex to a bone / torso link and add its location ( mesh coordinates in bind pose ) to that link ' s list .