Interface Airspace

    • Method Detail

      • isVisible

        boolean isVisible()
      • setVisible

        void setVisible​(boolean visible)
      • setHighlightAttributes

        void setHighlightAttributes​(AirspaceAttributes highlightAttrs)
        Specifies this shape's highlight attributes.
        Parameters:
        highlightAttrs - the highlight attributes. May be null, in which case default attributes are used.
      • isTerrainConforming

        boolean[] isTerrainConforming()
        Returns the old-style indicators of the airspace's lower and upper surface datums.
        Returns:
        the lower and upper surface datums.
      • setTerrainConforming

        void setTerrainConforming​(boolean lowerTerrainConformant,
                                  boolean upperTerrainConformant)
        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 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.
        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:
        setAltitudeDatum(String, String)
      • isAlwaysOnTop

        boolean isAlwaysOnTop()
        Indicates the state of this airspace's always-on-top flag.
        Returns:
        the state of this airspace's always-on-top flag.
        See Also:
        isAlwaysOnTop()
      • setAlwaysOnTop

        void setAlwaysOnTop​(boolean alwaysOnTop)
        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.
        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.
      • isDrawSurfaceShape

        boolean isDrawSurfaceShape()
        Indicates whether this surface shape is always drawn flat and on the surface.
        Returns:
        true if this shape is drawn flat and on the surface, otherwise false.
      • setDrawSurfaceShape

        void setDrawSurfaceShape​(boolean drawSurfaceShape)
        Specifies whether this airspace should be drawn flat and on the surface, ignoring any altitude information specified in the shape.
        Parameters:
        drawSurfaceShape - true if this shape is drawn flat and on the surface, otherwise false.
      • setTerrainConforming

        void setTerrainConforming​(boolean terrainConformant)
        Sets the altitude datum for both the lower and upper airspace surface to the same specified value. The datum is normally set via setAltitudeDatum(String, String), but this method is provided for backwards compatibility with the means of originally setting the datum. See the argument descriptions for the mapping of the boolean values of this method to the altitude-datum values.
        Parameters:
        terrainConformant - the altitude datum. See setTerrainConforming(boolean, boolean) for a description of the possible values.
      • isEnableLevelOfDetail

        boolean isEnableLevelOfDetail()
      • setEnableLevelOfDetail

        void setEnableLevelOfDetail​(boolean enableLevelOfDetail)
      • getDetailLevels

        java.lang.Iterable<DetailLevel> getDetailLevels()
      • setDetailLevels

        void setDetailLevels​(java.util.Collection<DetailLevel> detailLevels)
      • isAirspaceVisible

        boolean isAirspaceVisible​(DrawContext dc)
        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.
        Parameters:
        dc - the draw context the airspace is related to.
        Returns:
        true if this airspace is visible; false otherwise.
      • getExtent

        Extent getExtent​(Globe globe,
                         double verticalExaggeration)
        Returns this Airspace's enclosing volume as an Extent in model coordinates, given a specified Globe and vertical exaggeration (see SceneController.getVerticalExaggeration().
        Specified by:
        getExtent in interface ExtentHolder
        Parameters:
        globe - the Globe this Airspace is related to.
        verticalExaggeration - the vertical exaggeration of the scene containing this Airspace.
        Returns:
        this Airspace's Extent in model coordinates.
        Throws:
        java.lang.IllegalArgumentException - if the Globe is null.
      • getExtent

        Extent getExtent​(DrawContext dc)
        Returns this Airspace's enclosing volume as an Extent in model coordinates, given a specified DrawContext. The returned Extent may be different than the Extent returned by calling getExtent(gov.nasa.worldwind.globes.Globe, double) with the DrawContext's Globe and vertical exaggeration. Additionally, this may cache the computed extent and is therefore potentially faster than calling getExtent(gov.nasa.worldwind.globes.Globe, double).
        Parameters:
        dc - the current DrawContext.
        Returns:
        this Airspace's Extent in model coordinates.
        Throws:
        java.lang.IllegalArgumentException - if the DrawContext is null, or if the Globe held by the DrawContext is null.
      • setAltitudeDatum

        void setAltitudeDatum​(java.lang.String lowerAltitudeDatum,
                              java.lang.String upperAltitudeDatum)
        Sets the altitude datum, which indicates whether airspace altitudes are relative to mean sea level, ground level or a single ground reference location.

        A value of AVKey.ABOVE_MEAN_SEA_LEVEL, the default for both lower and upper datums, indicates a datum of mean sea level. The respective lower or upper surface of the airspace is drawn at the constant altitude specified by setAltitude(double).

        A datum of AVKey.ABOVE_GROUND_LEVEL indicates that each position of the respective airspace surface is offset vertically from the altitude specified to setAltitude(double) by an amount equal to the terrain elevation at that position. For example, if the specified lower altitude is zero, the lower surface lies on and conforms to the terrain. If non-zero, the surface undulates in tandem with the terrain but relative to the specified altitude.

        A datum of AVKey.ABOVE_GROUND_REFERENCE combines both of the above datums. It indicates that the respective surface is drawn at the altitude specified to setAltitude(double) but offset vertically by an amount equal to the elevation at a single reference location on the ground. This is useful for displaying surfaces that are "flat" but are positioned relative to the ground. An example is the roof of a building, which maintains a constant altitude even as the base of its building may conform to varying terrain. One method of representing buildings is to specify a lower altitude of 0, a lower altitude datum of AVKey.ABOVE_GROUND_LEVEL, an upper altitude that's the building's height, and an upper altitude datum of AVKey.ABOVE_GROUND_REFERENCE, where the ground reference is a location at the building's base. The reference position is specifed by setGroundReference(LatLon).

        Parameters:
        lowerAltitudeDatum - the lower altitude datum.
        upperAltitudeDatum - the upper altitude datum
        Throws:
        java.lang.IllegalArgumentException - if either the lower or upper altitude datum is null.
        See Also:
        setGroundReference(gov.nasa.worldwind.geom.LatLon), setAltitudes(double, double)
      • getAltitudeDatum

        java.lang.String[] getAltitudeDatum()
        Returns the current altitude datum of the airspace's lower and upper surfaces.
        Returns:
        a two-element array containing at position 0 the lower altitude datum, and at position 1 the upper altitude datum.
        See Also:
        setAltitudeDatum(String, String)
      • setGroundReference

        void setGroundReference​(LatLon groundReference)
        Sets the reference location used to determine the elevation offset for airspace surfaces whose altitude datum is AVKey.ABOVE_GROUND_REFERENCE. The reference location is unused if the altitude datum is a value other than this.
        Parameters:
        groundReference - the location at which to compute the terrain elevation used to offset an upper or lower airspace surface. The location need not be within the airspace's bounds. If null, an airspace-specific position is chosen from those defining the airspace. See the method descriptions for the individual airspaces to determine the position used.
        See Also:
        setAltitudeDatum(String, String)
      • getGroundReference

        LatLon getGroundReference()
        Returns the current ground reference location.
        Returns:
        the current ground reference location.
      • isEnableBatchRendering

        boolean isEnableBatchRendering()
        Indicates whether batch rendering is enabled for the concrete shape type of this shape.
        Returns:
        true if batch rendering is enabled, otherwise false.
        See Also:
        setEnableBatchRendering(boolean)
      • setEnableBatchRendering

        void setEnableBatchRendering​(boolean enableBatchRendering)
        Specifies whether adjacent shapes of this shape's concrete type in the ordered renderable list may be rendered together if they are contained in the same layer. This increases performance. There is seldom a reason to disable it.
        Parameters:
        enableBatchRendering - true to enable batch rendering, otherwise false.
      • isEnableBatchPicking

        boolean isEnableBatchPicking()
        Indicates whether batch picking is enabled.
        Returns:
        true if batch rendering is enabled, otherwise false.
        See Also:
        setEnableBatchPicking(boolean)
      • setEnableBatchPicking

        void setEnableBatchPicking​(boolean enableBatchPicking)
        Specifies whether adjacent shapes of this shape's concrete type in the ordered renderable list may be pick-tested together if they are contained in the same layer. This increases performance but allows only the top-most of the polygons to be reported in a SelectEvent even if several of the polygons are at the pick position.

        Batch rendering (setEnableBatchRendering(boolean)) must be enabled in order for batch picking to occur.

        Parameters:
        enableBatchPicking - true to enable batch rendering, otherwise false.
      • isEnableDepthOffset

        boolean isEnableDepthOffset()
        Indicates 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.
        Returns:
        true if depth offset is applied, otherwise false.
      • setEnableDepthOffset

        void setEnableDepthOffset​(boolean enableDepthOffset)
        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.
        Parameters:
        enableDepthOffset - true if depth offset is applied, otherwise false.
      • getOutlinePickWidth

        int getOutlinePickWidth()
        Indicates the outline line width to use during picking. A larger width than normal typically makes the outline easier to pick.
        Returns:
        the outline line width used during picking.
      • setOutlinePickWidth

        void setOutlinePickWidth​(int outlinePickWidth)
        Specifies the outline line width to use during picking. A larger width than normal typically makes the outline easier to pick.

        Note that the size of the pick aperture also affects the precision necessary to pick.

        Parameters:
        outlinePickWidth - the outline pick width. The default is 10.
        Throws:
        java.lang.IllegalArgumentException - if the width is less than 0.
      • getDelegateOwner

        java.lang.Object getDelegateOwner()
      • setDelegateOwner

        void setDelegateOwner​(java.lang.Object delegateOwner)