Class DirectionOfAttackForFeint
- 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.DirectionOfAttack
-
- gov.nasa.worldwind.symbology.milstd2525.graphics.lines.DirectionOfAttackForFeint
-
- All Implemented Interfaces:
AVList
,Draggable
,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
Fields Modifier and Type Field Description 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, dragEnabled, draggableSupport, frameTimestamp, highlightAttributes, highlighted, labelOffset, labels, modifiers, mustCreateLabels, normalAttributes, showGraphicModifiers, showHostileIndicator, showLocation, showTextModifiers, text, unitsFormat, visible
-
-
Constructor Summary
Constructors Constructor Description DirectionOfAttackForFeint(java.lang.String sidc)
Create a new arrow graphic.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description 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 java.util.List<java.lang.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, doDrag, doRenderGraphicModifiers, doRenderTextModifiers, drag, getActiveDelegateOwner, getActiveOverrideAttributes, getActiveShapeAttributes, getAttributes, getDelegateOwner, getHighlightAttributes, getLabelMaterial, getLabelOffset, getUnitsFormat, isDragEnabled, isHighlighted, isShowGraphicModifiers, isShowHostileIndicator, isShowLocation, isShowTextModifiers, isVisible, move, moveTo, 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
-
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.
-
DEFAULT_ARROWHEAD_ANGLE
public static final Angle DEFAULT_ARROWHEAD_ANGLE
Default angle of the arrowhead.
-
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
-
DEFAULT_NUM_INTERVALS
public static final int DEFAULT_NUM_INTERVALS
Default number of intervals used to draw the curve.- See Also:
- Constant Field Values
-
DEFAULT_CURVATURE
public static final double DEFAULT_CURVATURE
Default factor that determines the curvature of the line.- See Also:
- Constant Field Values
-
intervals
protected int intervals
Number of intervals used to draw the curve.
-
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.
-
dashedAttributes
protected ShapeAttributes dashedAttributes
Shape attributes for the dashed part of the graphic.
-
labelPosition
protected Position labelPosition
Position of the label along the curve.
-
labelOrientationPosition
protected Position labelOrientationPosition
Orientation position for the label. (The label is drawn on a line between this position andlabelPosition
.
-
-
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.
-
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.
-
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.
-
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.
-
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.
-
onShapeChanged
protected void onShapeChanged()
-
createShapes
protected void createShapes(DrawContext dc)
Create the list of positions that describe the arrow.- Overrides:
createShapes
in classDirectionOfAttack
- Parameters:
dc
- Current draw context.
-
determineActiveAttributes
protected void determineActiveAttributes()
Determine active attributes for this frame.- Overrides:
determineActiveAttributes
in classAbstractTacticalGraphic
-
createLabels
protected void createLabels()
- Overrides:
createLabels
in classAbstractTacticalGraphic
-
determineLabelPositions
protected void determineLabelPositions(DrawContext dc)
Description copied from class:AbstractTacticalGraphic
Determine positions for the start and end labels.- Overrides:
determineLabelPositions
in classAbstractTacticalGraphic
- Parameters:
dc
- Current draw context.
-
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 classAbstractTacticalGraphic
- Returns:
- Offset to apply to the main label.
-
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 toend
.
-
-