public void setHeightMaps(AbstractHeightMap map1, AbstractHeightMap map2) throws Exception {
        if (null == map1 || null == map2) {
            throw new Exception("Height map may not be null");
        }


        if (map1.getSize() != map2.getSize()) {
            throw new Exception("The two maps must be of the same size");
        }


        this.size = map1.getSize();
        this.map1 = map1;
        this.map2 = map2;
    }
<code>setHeightMaps</code> sets the height maps to combine.
The size of the height maps must be the same.
@param map1 the first height map.
@param map2 the second height map.
@throws Exception if either height map is null, or their
             sizes do not match.
jme3-terrain/src/main/java/com/jme3/terrain/heightmap/CombinerHeightMap.java