private void renderGeometryList(GeometryList list, RenderManager rm, Camera cam, boolean flush) {
        list.setCamera(cam); // select camera for sorting
        list.sort();
        for (int i = 0; i < list.size(); i++) {
            Geometry obj = list.get(i);
            assert obj != null;
            rm.renderGeometry(obj);
            obj.queueDistance = Float.NEGATIVE_INFINITY;
        }
        if (flush) {
            list.clear();
        }
    }
Adds a geometry to the given bucket.
The {@link RenderManager} automatically handles this task
when flattening the scene graph. The bucket to add
the geometry is determined by {@link Geometry#getQueueBucket() }.

@param g  The geometry to add
@param bucket The bucket to add to, usually 
{@link Geometry#getQueueBucket() }.
jme3-core/src/main/java/com/jme3/renderer/queue/RenderQueue.java