Class ForwardLineOfOwnTroops

    • Field Detail

      • DEFAULT_NUM_WAVES

        public static final int DEFAULT_NUM_WAVES
        Default number of wave lengths for a simple shape. This number is used to compute a default wave length.
        See Also:
        Constant Field Values
      • DEFAULT_NUM_INTERVALS

        public static final int DEFAULT_NUM_INTERVALS
        Default number of intervals used to draw the arcs.
        See Also:
        Constant Field Values
      • positions

        protected java.lang.Iterable<? extends Position> positions
        Original positions specified by the application.
      • computedPositions

        protected java.util.List<Position> computedPositions
        Positions computed from the original positions. This list includes the positions necessary to draw the triangle wave.
      • waveLength

        protected double waveLength
        Indicates wave length (in meters) of the semicircle wave along the graphic boundary.
      • intervals

        protected int intervals
        Number of intervals used to draw the arcs along the line.
    • Constructor Detail

      • ForwardLineOfOwnTroops

        public ForwardLineOfOwnTroops​(java.lang.String sidc)
        Create a new graphic.
        Parameters:
        sidc - MIL-STD-2525C identifier code.
    • 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.
      • setPositions

        public void setPositions​(java.lang.Iterable<? extends Position> positions)
        Specifies the positions of the control points that place and orient the graphic.
        Specified by:
        setPositions in interface TacticalGraphic
        Overrides:
        setPositions in class PhaseLine
        Parameters:
        positions - Positions that orient the graphic. How many positions are returned depends on the type of graphic. Some graphics require only a single position, others require many. The positions must be specified in the same order as the control points defined by the symbology set's template for this type of graphic.
      • getPositions

        public java.lang.Iterable<? extends Position> getPositions()
        Indicates the positions of the control points that place and orient the graphic.
        Specified by:
        getPositions in interface TacticalGraphic
        Overrides:
        getPositions in class PhaseLine
        Returns:
        positions that orient the graphic. How many positions are returned depends on the type of graphic. Some graphics require only a single position, others require many.
      • getWaveLength

        public double getWaveLength()
        Indicates the wavelength of the semicircle wave that forms the graphic's boundary. This is the length from the start of one "tooth" to the start of the next. If not wave length is specified a default wave length will be computed.
         /\/\/\/\/\
         ^ ^
         Wavelength
         
        Returns:
        The wave length, in meters.
      • setWaveLength

        public void setWaveLength​(int waveLength)
        Specifies the wavelength of the triangle wave that forms the graphic's boundary. See getWaveLength() for more information on how this distance is interpreted.
        Parameters:
        waveLength - The wavelength, in meters.
      • getIntervals

        public int getIntervals()
        Indicates the number of intervals used to draw the arc in this graphic.
        Returns:
        Intervals used to draw arc.
      • setIntervals

        public void setIntervals​(int intervals)
        Specifies the number of intervals used to draw the arc in this graphic. More intervals will result in a smoother looking arc.
        Parameters:
        intervals - Number of intervals for drawing the arc.
      • 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 AbstractTacticalGraphic
        Parameters:
        position - the new position of the shape's reference position.
      • onShapeChanged

        protected void onShapeChanged()
      • generateIntermediatePositions

        protected void generateIntermediatePositions​(DrawContext dc,
                                                     java.lang.Iterable<? extends Position> positions)
        Generate the positions required to draw the polygon with a triangle wave boundary.
        Parameters:
        dc - Current draw context.
        positions - Positions that define the polygon boundary.
      • generateWavePositions

        protected java.util.List<Position> generateWavePositions​(java.util.Iterator<? extends Position> iterator,
                                                                 double radius,
                                                                 boolean reverse)
      • computeDefaultWavelength

        protected double computeDefaultWavelength​(java.lang.Iterable<? extends Position> positions,
                                                  Globe globe)
      • computeGreatCirclePathLength

        protected Angle computeGreatCirclePathLength​(java.lang.Iterable<? extends Position> positions)