Class FortifiedArea

    • 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
      • 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 square wave.
      • waveLength

        protected double waveLength
        Indicates the wavelength of the square wave that forms the graphic's border.
    • Constructor Detail

      • FortifiedArea

        public FortifiedArea​(java.lang.String sidc)
    • 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 BasicArea
        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 BasicArea
        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.
      • 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.
      • getWaveLength

        public double getWaveLength()
        Indicates the wavelength of the square wave that forms the graphic's boundary. This is the length from the start of one square "tooth" to the start of the next.
            __    __
         __|  |__|  |__
           ^     ^
           Wavelength
         
        Returns:
        The wave length, in meters.
      • setWaveLength

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

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

        protected double computeDefaultWavelength​(Globe globe)
        Compute a default tooth size for the polygon. This method computes the default wavelength as a function of the size of the polygon and the number of vertices. As the polygon gets bigger the wavelength will increase, but as the number of the vertices increases the wavelength will decrease to prevent the waves from obscuring the shape of the polygon.
        Parameters:
        globe - Globe on which the area will be rendered.
        Returns:
        The wave length.