Class GlobeView3D

All Implemented Interfaces:
edu.cnu.mdi.feedback.IFeedbackProvider, edu.cnu.mdi.transfer.IFileDropHandler, ActionListener, ComponentListener, FocusListener, MouseListener, ImageObserver, MenuContainer, Serializable, EventListener, Accessible, RootPaneContainer, WindowConstants

public class GlobeView3D extends PlainView3D
A lightweight, interactive 3D globe view.

This view demonstrates reuse of the edu.cnu.mdi.mapping GeoJSON loaders and the GeoJSON resources that live in the main 2D mdi project in a true 3D rendering context. No map projection is used: longitude/latitude coordinates are mapped directly to points on a sphere.

This class deliberately extends PlainView3D rather than SimulationView3D because the globe is not time-stepped; it is an interactive visualization that redraws in response to user input.

Dateline seam

Country rings that cross the dateline can produce longitude discontinuities near +/-pi. The rendering item GlobeCountryLines3D handles this by splitting polyline strips when a segment exhibits a large longitude jump.

See Also:
  • Field Details

    • DEFAULT_RADIUS

      public static final float DEFAULT_RADIUS
      Default globe radius in scene units.
      See Also:
  • Constructor Details

    • GlobeView3D

      public GlobeView3D()
      Construct a globe view using its canonical default properties.
    • GlobeView3D

      public GlobeView3D(Properties props)
      Construct a globe view using the supplied properties.
      Parameters:
      props - the properties used to configure the view
    • GlobeView3D

      public GlobeView3D(Object... keyVals)
      Legacy compatibility constructor using alternating key/value pairs.
      Parameters:
      keyVals - alternating property key/value pairs
  • Method Details

    • getConfiguration

      public static edu.cnu.mdi.view.ViewConfiguration<GlobeView3D> getConfiguration()
      Get the lazy-creation configuration for this view.
      Returns:
      the view configuration for lazy creation
    • getViewInfo

      public edu.cnu.mdi.view.AbstractViewInfo getViewInfo()
      Overrides:
      getViewInfo in class edu.cnu.mdi.view.BaseView
    • createGlobeView

      public static GlobeView3D createGlobeView()
      Compatibility factory used by demo apps.

      Newer code should generally prefer new GlobeView3D().

      Returns:
      a new default-configured globe view
    • make3DPanel

      protected Panel3D make3DPanel(float angleX, float angleY, float angleZ, float xDist, float yDist, float zDist)
      Description copied from class: PlainView3D
      Create the 3D panel for this view.
      Specified by:
      make3DPanel in class PlainView3D
      Parameters:
      angleX - initial x rotation angle
      angleY - initial y rotation angle
      angleZ - initial z rotation angle
      xDist - initial camera x offset
      yDist - initial camera y offset
      zDist - initial camera z offset
      Returns:
      the created 3D panel