NASA World Wind

gov.nasa.worldwind.symbology.milstd2525.graphics.lines
Class ForwardLineOfOwnTroops

java.lang.Object
  extended by gov.nasa.worldwind.avlist.AVListImpl
      extended by gov.nasa.worldwind.symbology.AbstractTacticalGraphic
          extended by gov.nasa.worldwind.symbology.milstd2525.AbstractMilStd2525TacticalGraphic
              extended by gov.nasa.worldwind.symbology.milstd2525.graphics.lines.PhaseLine
                  extended by gov.nasa.worldwind.symbology.milstd2525.graphics.lines.ForwardLineOfOwnTroops
All Implemented Interfaces:
AVList, Movable, Highlightable, Renderable, MilStd2525TacticalGraphic, TacticalGraphic
Direct Known Subclasses:
LineOfContact

public class ForwardLineOfOwnTroops
extends PhaseLine

Implementation of the Forward Line of Own Troops graphic (2.X.2.1.2.2).


Nested Class Summary
protected static class ForwardLineOfOwnTroops.PositionIterator
          Iterator to generate equally spaced positions along a control line.
 
Field Summary
protected  List<Position> computedPositions
          Positions computed from the original positions.
static int DEFAULT_NUM_INTERVALS
          Default number of intervals used to draw the arcs.
static int DEFAULT_NUM_WAVES
          Default number of wave lengths for a simple shape.
protected  int intervals
          Number of intervals used to draw the arcs along the line.
protected  Iterable<? extends Position> positions
          Original positions specified by the application.
protected  double waveLength
          Indicates wave length (in meters) of the semicircle wave along the graphic boundary.
 
Fields inherited from class gov.nasa.worldwind.symbology.milstd2525.graphics.lines.PhaseLine
path, PLD_OUTLINE_STIPPLE_FACTOR
 
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, frameTimestamp, highlightAttributes, highlighted, labelOffset, labels, modifiers, mustCreateLabels, normalAttributes, showGraphicModifiers, showHostileIndicator, showLocation, showTextModifiers, text, unitsFormat, visible
 
Constructor Summary
ForwardLineOfOwnTroops(String sidc)
          Create a new graphic.
 
Method Summary
protected  double computeDefaultWavelength(Iterable<? extends Position> positions, Globe globe)
           
protected  void computeGeometry(DrawContext dc)
          
protected  Angle computeGreatCirclePathLength(Iterable<? extends Position> positions)
           
protected  void generateIntermediatePositions(DrawContext dc, Iterable<? extends Position> positions)
          Generate the positions required to draw the polygon with a triangle wave boundary.
protected  List<Position> generateWavePositions(Iterator<? extends Position> iterator, double radius, boolean reverse)
           
protected  String getGraphicLabel()
           
 int getIntervals()
          Indicates the number of intervals used to draw the arc in this graphic.
 Iterable<? extends Position> getPositions()
          Indicates the positions of the control points that place and orient the graphic.
static List<String> getSupportedGraphics()
          Indicates the graphics supported by this class.
 double getWaveLength()
          Indicates the wavelength of the semicircle 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.
protected  void onShapeChanged()
           
 void setIntervals(int intervals)
          Specifies the number of intervals used to draw the arc in this graphic.
 void setPositions(Iterable<? extends Position> positions)
          Specifies the positions of the control points that place and orient the graphic.
 void setWaveLength(int waveLength)
          Specifies the wavelength of the triangle wave that forms the graphic's boundary.
 
Methods inherited from class gov.nasa.worldwind.symbology.milstd2525.graphics.lines.PhaseLine
applyDefaultAttributes, applyDelegateOwner, createLabels, createPath, determineLabelPositions, doRenderGraphic, getReferencePosition
 
Methods inherited from class gov.nasa.worldwind.symbology.milstd2525.AbstractMilStd2525TacticalGraphic
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, doRenderGraphicModifiers, doRenderTextModifiers, getActiveDelegateOwner, getActiveOverrideAttributes, getActiveShapeAttributes, getAttributes, getDefaultLabelOffset, getDelegateOwner, getHighlightAttributes, getLabelMaterial, getLabelOffset, getUnitsFormat, isHighlighted, isShowGraphicModifiers, isShowHostileIndicator, isShowLocation, isShowTextModifiers, isVisible, move, onModifierChanged, render, setAttributes, setDelegateOwner, 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, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
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
 
