NASA World Wind

gov.nasa.worldwind.render
Class SurfaceShapeSupport

java.lang.Object
  extended by gov.nasa.worldwind.render.SurfaceShapeSupport

public class SurfaceShapeSupport
extends java.lang.Object


Field Summary
protected static double[] planeS
           
protected static double[] planeT
           
protected  OGLStackHandler stackHandler
           
protected  OGLStateSupport stateSupport
           
protected  double[] vertexArray
           
protected  VecBuffer vertexBuffer
           
 
Constructor Summary
SurfaceShapeSupport()
           
 
Method Summary
protected  void addIntermediateLocations(LatLon a, LatLon b, java.lang.String pathType, double edgeIntervalsPerDegree, int minEdgeIntervals, int maxEdgeIntervals, java.util.List<LatLon> outLocations)
           
 java.lang.Iterable<? extends Sector> adjustSectorsByBorderWidth(java.lang.Iterable<? extends Sector> sectors, double lineWidth, double texelSizeRadians)
          Returns a copy of the specified sectors, increased in size outward from their centroids according to the specified line width in texels, and texel size in arc radians.
 void applyInteriorState(DrawContext dc, ShapeAttributes attributes)
           
 void applyInteriorState(DrawContext dc, ShapeAttributes attributes, WWTexture texture, Sector sector, java.awt.Rectangle drawRect, LatLon refPos)
           
 void applyMaterialState(DrawContext dc, Material material, double opacity)
           
 void applyOutlineState(DrawContext dc, ShapeAttributes attributes)
           
protected  void applyTextureCoordinateGenerationState(DrawContext dc, Sector sector, java.awt.Rectangle drawRect)
           
 void applyTextureState(DrawContext dc, WWTexture texture, Sector sector, java.awt.Rectangle drawRect, double scale, double opacity, LatLon refPos)
           
protected  void applyTextureTransform(DrawContext dc, WWTexture texture, double scale, Sector sector, java.awt.Rectangle drawRect, LatLon refPos)
           
 void beginRendering(DrawContext dc, Sector sector, int x, int y, int width, int height)
           
 java.lang.Iterable<? extends Sector> computeBoundingSectors(java.lang.Iterable<? extends LatLon> locations, java.lang.String pathType)
           
 void doMoveTo(CompoundVecBuffer buffer, Position oldReferencePosition, Position newReferencePosition)
           
 void drawLocations(DrawContext dc, int drawMode, java.lang.Iterable<? extends LatLon> locations, int count)
           
 void endRendering(DrawContext dc)
           
 void fixDatelineCrossingLocations(Sector sector, java.lang.Iterable<? extends LatLon> iterable, java.util.List<LatLon> outLocations)
           
 void generateIntermediateLocations(java.lang.Iterable<? extends LatLon> locations, java.lang.String pathType, double edgeIntervalsPerDegree, int minEdgeIntervals, int maxEdgeIntervals, boolean makeClosedPath, java.util.List<LatLon> outLocations)
           
protected  double[] getVertexArray(int size)
           
protected  VecBuffer getVertexBuffer(int size)
           
protected  Angle[] greatArcExtremeLatitudes(java.lang.Iterable<? extends LatLon> locations)
           
 void makeClosedPath(java.util.List<LatLon> outLocations)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

planeS

protected static final double[] planeS

planeT

protected static final double[] planeT

stackHandler

protected OGLStackHandler stackHandler

stateSupport

protected OGLStateSupport stateSupport

vertexArray

protected double[] vertexArray

vertexBuffer

protected VecBuffer vertexBuffer
Constructor Detail

SurfaceShapeSupport

public SurfaceShapeSupport()
Method Detail

addIntermediateLocations

protected void addIntermediateLocations(LatLon a,
                                        LatLon b,
                                        java.lang.String pathType,
                                        double edgeIntervalsPerDegree,
                                        int minEdgeIntervals,
                                        int maxEdgeIntervals,
                                        java.util.List<LatLon> outLocations)

adjustSectorsByBorderWidth

public java.lang.Iterable<? extends Sector> adjustSectorsByBorderWidth(java.lang.Iterable<? extends Sector> sectors,
                                                                       double lineWidth,
                                                                       double texelSizeRadians)
Returns a copy of the specified sectors, increased in size outward from their centroids according to the specified line width in texels, and texel size in arc radians. This computation compensates for lines which straddle the sector's perimeter, which implicitly increases the sector's size.

Parameters:
sectors - the sectors to expand according to the line width and texel size.
lineWidth - the line width in texels straddling the sector boundaries.
texelSizeRadians - the size of a line texel in arc radians.
Returns:
a copy of the specified sectors, adjusted according to the specified line width and texel size.
Throws:
java.lang.IllegalArgumentException - if sectors is null, or if lineWidth is less than zero.

applyInteriorState

public void applyInteriorState(DrawContext dc,
                               ShapeAttributes attributes)

applyInteriorState

public void applyInteriorState(DrawContext dc,
                               ShapeAttributes attributes,
                               WWTexture texture,
                               Sector sector,
                               java.awt.Rectangle drawRect,
                               LatLon refPos)

applyMaterialState

public void applyMaterialState(DrawContext dc,
                               Material material,
                               double opacity)

applyOutlineState

public void applyOutlineState(DrawContext dc,
                              ShapeAttributes attributes)

applyTextureCoordinateGenerationState

protected void applyTextureCoordinateGenerationState(DrawContext dc,
                                                     Sector sector,
                                                     java.awt.Rectangle drawRect)

applyTextureState

public void applyTextureState(DrawContext dc,
                              WWTexture texture,
                              Sector sector,
                              java.awt.Rectangle drawRect,
                              double scale,
                              double opacity,
                              LatLon refPos)

applyTextureTransform

protected void applyTextureTransform(DrawContext dc,
                                     WWTexture texture,
                                     double scale,
                                     Sector sector,
                                     java.awt.Rectangle drawRect,
                                     LatLon refPos)

beginRendering

public void beginRendering(DrawContext dc,
                           Sector sector,
                           int x,
                           int y,
                           int width,
                           int height)

computeBoundingSectors

public java.lang.Iterable<? extends Sector> computeBoundingSectors(java.lang.Iterable<? extends LatLon> locations,
                                                                   java.lang.String pathType)

doMoveTo

public void doMoveTo(CompoundVecBuffer buffer,
                     Position oldReferencePosition,
                     Position newReferencePosition)

drawLocations

public void drawLocations(DrawContext dc,
                          int drawMode,
                          java.lang.Iterable<? extends LatLon> locations,
                          int count)

endRendering

public void endRendering(DrawContext dc)

fixDatelineCrossingLocations

public void fixDatelineCrossingLocations(Sector sector,
                                         java.lang.Iterable<? extends LatLon> iterable,
                                         java.util.List<LatLon> outLocations)

generateIntermediateLocations

public void generateIntermediateLocations(java.lang.Iterable<? extends LatLon> locations,
                                          java.lang.String pathType,
                                          double edgeIntervalsPerDegree,
                                          int minEdgeIntervals,
                                          int maxEdgeIntervals,
                                          boolean makeClosedPath,
                                          java.util.List<LatLon> outLocations)

getVertexArray

protected double[] getVertexArray(int size)

getVertexBuffer

protected VecBuffer getVertexBuffer(int size)

greatArcExtremeLatitudes

protected Angle[] greatArcExtremeLatitudes(java.lang.Iterable<? extends LatLon> locations)

makeClosedPath

public void makeClosedPath(java.util.List<LatLon> outLocations)

NASA World Wind