Class SurfacePolylines

    • Field Detail

      • sectors

        protected java.util.List<Sector> sectors
      • needsOutlineTessellation

        protected boolean needsOutlineTessellation
      • crossesDateLine

        protected boolean crossesDateLine
      • outlineDisplayListCacheKey

        protected java.lang.Object outlineDisplayListCacheKey
    • Method Detail

      • getSectors

        public java.util.List<Sector> getSectors​(DrawContext dc)
        Description copied from interface: SurfaceRenderable
        Returns a list of sectors indicating the geographic region that bounds this renderable for the specified draw context.

        The returned list typically contains one sector that bounds this renderable in geographic coordinates. When this renderable spans the anti-meridian - the +/- 180 degree meridian - the returned list contains two sectors, one on either side of the anti-meridian.

        Specified by:
        getSectors in interface SurfaceRenderable
        Overrides:
        getSectors in class AbstractSurfaceShape
        Parameters:
        dc - the draw context for which to determine this renderable's geographic bounds.
        Returns:
        a list of one or two sectors that bound this renderable.
      • getLocations

        public java.lang.Iterable<? extends LatLon> getLocations​(Globe globe)
        Description copied from interface: SurfaceShape
        Returns the shape's locations as they appear on the specified globe, or null if the shape has no locations.
        Parameters:
        globe - the globe the shape is related to.
        Returns:
        the shapes locations on the globe, or null if the shape has no locations.
      • getLocations

        public java.lang.Iterable<? extends LatLon> getLocations()
      • setLocations

        public void setLocations​(java.lang.Iterable<? extends LatLon> iterable)
      • 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.
        Specified by:
        getReferencePosition in interface Movable
        Specified by:
        getReferencePosition in interface Movable2
        Specified by:
        getReferencePosition in class AbstractSurfaceShape
        Returns:
        the object's reference position, or null if no reference position is available.
      • canContainPole

        protected boolean canContainPole()
        Indicates whether the shape is a closed polygon that can enclose a pole, or an open path that cannot. This makes a difference when computing the bounding sector for a shape. For example, consider the positions (-100, 85), (0, 80), (100, 80). If these positions are treated as a closed polygon (a triangle over the North Pole) then the bounding sector is 80 to 90 lat, -180 to 180 lon. But if they are treated as an open path (a line wrapping partway around the pole) then the bounding sector is 80 to 85 lat, -100 to 100 lon. Overridden to treat the polylines as open paths rather than closed polygons.
        Overrides:
        canContainPole in class AbstractSurfaceShape
        Returns:
        True if the shape is a closed polygon that can contain a pole, or false if it is treated as an open path that cannot contain a pole.
      • onGeometryChanged

        protected void onGeometryChanged()
      • tessellateOutline

        protected int[] tessellateOutline​(DrawContext dc,
                                          LatLon referenceLocation)
      • tessellatePart

        protected boolean tessellatePart​(com.jogamp.opengl.GL2 gl,
                                         VecBuffer vecBuffer,
                                         LatLon referenceLocation)