Package gov.nasa.worldwind
Class BasicModel
- java.lang.Object
-
- gov.nasa.worldwind.avlist.AVListImpl
-
- gov.nasa.worldwind.WWObjectImpl
-
- gov.nasa.worldwind.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 inworldwind.xml
or its application-specified alternate.
-
-
Constructor Summary
Constructors Constructor Description BasicModel()
BasicModel(Globe globe, LayerList layers)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected LayerList
createLayersFromElement(org.w3c.dom.Element element)
Create the layer list from an XML configuration element.Extent
getExtent()
Returns the bounding sphere in Cartesian world coordinates of the model.Globe
getGlobe()
Indicates the globe in this model.LayerList
getLayers()
Indicates the layers associated with this model.boolean
isShowTessellationBoundingVolumes()
Indicates whether the bounding volumes of the tessellated globe's surface geometry should be displayed.boolean
isShowWireframeExterior()
Indicates whether the globe surface's exterior geometry is to be drawn.boolean
isShowWireframeInterior()
Indicates whether the globe surface's interior geometry is to be drawn.void
onMessage(Message msg)
Empty implementation of MessageListener.void
setGlobe(Globe globe)
Specifies the model's globe.void
setLayers(LayerList layers)
Specifies the model's layers.void
setShowTessellationBoundingVolumes(boolean showTessellationBoundingVolumes)
Specifies whether the bounding volumes of the globes tessellated surface geometry is to be drawn.void
setShowWireframeExterior(boolean show)
Specifies whether to display as wireframe the exterior geometry of the tessellated globe surface.void
setShowWireframeInterior(boolean show)
Specifies whether to display as wireframe the interior geometry of the tessellated globe surface.-
Methods inherited from class gov.nasa.worldwind.WWObjectImpl
propertyChange
-
Methods inherited from class gov.nasa.worldwind.avlist.AVListImpl
addPropertyChangeListener, addPropertyChangeListener, clearList, copy, firePropertyChange, firePropertyChange, getBooleanValue, getBooleanValue, getChangeSupport, getDoubleValue, getDoubleValue, getEntries, getIntegerValue, getIntegerValue, getLongValue, getLongValue, getRestorableStateForAVPair, getStringValue, getStringValue, getStringValue, getValue, getValues, hasKey, removeKey, removePropertyChangeListener, removePropertyChangeListener, setValue, setValues
-
Methods inherited from class java.lang.Object
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface gov.nasa.worldwind.avlist.AVList
addPropertyChangeListener, addPropertyChangeListener, clearList, copy, firePropertyChange, firePropertyChange, getEntries, getStringValue, getValue, getValues, hasKey, removeKey, removePropertyChangeListener, removePropertyChangeListener, setValue, setValues
-
-
-
-
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.
-
setLayers
public void setLayers(LayerList layers)
Specifies the model's layers.
-
getGlobe
public Globe getGlobe()
Indicates the globe in this model.
-
getLayers
public LayerList getLayers()
Indicates the layers associated with 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 interfaceModel
- 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 interfaceModel
- 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 interfaceModel
- 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 interfaceModel
- 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 interfaceModel
- 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 interfaceModel
- 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.
-
onMessage
public void onMessage(Message msg)
Empty implementation of MessageListener.This implementation forwards the message each layer in the model.
- Specified by:
onMessage
in interfaceMessageListener
- Overrides:
onMessage
in classWWObjectImpl
- Parameters:
msg
- The message that was received.
-
-