NASA World Wind

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

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

public class DirectionOfAttackForFeint
extends DirectionOfAttack

Implementation of the Direction of Attack for Feint graphic (2.X.2.3.3).


Field Summary
protected  double curvature
          Factor that controls the curve of the line.
protected static double DASHED_LINE_DISTANCE
          Factor used to compute the distance between the solid and dashed lines in the arrow head.
protected  ShapeAttributes dashedAttributes
          Shape attributes for the dashed part of the graphic.
static Angle DEFAULT_ARROWHEAD_ANGLE
          Default angle of the arrowhead.
static double DEFAULT_CURVATURE
          Default factor that determines the curvature of the line.
static int DEFAULT_NUM_INTERVALS
          Default number of intervals used to draw the curve.
protected  int intervals
          Number of intervals used to draw the curve.
protected static Offset LABEL_OFFSET
          Offset applied to the label.
protected  Position labelOrientationPosition
          Orientation position for the label.
protected  Position labelPosition
          Position of the label along the curve.
 
Fields inherited from class gov.nasa.worldwind.symbology.milstd2525.graphics.lines.DirectionOfAttack
arrowAngle, arrowLength, DEFAULT_ARROWHEAD_LENGTH, DEFAULT_ARROWHEAD_OUTLINE_WIDTH, endPosition, outlineWidth, paths, startPosition
 
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
DirectionOfAttackForFeint(String sidc)
          Create a new arrow graphic.
 
Method Summary
protected  Vec4[] computeBezierControlPoints(DrawContext dc, Vec4 start, Vec4 end, double curvature)
          Compute the position of control points that will generate a Bezier curve that looks like the Direction of Attack for Feint graphic in MIL-STD-2525C (pg.
protected  void createLabels()
           
protected  void createShapes(DrawContext dc)
          Create the list of positions that describe the arrow.
protected  void determineActiveAttributes()
          Determine active attributes for this frame.
protected  void determineLabelPositions(DrawContext dc)
          Determine positions for the start and end labels.
 double getCurvature()
          Indicates a factor that determines the curvature of the line.
protected  Offset getDefaultLabelOffset()
          Indicates the default offset applied to the graphic's main label.
 int getIntervals()
          Indicates the number of intervals used to draw the curve in this graphic.
static List<String> getSupportedGraphics()
          Indicates the graphics supported by this class.
protected  void onShapeChanged()
           
 void setCurvature(double factor)
          Specifies a factor that determines the curvature of the line.
 void setIntervals(int intervals)
          Specifies the number of intervals used to draw the curve in this graphic.
 
Methods inherited from class gov.nasa.worldwind.symbology.milstd2525.graphics.lines.DirectionOfAttack
applyDelegateOwner, computeArrowheadPositions, computeGeometry, createPath, doRenderGraphic, getArrowAngle, getArrowLength, getOutlineWidth, getPositions, getReferencePosition, isDrawOutlined, setArrowAngle, setArrowLength, setOutlineWidth, setPositions
 
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, determineDelegateOwner, determinePerFrameAttributes, doRenderGraphicModifiers, doRenderTextModifiers, getActiveDelegateOwner, getActiveOverrideAttributes, getActiveShapeAttributes, getAttributes, getDelegateOwner, getHighlightAttributes, getLabelMaterial, getLabelOffset, getUnitsFormat, isHighlighted, isShowGraphicModifiers, isShowHostileIndicator, isShowLocation, isShowTextModifiers, isVisible, move, moveTo, 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, moveTo
 
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

curvature

protected double curvature
Factor that controls the curve of the line. Valid values are 0 to 1. Larger values result in a more pronounced curve.


DASHED_LINE_DISTANCE

protected static final double DASHED_LINE_DISTANCE
Factor used to compute the distance between the solid and dashed lines in the arrow head. A larger value will move the dashed line farther from the solid line.

See Also:
Constant Field Values

dashedAttributes

protected ShapeAttributes dashedAttributes
Shape attributes for the dashed part of the graphic.


DEFAULT_ARROWHEAD_ANGLE

public static final Angle DEFAULT_ARROWHEAD_ANGLE
Default angle of the arrowhead.


DEFAULT_CURVATURE

public static final double DEFAULT_CURVATURE
Default factor that determines the curvature of the line.

See Also:
Constant Field Values

DEFAULT_NUM_INTERVALS

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

See Also:
Constant Field Values

intervals

protected int intervals
Number of intervals used to draw the curve.


LABEL_OFFSET

protected static final Offset LABEL_OFFSET
Offset applied to the label. This offset aligns the bottom edge of the label with the geographic position, in order to keep the label above the graphic as the zoom changes.


labelOrientationPosition

protected Position labelOrientationPosition
Orientation position for the label. (The label is drawn on a line between this position and labelPosition.


labelPosition

protected Position labelPosition
Position of the label along the curve.

Constructor Detail

DirectionOfAttackForFeint

public DirectionOfAttackForFeint(String sidc)
Create a new arrow graphic.

Parameters:
sidc - Symbol code the identifies the graphic.
Method Detail

computeBezierControlPoints

protected Vec4[] computeBezierControlPoints(DrawContext dc,
                                            Vec4 start,
                                            Vec4 end,
                                            double curvature)
Compute the position of control points that will generate a Bezier curve that looks like the Direction of Attack for Feint graphic in MIL-STD-2525C (pg. 499).

Parameters:
dc - Current draw context.
start - Beginning of the infiltration lane control line.
end - End of the infiltration lane control line.
curvature - Factor that controls the curvature of the line. Valid values are between zero and one. A higher value results in a more pronounced curve.
Returns:
Control points for a Bezier curve. The first control point is equal to start, and the last point is equal to end.

createLabels

protected void createLabels()
Overrides:
createLabels in class AbstractTacticalGraphic

createShapes

protected void createShapes(DrawContext dc)
Create the list of positions that describe the arrow.

Overrides:
createShapes in class DirectionOfAttack
Parameters:
dc - Current draw context.

determineActiveAttributes

protected void determineActiveAttributes()
Determine active attributes for this frame.

Overrides:
determineActiveAttributes in class AbstractTacticalGraphic

determineLabelPositions

protected void determineLabelPositions(DrawContext dc)
Description copied from class: AbstractTacticalGraphic
Determine positions for the start and end labels.

Overrides:
determineLabelPositions in class AbstractTacticalGraphic
Parameters:
dc - Current draw context.

getCurvature

public double getCurvature()
Indicates a factor that determines the curvature of the line. Valid values are zero to one. A large value results in a more pronounced curve.

Returns:
The factor that determines the curvature of the line.

getDefaultLabelOffset

protected Offset getDefaultLabelOffset()
Indicates the default offset applied to the graphic's main label. This offset may be overridden by the graphic attributes.

Overrides:
getDefaultLabelOffset in class AbstractTacticalGraphic
Returns:
Offset to apply to the main label.

getIntervals

public int getIntervals()
Indicates the number of intervals used to draw the curve in this graphic. More intervals results in a smoother curve.

Returns:
Intervals used to draw arc.

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.

onShapeChanged

protected void onShapeChanged()

setCurvature

public void setCurvature(double factor)
Specifies a factor that determines the curvature of the line. Valid values are zero to one. A large value results in a more pronounced curve.

Parameters:
factor - The factor that determines the curvature of the line.

setIntervals

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

Parameters:
intervals - Number of intervals for drawing the curve. Must at least three.

NASA World Wind