public static boolean hasVertices(int boneIndex, Mesh[] targets,
            float weightThreshold) {
        for (Mesh mesh : targets) {
            VertexBuffer biBuf = mesh.getBuffer(VertexBuffer.Type.BoneIndex);
            Buffer boneIndices = biBuf.getDataReadOnly();
            FloatBuffer boneWeight
                    = (FloatBuffer) mesh.getBuffer(Type.BoneWeight).getData();

            boneIndices.rewind();
            boneWeight.rewind();

            int vertexComponents = mesh.getVertexCount() * 3;
            for (int i = 0; i < vertexComponents; i += 3) {
                int start = i / 3 * 4;
                for (int k = start; k < start + 4; k++) {
                    if (readIndex(boneIndices, k) == boneIndex
                            && boneWeight.get(k) >= weightThreshold) {
                        return true;
                    }
                }
            }
        }

        return false;
    }
Test whether the indexed bone has at least one vertex in the specified
meshes with a weight greater than the specified threshold.

@param boneIndex the index of the bone (&ge;0)
@param targets the meshes to search (not null, no null elements)
@param weightThreshold the threshold (&ge;0, &le;1)
@return true if at least 1 vertex found, otherwise false
jme3-jbullet/src/main/java/com/jme3/bullet/control/ragdoll/RagdollUtils.java