Class SectorGeometryList

    • Field Summary

      Fields 
      Modifier and Type Field Description
      protected java.util.HashMap<SectorGeometry,​java.util.ArrayList<java.awt.Point>> pickSectors  
      protected PickSupport pickSupport  
      protected Sector sector
      The spanning sector of all sector geometries contained in this list.
      • Fields inherited from class java.util.AbstractList

        modCount
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void beginRendering​(DrawContext dc)
      Indicates that this list's sectors are about to be rendered.
      protected void beginSectorGeometryPicking​(DrawContext dc)
      Indicates that sector geometry picking is about to be performed.
      void endRendering​(DrawContext dc)
      protected void endSectorGeometryPicking​(DrawContext dc)
      Sector getSector()
      Indicates the spanning sector of all sector geometries in this list.
      Vec4 getSurfacePoint​(Angle latitude, Angle longitude)
      Computes a Cartesian point at a specified location on the terrain.
      Vec4 getSurfacePoint​(Angle latitude, Angle longitude, double metersOffset)
      Computes a Cartesian point at a specified latitude, longitude and altitude above the terrain.
      Vec4 getSurfacePoint​(LatLon latLon)
      Computes a Cartesian point at a specified location on the terrain.
      Vec4 getSurfacePoint​(Position position)
      Computes a Cartesian point at a specified latitude, longitude and altitude above the terrain.
      Intersection[] intersect​(double elevation, Sector sector)
      Determines if and where the geometry intersects the ellipsoid at a given elevation.
      Intersection[] intersect​(Line line)
      Determines if and where a ray intersects the geometry.
      void pick​(DrawContext dc, java.awt.Point pickPoint)
      Detects the locations of the sector geometries in this list that intersect a specified screen point.
      java.util.List<PickedObject> pick​(DrawContext dc, java.util.List<java.awt.Point> pickPoints)
      Detects the locations of the sector geometries in this list that intersect any of the points in a specified list of screen points.
      void setSector​(Sector sector)
      Specifies the sector this list spans.
      • Methods inherited from class java.util.ArrayList

        add, add, addAll, addAll, clear, clone, contains, ensureCapacity, equals, forEach, get, hashCode, indexOf, isEmpty, iterator, lastIndexOf, listIterator, listIterator, remove, remove, removeAll, removeIf, removeRange, replaceAll, retainAll, set, size, sort, spliterator, subList, toArray, toArray, trimToSize
      • Methods inherited from class java.util.AbstractCollection

        containsAll, toString
      • Methods inherited from class java.lang.Object

        getClass, notify, notifyAll, wait, wait, wait
      • Methods inherited from interface java.util.Collection

        parallelStream, stream, toArray
      • Methods inherited from interface java.util.List

        containsAll
    • Field Detail

      • sector

        protected Sector sector
        The spanning sector of all sector geometries contained in this list.
      • pickSectors

        protected java.util.HashMap<SectorGeometry,​java.util.ArrayList<java.awt.Point>> pickSectors
    • Constructor Detail

      • SectorGeometryList

        public SectorGeometryList()
        Constructs an empty sector geometry list.
      • SectorGeometryList

        public SectorGeometryList​(SectorGeometryList list)
        Constructs a sector geometry list that contains a specified list of sector geometries.
        Parameters:
        list - the secter geometries to place in the list.
    • Method Detail

      • getSector

        public Sector getSector()
        Indicates the spanning sector of all sector geometries in this list.
        Returns:
        a sector that is the union of all sectors of entries in this list.
      • setSector

        public void setSector​(Sector sector)
        Specifies the sector this list spans.
        Parameters:
        sector - the sector spanned by this list.
      • pick

        public void pick​(DrawContext dc,
                         java.awt.Point pickPoint)
        Detects the locations of the sector geometries in this list that intersect a specified screen point.

        Note: Prior to calling this method, beginRendering(gov.nasa.worldwind.render.DrawContext) must be called.

        Parameters:
        dc - the current draw context.
        pickPoint - the screen point to test.
      • pick

        public java.util.List<PickedObject> pick​(DrawContext dc,
                                                 java.util.List<java.awt.Point> pickPoints)
        Detects the locations of the sector geometries in this list that intersect any of the points in a specified list of screen points.

        Note: Prior to calling this method, beginRendering(gov.nasa.worldwind.render.DrawContext) must be called.

        Parameters:
        dc - the current draw context.
        pickPoints - the points to test.
        Returns:
        an array of picked objects that intersect one or more of the specified screen points.
      • beginSectorGeometryPicking

        protected void beginSectorGeometryPicking​(DrawContext dc)
        Indicates that sector geometry picking is about to be performed. Configures the state necessary to correctly draw sector geometry in a second pass using unique per-triangle colors. When picking is complete, endSectorGeometryPicking(gov.nasa.worldwind.render.DrawContext) must be called.
        Parameters:
        dc - the current draw context.
      • getSurfacePoint

        public Vec4 getSurfacePoint​(Position position)
        Computes a Cartesian point at a specified latitude, longitude and altitude above the terrain.
        Parameters:
        position - the position to compute the Cartesian point for. The altitude element of the position is considered to be distance above the terrain at the position's latitude and longitude.
        Returns:
        the Cartesian point, in meters, relative to an origin of (0, 0, 0). Will be null if there is no sector geometry in this list for the specifed latitude and longitude.
      • getSurfacePoint

        public Vec4 getSurfacePoint​(LatLon latLon)
        Computes a Cartesian point at a specified location on the terrain.
        Parameters:
        latLon - the location of the point to compute.
        Returns:
        the Cartesian point, in meters, relative to an origin of (0, 0, 0). Will be null if there is no sector geometry in this list for the specifed latitude and longitude.
      • getSurfacePoint

        public Vec4 getSurfacePoint​(Angle latitude,
                                    Angle longitude)
        Computes a Cartesian point at a specified location on the terrain.
        Parameters:
        latitude - the latitude of the point to compute.
        longitude - the longitude of the point to compute.
        Returns:
        the Cartesian point, in meters, relative to an origin of (0, 0, 0). Will be null if there is no sector geometry in this list for the specifed latitude and longitude.
      • getSurfacePoint

        public Vec4 getSurfacePoint​(Angle latitude,
                                    Angle longitude,
                                    double metersOffset)
        Computes a Cartesian point at a specified latitude, longitude and altitude above the terrain.
        Parameters:
        latitude - the latitude of the point to compute.
        longitude - the longitude of the point to compute.
        metersOffset - the distance above the terrain of the point to compute.
        Returns:
        the Cartesian point, in meters, relative to an origin of (0, 0, 0). Will be null if there is no sector geometry in this list for the specifed latitude and longitude.
      • intersect

        public Intersection[] intersect​(Line line)
        Determines if and where a ray intersects the geometry.
        Parameters:
        line - the Line for which an intersection is to be found.
        Returns:
        the <Vec4> point closest to the ray origin where an intersection has been found or null if no intersection was found.
      • intersect

        public Intersection[] intersect​(double elevation,
                                        Sector sector)
        Determines if and where the geometry intersects the ellipsoid at a given elevation.

        The returned array of Intersection describes a list of individual segments - two Intersection for each, corresponding to each geometry triangle that intersects the given elevation.

        Note that the provided bounding Sector only serves as a 'hint' to avoid processing unnecessary geometry tiles. The returned intersection list may contain segments outside that sector.

        Parameters:
        elevation - the elevation for which intersections are to be found.
        sector - the sector inside which intersections are to be found.
        Returns:
        a list of Intersection pairs/segments describing a contour line at the given elevation.