Class Polygon

    • Field Detail

      • MINIMAL_GEOMETRY_SUBDIVISIONS

        protected static final int MINIMAL_GEOMETRY_SUBDIVISIONS
        See Also:
        Constant Field Values
    • Constructor Detail

      • Polygon

        public Polygon​(Polygon source)
      • Polygon

        public Polygon​(java.lang.Iterable<? extends LatLon> locations)
      • Polygon

        public Polygon()
    • Method Detail

      • getLocations

        public java.util.List<LatLon> getLocations()
      • setLocations

        public void setLocations​(java.lang.Iterable<? extends LatLon> locations)
      • getLocationList

        protected java.util.List<LatLon> getLocationList()
      • addLocations

        protected void addLocations​(java.lang.Iterable<? extends LatLon> newLocations)
      • isEnableCaps

        public boolean isEnableCaps()
      • setEnableCaps

        public void setEnableCaps​(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.
      • updateSurfaceShape

        protected void updateSurfaceShape​(DrawContext dc,
                                          SurfaceShape shape)
        Description copied from class: AbstractAirspace
        Sets surface shape parameters prior to picking and rendering the 2D shape used to represent this Airspace on 2D globes. Subclasses should override this method if they need to update more than the attributes and the delegate owner.
        Overrides:
        updateSurfaceShape in class AbstractAirspace
        Parameters:
        dc - the current drawing context.
        shape - the surface shape to update.
      • 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.
      • getSubdivisions

        protected int getSubdivisions()
      • setSubdivisions

        protected void setSubdivisions​(int subdivisions)
      • computeReferenceCenter

        protected Vec4 computeReferenceCenter​(DrawContext dc)
      • doRenderGeometry

        protected void doRenderGeometry​(DrawContext dc,
                                        java.lang.String drawStyle,
                                        java.util.List<LatLon> locations,
                                        java.util.List<java.lang.Boolean> edgeFlags)
      • adjustForGroundReference

        protected void adjustForGroundReference​(DrawContext dc,
                                                boolean[] terrainConformant,
                                                double[] altitudes)
      • computeEllipsoidalPolygon

        protected int computeEllipsoidalPolygon​(Globe globe,
                                                java.util.List<? extends LatLon> locations,
                                                java.util.List<java.lang.Boolean> edgeFlags,
                                                Vec4[] points,
                                                java.lang.Boolean[] edgeFlagArray,
                                                Matrix[] transform)
      • handleUnsuccessfulGeometryCreation

        protected void handleUnsuccessfulGeometryCreation()
      • makeTessellatedLocations

        protected void makeTessellatedLocations​(Globe globe,
                                                int subdivisions,
                                                java.util.List<LatLon> locations,
                                                java.util.List<LatLon> tessellatedLocations)