Class Box

    • Field Detail

      • DEFAULT_CENTER_LINE_STIPPLE_FACTOR

        protected static final int DEFAULT_CENTER_LINE_STIPPLE_FACTOR
        See Also:
        Constant Field Values
      • DEFAULT_CENTER_LINE_STIPPLE_PATTERN

        protected static final short DEFAULT_CENTER_LINE_STIPPLE_PATTERN
        See Also:
        Constant Field Values
      • DEFAULT_CENTER_LINE_OFFSET

        protected static final double DEFAULT_CENTER_LINE_OFFSET
        See Also:
        Constant Field Values
    • Constructor Detail

      • Box

        public Box​(LatLon beginLocation,
                   LatLon endLocation,
                   double leftWidth,
                   double rightWidth)
      • Box

        public Box​(Box source)
      • Box

        public Box()
    • Method Detail

      • getLocations

        public LatLon[] getLocations()
      • setLocations

        public void setLocations​(LatLon beginLocation,
                                 LatLon endLocation)
        Sets the leg's locations, in geographic coordinates.
        Parameters:
        beginLocation - geographic coordinates(latitude and longitude) specifying the center of the begining edge.
        endLocation - geographic coordinates(latitude and longitude) specifying the center of the ending edge.
        Throws:
        java.lang.IllegalArgumentException - if location1 or location2 is null
      • getWidths

        public double[] getWidths()
      • setWidths

        public void setWidths​(double leftWidth,
                              double rightWidth)
      • getCornerAzimuths

        public Angle[] getCornerAzimuths()
        Indicates the azimuth angles for this box's four corners, relative to geographic north. Angles are organized in the returned array as follows: begin left, begin right, end left, end right. Null elements in any index indicate that the default angle is used.
        Returns:
        an array of length four indicating this box's corner azimuths.
      • setCornerAzimuths

        public void setCornerAzimuths​(Angle beginLeftAzimuth,
                                      Angle beginRightAzimuth,
                                      Angle endLeftAzimuth,
                                      Angle endRightAzimuth)
        Specifies the azimuth angles for this box's four corners, relative to geographic north. Specifying a null argument indicates that the default angle should be used.
        Parameters:
        beginLeftAzimuth - Beginning left corner azimuth.
        beginRightAzimuth - Beginning right corner azimuth.
        endLeftAzimuth - Ending left corner azimuth.
        endRightAzimuth - Ending right corner azimuth.
      • isEnableCaps

        public boolean[] isEnableCaps()
      • setEnableCaps

        public void setEnableCaps​(boolean enableStartCap,
                                  boolean enableEndCap)
      • setEnableCaps

        public void setEnableCaps​(boolean enable)
      • setEnableStartCap

        public void setEnableStartCap​(boolean enable)
      • setEnableEndCap

        public void setEnableEndCap​(boolean enable)
      • isEnableCenterLine

        public boolean isEnableCenterLine()
      • setEnableCenterLine

        public void setEnableCenterLine​(boolean enable)
      • getReferencePosition

        public Position getReferencePosition()
        Description copied from interface: Movable
        A position associated with the object that indicates its aggregate geographic position. The chosen position varies among implementers of this interface. For objects defined by a list of positions, the reference position is typically the first position in the list. For symmetric objects the reference position is often the center of the object. In many cases the object's reference position may be explicitly specified by the application.
        Returns:
        the object's reference position, or null if no reference position is available.
      • invalidateGeometry

        protected void invalidateGeometry()
      • regenerateSurfaceShape

        protected void regenerateSurfaceShape​(DrawContext dc,
                                              SurfaceShape shape)
        Description copied from class: AbstractAirspace
        Regenerates surface shape geometry prior to picking and rendering the 2D shape used to represent this Airspace on 2D globes.
        Overrides:
        regenerateSurfaceShape in class AbstractAirspace
        Parameters:
        dc - the current drawing context.
        shape - the surface shape to regenerate.
      • isForceCullFace

        protected boolean isForceCullFace()
      • setForceCullFace

        protected void setForceCullFace​(boolean forceCullFace)
      • getPillars

        protected int getPillars()
      • setPillars

        protected void setPillars​(int pillars)
      • getStacks

        protected int getStacks()
      • setStacks

        protected void setStacks​(int stacks)
      • getHeightStacks

        protected int getHeightStacks()
      • computeReferenceCenter

        protected Vec4 computeReferenceCenter​(DrawContext dc)
      • applyCenterLineState

        protected void applyCenterLineState​(DrawContext dc)