public void addInstance(Geometry geometry) {
        if (geometry == null) {
            throw new IllegalArgumentException("geometry cannot be null");
        }

        // Take an index from the end.
        if (firstUnusedIndex + 1 >= geometries.length) {
            // No more room.
            setMaxNumInstances(getMaxNumInstances() * 2);
        }

        int freeIndex = firstUnusedIndex;
        firstUnusedIndex++;

        geometries[freeIndex] = geometry;
        InstancedNode.setGeometryStartIndex2(geometry, freeIndex);
        setBoundRefresh();
    }
@deprecated use {@link #updateInstances(com.jme3.renderer.Camera)}
jme3-core/src/main/java/com/jme3/scene/instancing/InstancedGeometry.java