protected void doRender(DrawContext dc, Iterable<? extends Renderable> renderables) {
   for (Renderable renderable : renderables) {
     try {
       // If the caller has specified their own Iterable,
       // then we cannot make any guarantees about its contents.
       if (renderable != null) renderable.render(dc);
     } catch (Exception e) {
       String msg = Logging.getMessage("generic.ExceptionWhileRenderingRenderable");
       Logging.logger().log(java.util.logging.Level.SEVERE, msg, e);
       // continue to next renderable
     }
   }
 }
  protected void doPick(
      DrawContext dc, Iterable<? extends Renderable> renderables, java.awt.Point pickPoint) {
    this.pickSupport.clearPickList();
    this.pickSupport.beginPicking(dc);

    try {
      for (Renderable renderable : renderables) {
        // If the caller has specified their own Iterable,
        // then we cannot make any guarantees about its contents.
        if (renderable != null) {
          float[] inColor = new float[4];
          dc.getGL().glGetFloatv(GL.GL_CURRENT_COLOR, inColor, 0);
          java.awt.Color color = dc.getUniquePickColor();
          dc.getGL()
              .glColor3ub((byte) color.getRed(), (byte) color.getGreen(), (byte) color.getBlue());

          try {
            renderable.render(dc);
          } catch (Exception e) {
            String msg = Logging.getMessage("generic.ExceptionWhilePickingRenderable");
            Logging.logger().severe(msg);
            continue; // go on to next renderable
          }

          dc.getGL().glColor4fv(inColor, 0);

          if (renderable instanceof Locatable) {
            this.pickSupport.addPickableObject(
                color.getRGB(), renderable, ((Locatable) renderable).getPosition(), false);
          } else {
            this.pickSupport.addPickableObject(color.getRGB(), renderable);
          }
        }
      }

      this.pickSupport.resolvePick(dc, pickPoint, this);
    } finally {
      this.pickSupport.endPicking(dc);
    }
  }