Methods inherited from interface gov.nasa.worldwind.render.Renderable
render
 
Methods inherited from interface gov.nasa.worldwind.render.Highlightable
isHighlighted, setHighlighted
 
Methods inherited from interface gov.nasa.worldwind.Movable
move
 
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
 

Field Detail

computedPositions

protected List<Position> computedPositions
Positions computed from the original positions. This list includes the positions necessary to draw the triangle wave.


DEFAULT_NUM_INTERVALS

public static final int DEFAULT_NUM_INTERVALS
Default number of intervals used to draw the arcs.

See Also:
Constant Field Values

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

intervals

protected int intervals
Number of intervals used to draw the arcs along the line.


positions

protected Iterable<? extends Position> positions
Original positions specified by the application.


waveLength

protected double waveLength
Indicates wave length (in meters) of the semicircle wave along the graphic boundary.

Constructor Detail

ForwardLineOfOwnTroops

public ForwardLineOfOwnTroops(String sidc)
Create a new graphic.

Parameters:
sidc - MIL-STD-2525C identifier code.
Method Detail

computeDefaultWavelength

protected double computeDefaultWavelength(Iterable<? extends Position> positions,
                                          Globe globe)

computeGeometry

protected void computeGeometry(DrawContext dc)

Overrides:
computeGeometry in class AbstractTacticalGraphic

computeGreatCirclePathLength

protected Angle computeGreatCirclePathLength(Iterable<? extends Position> positions)

generateIntermediatePositions

protected void generateIntermediatePositions(DrawContext dc,
                                             Iterable<? extends Position> positions)
Generate the positions required to draw the polygon with a triangle wave boundary.

Parameters:
dc - Current draw context.
positions - Positions that define the polygon boundary.

generateWavePositions

protected List<Position> generateWavePositions(Iterator<? extends Position> iterator,
                                               double radius,
                                               boolean reverse)

getGraphicLabel

protected String getGraphicLabel()
Overrides:
getGraphicLabel in class PhaseLine

getIntervals

public int getIntervals()
Indicates the number of intervals used to draw the arc in this graphic.

Returns:
Intervals used to draw arc.

getPositions

public Iterable<? extends Position> getPositions()
Indicates the positions of the control points that place and orient the graphic.

Specified by:
getPositions in interface TacticalGraphic
Overrides:
getPositions in class PhaseLine
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.

getSupportedGraphics

public static List<String> getSupportedGraphics()
Indicates the graphics supported by this class.

Returns:
List of masked SIDC strings that identify graphics that this class supports.

getWaveLength

public double getWaveLength()
Indicates the wavelength of the semicircle wave that forms the graphic's boundary. This is the length from the start of one "tooth" to the start of the next. If not wave length is specified a default wave length will be computed.

 /\/\/\/\/\
 ^ ^
 Wavelength
 

Returns:
The wave length, in meters.

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 interface Movable
Overrides:
moveTo in class AbstractTacticalGraphic
Parameters:
position - the new position of the shape's reference position.

onShapeChanged

protected void onShapeChanged()

setIntervals

public void setIntervals(int intervals)
Specifies the number of intervals used to draw the arc in this graphic. More intervals will result in a smoother looking arc.

Parameters:
intervals - Number of intervals for drawing the arc.

setPositions

public void setPositions(Iterable<? extends Position> positions)
Specifies the positions of the control points that place and orient the graphic.

Specified by:
setPositions in interface TacticalGraphic
Overrides:
setPositions in class PhaseLine
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.

setWaveLength

public void setWaveLength(int waveLength)
Specifies the wavelength of the triangle wave that forms the graphic's boundary. See getWaveLength() for more information on how this distance is interpreted.

Parameters:
waveLength - The wavelength, in meters.

NASA World Wind