public Material getMaterial() {
        if (!batches.isEmpty()) {
            Batch b = batches.iterator().next();
            return b.geometry.getMaterial();
        }
        return null;
    }
Returns the material that is used for the first batch of this BatchNode.
<p>
Use getMaterial(Material material,int batchIndex) to get a material from a specific batch.

@return the material that is used for the first batch of this BatchNode
@see #setMaterial(com.jme3.material.Material)
jme3-core/src/main/java/com/jme3/scene/BatchNode.java