public void addTexture(Texture texture, String mapName, String sourceTextureName) {
        if (texture == null) {
            throw new IllegalStateException("Texture cannot be null!");
        }
        String name = textureName(texture);
        if (texture.getImage() != null && name != null) {
            addImage(texture.getImage(), name, mapName, sourceTextureName);
        } else {
            throw new IllegalStateException("Texture has no asset key name!");
        }
    }
Add a texture for a specific map name at the location of another existing texture (on the master map).
@param texture A texture to add to the atlas.
@param mapName A freely chosen map name that can be later retrieved as a Texture.
@param sourceTextureName Name of the master map used for the location.
jme3-core/src/tools/java/jme3tools/optimize/TextureAtlas.java