Class FortifiedArea
- java.lang.Object
-
- gov.nasa.worldwind.avlist.AVListImpl
-
- gov.nasa.worldwind.symbology.AbstractTacticalGraphic
-
- gov.nasa.worldwind.symbology.milstd2525.AbstractMilStd2525TacticalGraphic
-
- gov.nasa.worldwind.symbology.milstd2525.graphics.areas.BasicArea
-
- gov.nasa.worldwind.symbology.milstd2525.graphics.areas.FortifiedArea
-
- All Implemented Interfaces:
AVList
,Draggable
,Movable
,Highlightable
,PreRenderable
,Renderable
,MilStd2525TacticalGraphic
,TacticalGraphic
public class FortifiedArea extends BasicArea
Implementation of the Fortified Area graphic (2.X.2.1.3.4).
-
-
Field Summary
Fields Modifier and Type Field Description protected java.util.List<Position>
computedPositions
Positions computed from the original positions.static int
DEFAULT_NUM_WAVES
Default number of wave lengths for a simple shape.protected java.lang.Iterable<? extends Position>
positions
Original positions specified by the application.protected double
waveLength
Indicates the wavelength of the square wave that forms the graphic's border.-
Fields inherited from class gov.nasa.worldwind.symbology.milstd2525.graphics.areas.BasicArea
identityLabel1, identityLabel2, polygon
-
Fields inherited from class gov.nasa.worldwind.symbology.milstd2525.AbstractMilStd2525TacticalGraphic
maskedSymbolCode, OUTLINE_STIPPLE_FACTOR_ANTICIPATED, OUTLINE_STIPPLE_FACTOR_PRESENT, OUTLINE_STIPPLE_PATTERN, symbolCode
-
Fields inherited from class gov.nasa.worldwind.symbology.AbstractTacticalGraphic
activeOverrides, activeShapeAttributes, DEFAULT_HIGHLIGHT_MATERIAL, DEFAULT_LABEL_INTERIOR_OPACITY, delegateOwner, dragEnabled, draggableSupport, frameTimestamp, highlightAttributes, highlighted, labelOffset, labels, modifiers, mustCreateLabels, normalAttributes, showGraphicModifiers, showHostileIndicator, showLocation, showTextModifiers, text, unitsFormat, visible
-
-
Constructor Summary
Constructors Constructor Description FortifiedArea(java.lang.String sidc)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description protected double
computeDefaultWavelength(Globe globe)
Compute a default tooth size for the polygon.void
computeGeometry(DrawContext dc)
protected void
generateIntermediatePositions(DrawContext dc, java.lang.Iterable<? extends Position> positions)
Generate the positions required to draw the polygon with a square wave boundary.java.lang.Iterable<? extends Position>
getPositions()
Indicates the positions of the control points that place and orient the graphic.static java.util.List<java.lang.String>
getSupportedGraphics()
Indicates the graphics supported by this class.double
getWaveLength()
Indicates the wavelength of the square wave that forms the graphic's boundary.void
moveTo(Position position)
Move the shape over the globe's surface while maintaining its original azimuth, its orientation relative to North.void
setPositions(java.lang.Iterable<? extends Position> positions)
Specifies the positions of the control points that place and orient the graphic.void
setWaveLength(double waveLength)
Specifies the wavelength of the square wave that forms the graphic's boundary.-
Methods inherited from class gov.nasa.worldwind.symbology.milstd2525.graphics.areas.BasicArea
applyDelegateOwner, createLabels, createLabelText, createPolygon, determineIdentityLabelPositions, determineLabelPositions, determineMainLabelPosition, doRenderGraphic, getGraphicLabel, getLabelAlignment, getPositionCount, getReferencePosition, makeShapes, preRender
-
Methods inherited from class gov.nasa.worldwind.symbology.milstd2525.AbstractMilStd2525TacticalGraphic
applyDefaultAttributes, createSymbol, getDefaultMaterial, getIdentifier, getModifier, getOutlineStippleFactor, getOutlineStipplePattern, getStatus, getText, mustShowHostileIndicator, setModifier, setStatus
-
Methods inherited from class gov.nasa.worldwind.symbology.AbstractTacticalGraphic
addLabel, applyLabelAttributes, applyOverrideAttributes, computeLabelInteriorOpacity, determineActiveAttributes, determineDelegateOwner, determinePerFrameAttributes, doDrag, doRenderGraphicModifiers, doRenderTextModifiers, drag, getActiveDelegateOwner, getActiveOverrideAttributes, getActiveShapeAttributes, getAttributes, getDefaultLabelOffset, getDelegateOwner, getHighlightAttributes, getLabelMaterial, getLabelOffset, getUnitsFormat, isDragEnabled, isHighlighted, isShowGraphicModifiers, isShowHostileIndicator, isShowLocation, isShowTextModifiers, isVisible, move, onModifierChanged, render, setAttributes, setDelegateOwner, setDragEnabled, setHighlightAttributes, setHighlighted, setLabelOffset, setShowGraphicModifiers, setShowHostileIndicator, setShowLocation, setShowTextModifiers, setText, setUnitsFormat, setVisible
-
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
-
Methods inherited from interface gov.nasa.worldwind.render.Highlightable
isHighlighted, setHighlighted
-
Methods inherited from interface gov.nasa.worldwind.render.Renderable
render
-
Methods inherited from interface gov.nasa.worldwind.symbology.TacticalGraphic
getAttributes, getDelegateOwner, getHighlightAttributes, getLabelOffset, getUnitsFormat, isShowGraphicModifiers, isShowHostileIndicator, isShowLocation, isShowTextModifiers, isVisible, setAttributes, setDelegateOwner, setHighlightAttributes, setLabelOffset, setShowGraphicModifiers, setShowHostileIndicator, setShowLocation, setShowTextModifiers, setText, setUnitsFormat, setVisible
-
-
-
-
Field Detail
-
DEFAULT_NUM_WAVES
public static final int DEFAULT_NUM_WAVES
Default number of wave lengths for a simple shape. This number is used to compute a default wave length.- See Also:
- Constant Field Values
-
positions
protected java.lang.Iterable<? extends Position> positions
Original positions specified by the application.
-
computedPositions
protected java.util.List<Position> computedPositions
Positions computed from the original positions. This list includes the positions necessary to draw the square wave.
-
waveLength
protected double waveLength
Indicates the wavelength of the square wave that forms the graphic's border.
-
-
Method Detail
-
getSupportedGraphics
public static java.util.List<java.lang.String> getSupportedGraphics()
Indicates the graphics supported by this class.- Returns:
- List of masked SIDC strings that identify graphics that this class supports.
-
setPositions
public void setPositions(java.lang.Iterable<? extends Position> positions)
Specifies the positions of the control points that place and orient the graphic.- Specified by:
setPositions
in interfaceTacticalGraphic
- Overrides:
setPositions
in classBasicArea
- Parameters:
positions
- Positions that orient the graphic. How many positions are returned depends on the type of graphic. Some graphics require only a single position, others require many. The positions must be specified in the same order as the control points defined by the symbology set's template for this type of graphic.
-
getPositions
public java.lang.Iterable<? extends Position> getPositions()
Indicates the positions of the control points that place and orient the graphic.- Specified by:
getPositions
in interfaceTacticalGraphic
- Overrides:
getPositions
in classBasicArea
- Returns:
- positions that orient the graphic. How many positions are returned depends on the type of graphic. Some graphics require only a single position, others require many.
-
moveTo
public void moveTo(Position position)
Move the shape over the globe's surface while maintaining its original azimuth, its orientation relative to North.- Specified by:
moveTo
in interfaceMovable
- Overrides:
moveTo
in classAbstractTacticalGraphic
- Parameters:
position
- the new position of the shape's reference position.
-
getWaveLength
public double getWaveLength()
Indicates the wavelength of the square wave that forms the graphic's boundary. This is the length from the start of one square "tooth" to the start of the next.__ __ __| |__| |__ ^ ^ Wavelength
- Returns:
- The wave length, in meters.
-
setWaveLength
public void setWaveLength(double waveLength)
Specifies the wavelength of the square wave that forms the graphic's boundary. SeegetWaveLength()
for more information on how this distance is interpreted.- Parameters:
waveLength
- The wavelength, in meters.
-
computeGeometry
public void computeGeometry(DrawContext dc)
- Overrides:
computeGeometry
in classAbstractTacticalGraphic
-
generateIntermediatePositions
protected void generateIntermediatePositions(DrawContext dc, java.lang.Iterable<? extends Position> positions)
Generate the positions required to draw the polygon with a square wave boundary.- Parameters:
dc
- Current draw context.positions
- Positions that define the polygon boundary.
-
computeDefaultWavelength
protected double computeDefaultWavelength(Globe globe)
Compute a default tooth size for the polygon. This method computes the default wavelength as a function of the size of the polygon and the number of vertices. As the polygon gets bigger the wavelength will increase, but as the number of the vertices increases the wavelength will decrease to prevent the waves from obscuring the shape of the polygon.- Parameters:
globe
- Globe on which the area will be rendered.- Returns:
- The wave length.
-
-