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.xmlor 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 LayerListcreateLayersFromElement(org.w3c.dom.Element element)Create the layer list from an XML configuration element.ExtentgetExtent()Returns the bounding sphere in Cartesian world coordinates of the model.GlobegetGlobe()Indicates the globe in this model.LayerListgetLayers()Indicates the layers associated with this model.booleanisShowTessellationBoundingVolumes()Indicates whether the bounding volumes of the tessellated globe's surface geometry should be displayed.booleanisShowWireframeExterior()Indicates whether the globe surface's exterior geometry is to be drawn.booleanisShowWireframeInterior()Indicates whether the globe surface's interior geometry is to be drawn.voidonMessage(Message msg)Empty implementation of MessageListener.voidsetGlobe(Globe globe)Specifies the model's globe.voidsetLayers(LayerList layers)Specifies the model's layers.voidsetShowTessellationBoundingVolumes(boolean showTessellationBoundingVolumes)Specifies whether the bounding volumes of the globes tessellated surface geometry is to be drawn.voidsetShowWireframeExterior(boolean show)Specifies whether to display as wireframe the exterior geometry of the tessellated globe surface.voidsetShowWireframeInterior(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:
setShowWireframeInteriorin 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:
setShowWireframeExteriorin 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:
isShowWireframeInteriorin 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:
isShowWireframeExteriorin 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:
isShowTessellationBoundingVolumesin 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:
setShowTessellationBoundingVolumesin 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:
onMessagein interfaceMessageListener- Overrides:
onMessagein classWWObjectImpl- Parameters:
msg- The message that was received.
-
-