Class BasicModel

  • All Implemented Interfaces:
    AVList, MessageListener, Model, WWObject, java.beans.PropertyChangeListener, java.util.EventListener

    public class BasicModel
    extends WWObjectImpl
    implements Model
    This class aggregates the objects making up a model: the globe and layers. Through the globe it also indirectly includes the elevation model and the surface geometry tessellator. A default model is defined in worldwind.xml or its application-specified alternate.
    • Constructor Detail

      • BasicModel

        public BasicModel()
    • Method Detail

      • createLayersFromElement

        protected LayerList createLayersFromElement​(org.w3c.dom.Element element)
        Create the layer list from an XML configuration element.
        Parameters:
        element - the configuration description.
        Returns:
        a new layer list matching the specified description.
      • setGlobe

        public void setGlobe​(Globe globe)
        Specifies the model's globe.
        Specified by:
        setGlobe in interface Model
        Parameters:
        globe - the model's new globe. May be null, in which case the current globe will be detached from the model.
      • setLayers

        public void setLayers​(LayerList layers)
        Specifies the model's layers.
        Specified by:
        setLayers in interface Model
        Parameters:
        layers - the model's new layers. May be null, in which case the current layers will be detached from the model.
      • getGlobe

        public Globe getGlobe()
        Indicates the globe in this model.
        Specified by:
        getGlobe in interface Model
        Returns:
        The globe associated with this model.
      • getLayers

        public LayerList getLayers()
        Indicates the layers associated with this model.
        Specified by:
        getLayers in interface Model
        Returns:
        List of layers in this model.
      • setShowWireframeInterior

        public void setShowWireframeInterior​(boolean show)
        Specifies whether to display as wireframe the interior geometry of the tessellated globe surface.
        Specified by:
        setShowWireframeInterior in interface Model
        Parameters:
        show - true causes the geometry to be shown, false, the default, does not.
      • setShowWireframeExterior

        public void setShowWireframeExterior​(boolean show)
        Specifies whether to display as wireframe the exterior geometry of the tessellated globe surface.
        Specified by:
        setShowWireframeExterior in interface Model
        Parameters:
        show - true causes the geometry to be shown, false, the default, does not.
      • isShowWireframeInterior

        public boolean isShowWireframeInterior()
        Indicates whether the globe surface's interior geometry is to be drawn.
        Specified by:
        isShowWireframeInterior in interface Model
        Returns:
        true if it is to be drawn, otherwise false.
      • isShowWireframeExterior

        public boolean isShowWireframeExterior()
        Indicates whether the globe surface's exterior geometry is to be drawn.
        Specified by:
        isShowWireframeExterior in interface Model
        Returns:
        true if it is to be drawn, otherwise false.
      • isShowTessellationBoundingVolumes

        public boolean isShowTessellationBoundingVolumes()
        Indicates whether the bounding volumes of the tessellated globe's surface geometry should be displayed.
        Specified by:
        isShowTessellationBoundingVolumes in interface Model
        Returns:
        true if the bounding volumes are to be drawn, otherwise false.
      • setShowTessellationBoundingVolumes

        public void setShowTessellationBoundingVolumes​(boolean showTessellationBoundingVolumes)
        Specifies whether the bounding volumes of the globes tessellated surface geometry is to be drawn.
        Specified by:
        setShowTessellationBoundingVolumes in interface Model
        Parameters:
        showTessellationBoundingVolumes - true if the bounding volumes should be drawn, false, the default, if not.
      • getExtent

        public Extent getExtent()
        Returns the bounding sphere in Cartesian world coordinates of the model.
        Specified by:
        getExtent in interface Model
        Returns:
        the model's bounding sphere in Cartesian coordinates, or null if the extent cannot be determined.
      • onMessage

        public void onMessage​(Message msg)
        Empty implementation of MessageListener.

        This implementation forwards the message each layer in the model.

        Specified by:
        onMessage in interface MessageListener
        Overrides:
        onMessage in class WWObjectImpl
        Parameters:
        msg - The message that was received.