MinieLibrary/src/main/java/com/jme3/bullet/animation/RagUtils.java
/**
     * Calculate the total mesh weight animated by each Joint in the specified
     * meshes.
     *
     * @param meshes the animated meshes to analyze (not null, unaffected)
     * @param armature (not null, unaffected)
     * @return a map from joint indices to total mesh weight
     */
Calculate the total mesh weight animated by each Joint in the specified
meshes.

@param meshes the animated meshes to analyze (not null, unaffected)
@param armature (not null, unaffected)
@return a map from joint indices to total mesh weight
Calculate the total mesh weight animated by each Joint in the specified meshes . @param meshes the animated meshes to analyze ( not null unaffected ) @param armature ( not null unaffected ) @return a map from joint indices to total mesh weight
private static float[] totalWeights(Mesh[] meshes, Armature armature) {
        Validate.nonNull(meshes, "meshes");
        int numBones = armature.getJointCount();
        float[] result = new float[numBones];
        for (Mesh mesh : meshes) {
            RagUtils.addWeights(mesh, result);
        }
        List<Joint> joints = MySkeleton.preOrderJoints(armature);
        Collections.reverse(joints);
        for (Joint childJoint : joints) {
            int childIndex = childJoint.getId();
            Joint parent = childJoint.getParent();
            if (parent != null) {
                int parentIndex = parent.getId();
                result[parentIndex] += result[childIndex];
            }
        }
        return result;
    }
private static float [ ] totalWeights ( Mesh [ ] meshes , Armature armature ) { Validate . nonNull ( meshes , "meshes" ) ; int numBones = armature . getJointCount ( ) ; float [ ] result = new float [ numBones ] ; for ( Mesh mesh : meshes ) { RagUtils . addWeights ( mesh , result ) ; } List < Joint > joints = MySkeleton . preOrderJoints ( armature ) ; Collections . reverse ( joints ) ; for ( Joint childJoint : joints ) { int childIndex = childJoint . getId ( ) ; Joint parent = childJoint . getParent ( ) ; if ( parent != null ) { int parentIndex = parent . getId ( ) ; result [ parentIndex ] += result [ childIndex ] ; } } return result ; }
Calculate the total mesh weight animated by each Joint in the specified
 meshes.
Calculate the total mesh weight animated by each Joint in the specified meshes .