Class SurfacePolygons

    • Field Detail

      • polygonRingGroups

        protected int[] polygonRingGroups
      • windingRule

        protected java.lang.String windingRule
      • needsInteriorTessellation

        protected boolean needsInteriorTessellation
      • interiorDisplayListCacheKey

        protected java.lang.Object interiorDisplayListCacheKey
    • Method Detail

      • getPolygonRingGroups

        public int[] getPolygonRingGroups()
        Get a copy of the polygon ring groups array - can be null.

        When not null the polygon ring groups array identifies the starting sub buffer index for each polygon. In that case rings from a same group will be tesselated together as part of the same polygon.

        When null polygon rings that follow the current winding rule are tessellated separatly as different polygons. Rings that are reverse winded are considered holes to be applied to the last straight winded ring polygon.

        Returns:
        a copy of the polygon ring groups array - can be null.
      • setPolygonRingGroups

        public void setPolygonRingGroups​(int[] ringGroups)
        Set the polygon ring groups array - can be null.

        When not null the polygon ring groups array identifies the starting sub buffer index for each polygon. In that case rings from a same group will be tesselated together as part of the same polygon.

        When null polygon rings that follow the current winding rule are tessellated separatly as different polygons. Rings that are reverse winded are considered holes to be applied to the last straight winded ring polygon.

        Parameters:
        ringGroups - a copy of the polygon ring groups array - can be null.
      • getWindingRule

        public java.lang.String getWindingRule()
        Get the winding rule used when tessellating polygons. Can be one of AVKey.CLOCKWISE (default) or AVKey.COUNTER_CLOCKWISE.

        When set to AVKey.CLOCKWISE polygons which run clockwise will be filled and those which run counter clockwise will produce 'holes'. The interpretation is reversed when the winding rule is set to AVKey.COUNTER_CLOCKWISE.

        Returns:
        the winding rule used when tessellating polygons.
      • setWindingRule

        public void setWindingRule​(java.lang.String windingRule)
        Set the winding rule used when tessellating polygons. Can be one of AVKey.CLOCKWISE (default) or AVKey.COUNTER_CLOCKWISE.

        When set to AVKey.CLOCKWISE polygons which run clockwise will be filled and those which run counter clockwise will produce 'holes'. The interpretation is reversed when the winding rule is set to AVKey.COUNTER_CLOCKWISE.

        Parameters:
        windingRule - the winding rule to use when tessellating polygons.
      • getTexture

        protected WWTexture getTexture()
      • tessellateInterior

        protected int[] tessellateInterior​(DrawContext dc,
                                           LatLon referenceLocation)
      • doTessellateInterior

        protected int[] doTessellateInterior​(DrawContext dc,
                                             LatLon referenceLocation)
      • tessellateInteriorVertices

        protected int tessellateInteriorVertices​(com.jogamp.opengl.glu.GLUtessellator tess,
                                                 LatLon referenceLocation)
      • tessellateRing

        protected boolean tessellateRing​(com.jogamp.opengl.glu.GLUtessellator tess,
                                         VecBuffer vecBuffer,
                                         LatLon referenceLocation)
      • computeDateLineCrossingPoints

        protected java.util.List<double[]> computeDateLineCrossingPoints​(VecBuffer vecBuffer)
      • computePole

        protected int computePole​(java.util.List<double[]> dateLineCrossingPoints)
      • computePoleWrappingPoint

        protected double[] computePoleWrappingPoint​(int pole,
                                                    java.util.List<double[]> dateLineCrossingPoints)
      • computeDateLineEntryPoint

        protected double[] computeDateLineEntryPoint​(double[] from,
                                                     double[] to)