private void swap(int idx1, int idx2) {
        Geometry g = geometries[idx1];
        geometries[idx1] = geometries[idx2];
        geometries[idx2] = g;

        if (geometries[idx1] != null) {
            InstancedNode.setGeometryStartIndex2(geometries[idx1], idx1);
        }
        if (geometries[idx2] != null) {
            InstancedNode.setGeometryStartIndex2(geometries[idx2], idx2);
        }
    }
@return The number of instances are in this {@link InstancedGeometry}
jme3-core/src/main/java/com/jme3/scene/instancing/InstancedGeometry.java