private static String findManager(Mesh mesh, int vertexIndex, int[] iArray,
            float[] wArray, String[] managerMap) {
        vertexBoneIndices(mesh, vertexIndex, iArray);
        vertexBoneWeights(mesh, vertexIndex, wArray);
        Map<String, Float> weightMap = weightMap(iArray, wArray, managerMap);

        float bestTotalWeight = Float.NEGATIVE_INFINITY;
        String bestName = null;
        for (Map.Entry<String, Float> entry : weightMap.entrySet()) {
            float totalWeight = entry.getValue();
            if (totalWeight >= bestTotalWeight) {
                bestTotalWeight = totalWeight;
                bestName = entry.getKey();
            }
        }

        return bestName;
    }
Determine which physics link should manage the specified mesh vertex.

@param mesh the mesh containing the vertex (not null, unaffected)
@param vertexIndex the vertex index in the mesh (&ge;0)
@param iArray temporary storage for bone indices (not null, modified)
@param wArray temporary storage for bone weights (not null, modified)
@param managerMap a map from bone indices to bone/torso names (not null,
unaffected)
@return a bone/torso name
jme3-jbullet/src/main/java/com/jme3/bullet/animation/RagUtils.java