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

@param meshes the animated meshes to analyze (not null, unaffected)
@param skeleton (not null, unaffected)
@return a map from bone indices to total mesh weight
Calculate the total mesh weight animated by each Bone in the specified meshes . @param meshes the animated meshes to analyze ( not null unaffected ) @param skeleton ( not null unaffected ) @return a map from bone indices to total mesh weight
private static float[] totalWeights(Mesh[] meshes, Skeleton skeleton) {
        Validate.nonNull(meshes, "meshes");
        int numBones = skeleton.getBoneCount();
        float[] result = new float[numBones];
        for (Mesh mesh : meshes) {
            RagUtils.addWeights(mesh, result);
        }
        List<Bone> bones = MySkeleton.preOrderBones(skeleton);
        Collections.reverse(bones);
        for (Bone childBone : bones) {
            int childIndex = skeleton.getBoneIndex(childBone);
            Bone parent = childBone.getParent();
            if (parent != null) {
                int parentIndex = skeleton.getBoneIndex(parent);
                result[parentIndex] += result[childIndex];
            }
        }
        return result;
    }
private static float [ ] totalWeights ( Mesh [ ] meshes , Skeleton skeleton ) { Validate . nonNull ( meshes , "meshes" ) ; int numBones = skeleton . getBoneCount ( ) ; float [ ] result = new float [ numBones ] ; for ( Mesh mesh : meshes ) { RagUtils . addWeights ( mesh , result ) ; } List < Bone > bones = MySkeleton . preOrderBones ( skeleton ) ; Collections . reverse ( bones ) ; for ( Bone childBone : bones ) { int childIndex = skeleton . getBoneIndex ( childBone ) ; Bone parent = childBone . getParent ( ) ; if ( parent != null ) { int parentIndex = skeleton . getBoneIndex ( parent ) ; result [ parentIndex ] += result [ childIndex ] ; } } return result ; }
Calculate the total mesh weight animated by each Bone in the specified
 meshes.
Calculate the total mesh weight animated by each Bone in the specified meshes .