private boolean isAffectedByUpperLayers(Object target) {
        boolean higher = false;
        for (String layerName : animComposer.getLayerNames()) {
            if (layerName.equals(targetLayer)) {
                higher = true;
                continue;
            }
            if (!higher) {
                continue;
            }
            
            AnimLayer animLayer = animComposer.getLayer(layerName);
            if (animLayer.getCurrentAction() != null) {
                AnimationMask mask = animLayer.getMask();
                
                if (mask instanceof SingleLayerInfluenceMask) {
                    // dodge some needless recursion by calling a simpler method
                    if (((SingleLayerInfluenceMask) mask).simpleContains(target)) {
                        return true;
                    }
                } else if (mask != null && mask.contains(target)) {
                    return true;
                }
            }
        }
        return false;
    }
Checks if the specified target is contained within this mask.

@param target The target to check.
@return True if the target is contained within this mask, false otherwise.
jme3-core/src/main/java/com/jme3/anim/SingleLayerInfluenceMask.java