Class TrackAirspace

    • Field Detail

      • legs

        protected java.util.List<Box> legs
      • legsOutOfDate

        protected boolean legsOutOfDate
      • enableInnerCaps

        protected boolean enableInnerCaps
      • enableCenterLine

        protected boolean enableCenterLine
      • smallAngleThreshold

        protected Angle smallAngleThreshold
        Denotes the the threshold that defines whether the angle between two adjacent legs is small. Initially 22.5 degrees.
    • Constructor Detail

      • TrackAirspace

        public TrackAirspace​(java.util.Collection<Box> legs)
      • TrackAirspace

        public TrackAirspace()
    • Method Detail

      • getLegs

        public java.util.List<Box> getLegs()
      • setLegs

        public void setLegs​(java.util.Collection<Box> legs)
      • addLegs

        protected void addLegs​(java.lang.Iterable<Box> newLegs)
      • addLeg

        public Box addLeg​(LatLon start,
                          LatLon end,
                          double lowerAltitude,
                          double upperAltitude,
                          double leftWidth,
                          double rightWidth)
      • addLeg

        protected void addLeg​(Box leg)
      • removeAllLegs

        public void removeAllLegs()
      • isEnableInnerCaps

        public boolean isEnableInnerCaps()
      • setEnableInnerCaps

        public void setEnableInnerCaps​(boolean draw)
      • isEnableCenterLine

        public boolean isEnableCenterLine()
      • setEnableCenterLine

        public void setEnableCenterLine​(boolean enable)
      • setEnableDepthOffset

        public void setEnableDepthOffset​(boolean enable)
        Description copied from class: AbstractAirspace
        Specifies whether the filled sides of this shape should be offset towards the viewer to help eliminate artifacts when two or more faces of this or other filled shapes are coincident.
        Specified by:
        setEnableDepthOffset in interface Airspace
        Overrides:
        setEnableDepthOffset in class AbstractAirspace
        Parameters:
        enable - true if depth offset is applied, otherwise false.
      • getSmallAngleThreshold

        public Angle getSmallAngleThreshold()
        Desnotes the threshold that defines whether the angle between two adjacent legs is small. This threshold is used to determine the best method for adjusting the vertices of adjacent legs.
        Returns:
        the angle used to determine when the angle between two adjacent legs is small.
        See Also:
        setSmallAngleThreshold(gov.nasa.worldwind.geom.Angle)
      • setSmallAngleThreshold

        public void setSmallAngleThreshold​(Angle angle)
        Specifies the threshold that defines whether the angle between two adjacent legs is small. This threshold is used to determine the best method for adjusting the vertices of adjacent legs.

        When the angle between adjacent legs is small, the standard method of joining the leg's vertices forms a very large peak pointing away from the leg's common point. In this case TrackAirspace uses a method that avoids this peak and produces a seamless transition between the adjacent legs.

        Parameters:
        angle - the angle to use when determining when the angle between two adjacent legs is small.
        Throws:
        java.lang.IllegalArgumentException - if angle is null.
        See Also:
        getSmallAngleThreshold()
      • setTerrainConforming

        public void setTerrainConforming​(boolean lowerTerrainConformant,
                                         boolean upperTerrainConformant)
        Description copied from interface: Airspace
        Sets the altitude datum, which indicates whether airspace altitudes are relative to mean sea level, ground level or a single ground reference location. The datum is normally set via Airspace.setAltitudeDatum(String, String), but this method is provided for backwards compatibility with the means of originally setting the datum. See the argument descriptions below for the mapping of the boolean values of this method to the altitude-datum values.
        Specified by:
        setTerrainConforming in interface Airspace
        Overrides:
        setTerrainConforming in class AbstractAirspace
        Parameters:
        lowerTerrainConformant - the lower altitude datum. A value of true indicates a lower altitude datum of AVKey.ABOVE_GROUND_LEVEL (terrain conforming), a value of false indicates a lower altitude datum of {link AVKey#ABOVE_MEAN_SEA_LEVEL} (not terrain conforming). the terrain-conforming, a value of false indicates that it's not.
        upperTerrainConformant - the upper altitude datum. A value of true indicates an upper altitude datum of AVKey.ABOVE_GROUND_LEVEL (terrain conforming), a value of false indicates an upper altitude datum of {link AVKey#ABOVE_MEAN_SEA_LEVEL} (not terrain conforming. the terrain-conforming, a value of false indicates that it's not.
        See Also:
        Airspace.setAltitudeDatum(String, String)
      • setAlwaysOnTop

        public void setAlwaysOnTop​(boolean alwaysOnTop)
        Description copied from interface: Airspace
        Specifies whether this airspace should have visual priority over other displayed shapes in 3D mode. If true, this shape is drawn after all others. This property is ignored by Cake airspaces.
        Specified by:
        setAlwaysOnTop in interface Airspace
        Overrides:
        setAlwaysOnTop in class AbstractAirspace
        Parameters:
        alwaysOnTop - if true, this airspace is drawn after all others. Otherwise this airspace is drawn with its normal priority, which is its relative distance to the eye point.
      • setDrawSurfaceShape

        public void setDrawSurfaceShape​(boolean drawSurfaceShape)
        Description copied from interface: Airspace
        Specifies whether this airspace should be drawn flat and on the surface, ignoring any altitude information specified in the shape.
        Specified by:
        setDrawSurfaceShape in interface Airspace
        Overrides:
        setDrawSurfaceShape in class AbstractAirspace
        Parameters:
        drawSurfaceShape - true if this shape is drawn flat and on the surface, otherwise false.
      • isAirspaceVisible

        public boolean isAirspaceVisible​(DrawContext dc)
        Description copied from class: AbstractAirspace
        Test if this airspace is visible in the specified draw context. During picking mode, this tests intersection against all of the draw context's pick frustums. During rendering mode, this tests intersection against the draw context's viewing frustum.
        Specified by:
        isAirspaceVisible in interface Airspace
        Overrides:
        isAirspaceVisible in class AbstractAirspace
        Parameters:
        dc - the draw context the airspace is related to.
        Returns:
        true if this airspace is visible; false otherwise.
      • 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.
      • isLegsOutOfDate

        protected boolean isLegsOutOfDate()
      • setLegsOutOfDate

        protected void setLegsOutOfDate​(boolean tf)
      • doUpdateLegs

        protected void doUpdateLegs()
      • mustJoinLegs

        protected boolean mustJoinLegs​(Box leg1,
                                       Box leg2)
        Specifies whether the legs must have their adjacent edges joined. leg1 must precede leg2. A track's legs must be joined when two adjacent legs share a common location. In this case, the geometry of the two adjacent boxes contains a gap on one side and an intersection on the other. Joining the legs modifies the edges of each leg at their common location to produce a seamless transition from the first leg to the second.
        Parameters:
        leg1 - the first leg.
        leg2 - the second leg.
        Returns:
        true if the legs must be joined, otherwise false.
      • joinLegs

        protected void joinLegs​(Box leg1,
                                Box leg2)
        Modifies the adjacent edges of the specified adjacent legs to produce a seamless transition from the first leg to the second. leg1 must precede leg2, and they must share a common location at the end of leg1 and the beginning of leg2. Without joining the adjacent edges, the geometry of the two adjacent boxes contains a gap on one side and an intersection on the other.

        This has no effect if the legs cannot be joined for any reason.

        Parameters:
        leg1 - the first leg.
        leg2 - the second leg.