Class PolygonPainter

  • All Implemented Interfaces:
    GlimpsePainter

    public class PolygonPainter
    extends GlimpsePainterBase
    Paints large collections of arbitrary polygons (including concave polygons). Polygons can have timestamps associated with them, and can be efficiently filtered by time (only drawing those polygons which fall within a particular time window.
    Author:
    ulman
    • Constructor Detail

      • PolygonPainter

        public PolygonPainter()
    • Method Detail

      • addPolygon

        public void addPolygon​(Object groupId,
                               Object polygonId,
                               float[] dataX,
                               float[] dataY,
                               float z)
      • addPolygon

        public void addPolygon​(Object groupId,
                               Object polygonId,
                               Polygon geometry,
                               float z)
      • addPolygon

        public void addPolygon​(Object groupId,
                               Object polygonId,
                               Shape shape,
                               float z)
      • addPolygon

        public void addPolygon​(Object groupId,
                               Object polygonId,
                               long startTime,
                               long endTime,
                               float[] dataX,
                               float[] dataY,
                               float z)
      • addPolygon

        public void addPolygon​(Object groupId,
                               Object polygonId,
                               long startTime,
                               long endTime,
                               Polygon geometry,
                               float z)
      • addPolygon

        public void addPolygon​(Object groupId,
                               Object polygonId,
                               long startTime,
                               long endTime,
                               Shape shape,
                               float z)
      • displayTimeRange

        public void displayTimeRange​(Object groupId,
                                     double startTime,
                                     double endTime)
      • displayTimeRange

        public void displayTimeRange​(double startTime,
                                     double endTime)
      • displayTimeRange

        public void displayTimeRange​(int groupId,
                                     long startTime,
                                     long endTime)
      • displayTimeRange

        public void displayTimeRange​(long startTime,
                                     long endTime)
      • setLineColor

        public void setLineColor​(Object groupId,
                                 float[] rgba)
      • setLineColor

        public void setLineColor​(Object groupId,
                                 float r,
                                 float g,
                                 float b,
                                 float a)
      • setLineWidth

        public void setLineWidth​(Object groupId,
                                 float width)
      • setShowLines

        public void setShowLines​(Object groupId,
                                 boolean show)
      • setPolyDotted

        public void setPolyDotted​(Object groupId,
                                  byte[] stipple)
      • setPolyDotted

        public void setPolyDotted​(Object groupId,
                                  boolean dotted)
      • setLineDotted

        public void setLineDotted​(Object groupId,
                                  boolean dotted)
      • setLineDotted

        public void setLineDotted​(Object groupId,
                                  int stippleFactor,
                                  short stipplePattern)
      • setFill

        public void setFill​(Object groupId,
                            boolean show)
      • setFillColor

        public void setFillColor​(Object groupId,
                                 float[] rgba)
      • setFillColor

        public void setFillColor​(Object groupId,
                                 float r,
                                 float g,
                                 float b,
                                 float a)
      • setLineStyle

        public void setLineStyle​(Object groupId,
                                 LineStyle style)
      • deleteAll

        public void deleteAll()
        Deletes all Polygon groups, removing their display settings and reclaiming memory.
      • deleteGroup

        public void deleteGroup​(Object groupId)
        Deletes an individual Polygon group, removing its display settings and reclaiming memory.
        Parameters:
        groupId - the id of the group to delete
      • clearGroup

        public void clearGroup​(Object groupId)
        Clears an individual Polygon group, deleting all the polygons its contains but retaining its display settings.
        Parameters:
        groupId - the id of the group to clear
      • deletePolygon

        public void deletePolygon​(Object groupId,
                                  Object polygonId)
      • buildPolygon

        public static Polygon buildPolygon​(float[] geometryX,
                                           float[] geometryY)
      • buildPolygon

        public static Polygon buildPolygon​(Shape shape)