Пример #1
0
  /**
   * Add the projection background color to the base level of the Java 3D map. The MapHandler
   * provides the MapBean and therefore the projection.
   *
   * @param bg The feature to be added to the Sea attribute
   * @param mh The feature to be added to the Sea attribute
   */
  protected void addSea(Group bg, MapHandler mh) {
    MapBean map = (MapBean) mh.get("com.bbn.openmap.MapBean");
    if (map != null) {
      Debug.message("3d", "LayerMapContent: putting down sea.");
      Color seaColor = map.getBackground();

      Projection proj = map.getProjection();

      // Make the background strech a screen around the current
      // map, all directions.
      int width = proj.getWidth();
      int height = proj.getHeight();

      java.awt.geom.GeneralPath background =
          // OMGraphic.createBoxShape(0, 0, width, height);
          OMGraphicAdapter.createBoxShape(-width, -height, width * 3, height * 3);

      addTo(bg, OMGraphicUtil.createShape3D(background, 0, seaColor, true));
    }
  }
Пример #2
0
 /**
  * Add a layer to the Group, at a specific height.
  *
  * @param bg The feature to be added to the Content attribute
  * @param layer The feature to be added to the Content attribute
  * @param baselineHeight The feature to be added to the Content attribute
  */
 protected void addContent(Group bg, OMGraphicHandlerLayer layer, double baselineHeight) {
   Debug.message(
       "3d", "LayerMapContent: putting layer " + layer.getName() + " graphics on the map.");
   addTo(bg, OMGraphicUtil.createShape3D(layer.getList(), baselineHeight));
 }