Class LineOfContact
- 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.lines.PhaseLine
-
- gov.nasa.worldwind.symbology.milstd2525.graphics.lines.ForwardLineOfOwnTroops
-
- gov.nasa.worldwind.symbology.milstd2525.graphics.lines.LineOfContact
-
- All Implemented Interfaces:
AVList
,Draggable
,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
Fields Modifier and Type Field Description 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, dragEnabled, draggableSupport, frameTimestamp, highlightAttributes, highlighted, labelOffset, labels, modifiers, mustCreateLabels, normalAttributes, showGraphicModifiers, showHostileIndicator, showLocation, showTextModifiers, text, unitsFormat, visible
-
-
Constructor Summary
Constructors Constructor Description LineOfContact(java.lang.String sidc)
Create a new graphic.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description protected void
doRenderGraphic(DrawContext dc)
Render this graphic, without modifiers.protected void
generateIntermediatePositions(DrawContext dc, java.lang.Iterable<? extends Position> positions)
Generate the positions required to draw the line.void
generateParallelLines(java.util.Iterator<? extends Position> iterator, java.util.List<Position> leftPositions, java.util.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, java.util.List<Position> leftPositions, java.util.List<Position> rightPositions, double halfWidth, Globe globe)
Compute points on either side of a line segment.protected java.lang.String
getGraphicLabel()
static java.util.List<java.lang.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, 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
-
path2
protected Path path2
Line of Contact is drawn with two paths. The super class manages the first path; this is the second.
-
-
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.
-
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 classForwardLineOfOwnTroops
- Parameters:
position
- the new position of the shape's reference position.
-
doRenderGraphic
protected void doRenderGraphic(DrawContext dc)
Description copied from class:PhaseLine
Render this graphic, without modifiers.- Overrides:
doRenderGraphic
in classPhaseLine
- Parameters:
dc
- Current draw context.- See Also:
AbstractTacticalGraphic.doRenderTextModifiers(gov.nasa.worldwind.render.DrawContext)
,AbstractTacticalGraphic.doRenderGraphicModifiers(gov.nasa.worldwind.render.DrawContext)
-
getGraphicLabel
protected java.lang.String getGraphicLabel()
- Overrides:
getGraphicLabel
in classForwardLineOfOwnTroops
-
generateIntermediatePositions
protected void generateIntermediatePositions(DrawContext dc, java.lang.Iterable<? extends Position> positions)
Generate the positions required to draw the line.- Overrides:
generateIntermediatePositions
in classForwardLineOfOwnTroops
- Parameters:
dc
- Current draw context.positions
- Positions that define the polygon boundary.
-
generateParallelLines
public void generateParallelLines(java.util.Iterator<? extends Position> iterator, java.util.List<Position> leftPositions, java.util.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, java.util.List<Position> leftPositions, java.util.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 ifnext
is non-null.next
- Next point on the line. May be null ifprev
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.
-
-