Class DirectionOfAttackForFeint

    • 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 and labelPosition.
    • Constructor Detail

      • DirectionOfAttackForFeint

        public DirectionOfAttackForFeint​(java.lang.String sidc)
        Create a new arrow graphic.
        Parameters:
        sidc - Symbol code the identifies the graphic.
    • 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 class DirectionOfAttack
        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 class AbstractTacticalGraphic
        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 to end.