Class LineOfContact

    • Field Detail

      • path2

        protected Path path2
        Line of Contact is drawn with two paths. The super class manages the first path; this is the second.
    • Constructor Detail

      • LineOfContact

        public LineOfContact​(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.
      • 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 ForwardLineOfOwnTroops
        Parameters:
        position - the new position of the shape's reference position.
      • generateIntermediatePositions

        protected void generateIntermediatePositions​(DrawContext dc,
                                                     java.lang.Iterable<? extends Position> positions)
        Generate the positions required to draw the line.
        Overrides:
        generateIntermediatePositions in class ForwardLineOfOwnTroops
        Parameters:
        dc - Current draw context.
        positions - Positions that define the polygon boundary.
      • generateParallelLines

        public void generateParallelLines​(java.util.Iterator<? extends Position> iterator,
                                          java.util.List<Position> leftPositions,
                                          java.util.List<Position> rightPositions,
                                          double halfWidth,
                                          Globe globe)
        Create positions that describe lines parallel to a control line.
        Parameters:
        iterator - Iterator of control line positions.
        leftPositions - List to collect positions on the left line.
        rightPositions - List to collect positions on the right line.
        halfWidth - Distance from the center line to the left or right lines.
        globe - Current globe.
      • generateParallelPoints

        protected void generateParallelPoints​(Vec4 point,
                                              Vec4 prev,
                                              Vec4 next,
                                              java.util.List<Position> leftPositions,
                                              java.util.List<Position> rightPositions,
                                              double halfWidth,
                                              Globe globe)
        Compute points on either side of a line segment. This method requires a point on the line, and either a next point, previous point, or both.
        Parameters:
        point - Center point about which to compute side points.
        prev - Previous point on the line. May be null if next is non-null.
        next - Next point on the line. May be null if prev is non-null.
        leftPositions - Left position will be added to this list.
        rightPositions - Right position will be added to this list.
        halfWidth - Distance from the center line to the left or right lines.
        globe - Current globe.