NASA World Wind

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

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
                      extended by gov.nasa.worldwind.symbology.milstd2525.graphics.lines.LineOfContact
All Implemented Interfaces:
AVList, Movable, Highlightable, Renderable, MilStd2525TacticalGraphic, TacticalGraphic

public class LineOfContact
extends ForwardLineOfOwnTroops

Implementation of the Line of Contact graphic (2.X.2.1.2.3).


Nested Class Summary
 
Nested classes/interfaces inherited from class gov.nasa.worldwind.symbology.milstd2525.graphics.lines.ForwardLineOfOwnTroops
ForwardLineOfOwnTroops.PositionIterator
 
Field Summary
protected  Path path2
          Line of Contact is drawn with two paths.
 
Fields inherited from class gov.nasa.worldwind.symbology.milstd2525.graphics.lines.ForwardLineOfOwnTroops
computedPositions, DEFAULT_NUM_INTERVALS, DEFAULT_NUM_WAVES, intervals, positions, waveLength
 
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
LineOfContact(String sidc)
          Create a new graphic.
 
Method Summary
protected  void doRenderGraphic(DrawContext dc)
          Render this graphic, without modifiers.
protected  void generateIntermediatePositions(DrawContext dc, Iterable<? extends Position> positions)
          Generate the positions required to draw the line.
 void generateParallelLines(Iterator<? extends Position> iterator, List<Position> leftPositions, List<Position> rightPositions, double halfWidth, Globe globe)
          Create positions that describe lines parallel to a control line.
protected  void generateParallelPoints(Vec4 point, Vec4 prev, Vec4 next, List<Position> leftPositions, List<Position> rightPositions, double halfWidth, Globe globe)
          Compute points on either side of a line segment.
protected  String getGraphicLabel()
           
static List<String> getSupportedGraphics()
          Indicates the graphics supported by this class.
 void moveTo(Position position)
          Move the shape over the globe's surface while maintaining its original azimuth, its orientation relative to North.
 
Methods inherited from class gov.nasa.worldwind.symbology.milstd2525.graphics.lines.ForwardLineOfOwnTroops
computeDefaultWavelength, computeGeometry, computeGreatCirclePathLength, generateWavePositions, getIntervals, getPositions, getWaveLength, onShapeChanged, setIntervals, setPositions, setWaveLength
 
Methods inherited from class gov.nasa.worldwind.symbology.milstd2525.graphics.lines.PhaseLine
applyDefaultAttributes, applyDelegateOwner, createLabels, createPath, determineLabelPositions, 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

path2

protected Path path2
Line of Contact is drawn with two paths. The super class manages the first path; this is the second.

Constructor Detail

LineOfContact

public LineOfContact(String sidc)
Create a new graphic.

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

doRenderGraphic

protected void doRenderGraphic(DrawContext dc)
Description copied from class: PhaseLine
Render this graphic, without modifiers.

Overrides:
doRenderGraphic in class PhaseLine
Parameters:
dc - Current draw context.
See Also:
AbstractTacticalGraphic.doRenderTextModifiers(gov.nasa.worldwind.render.DrawContext), AbstractTacticalGraphic.doRenderGraphicModifiers(gov.nasa.worldwind.render.DrawContext)

generateIntermediatePositions

protected void generateIntermediatePositions(DrawContext dc,
                                             Iterable<? extends Position> positions)
Generate the positions required to draw the line.

Overrides:
generateIntermediatePositions in class ForwardLineOfOwnTroops
Parameters:
dc - Current draw context.
positions - Positions that define the polygon boundary.

generateParallelLines

public void generateParallelLines(Iterator<? extends Position> iterator,
                                  List<Position> leftPositions,
                                  List<Position> rightPositions,
                                  double halfWidth,
                                  Globe globe)
Create positions that describe lines parallel to a control line.

Parameters:
iterator - Iterator of control line positions.
leftPositions - List to collect positions on the left line.
rightPositions - List to collect positions on the right line.
halfWidth - Distance from the center line to the left or right lines.
globe - Current globe.

generateParallelPoints

protected void generateParallelPoints(Vec4 point,
                                      Vec4 prev,
                                      Vec4 next,
                                      List<Position> leftPositions,
                                      List<Position> rightPositions,
                                      double halfWidth,
                                      Globe globe)
Compute points on either side of a line segment. This method requires a point on the line, and either a next point, previous point, or both.

Parameters:
point - Center point about which to compute side points.
prev - Previous point on the line. May be null if next is non-null.
next - Next point on the line. May be null if prev is non-null.
leftPositions - Left position will be added to this list.
rightPositions - Right position will be added to this list.
halfWidth - Distance from the center line to the left or right lines.
globe - Current globe.

getGraphicLabel

protected String getGraphicLabel()
Overrides:
getGraphicLabel in class ForwardLineOfOwnTroops

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.

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 ForwardLineOfOwnTroops
Parameters:
position - the new position of the shape's reference position.

NASA World Wind