NASA World Wind

gov.nasa.worldwind.symbology.milstd2525.graphics.areas
Class SectorRangeFan

java.lang.Object
  extended by gov.nasa.worldwind.avlist.AVListImpl
      extended by gov.nasa.worldwind.symbology.AbstractTacticalGraphic
          extended by gov.nasa.worldwind.symbology.milstd2525.AbstractMilStd2525TacticalGraphic
              extended by gov.nasa.worldwind.symbology.milstd2525.graphics.areas.SectorRangeFan
All Implemented Interfaces:
AVList, Movable, Highlightable, PreRenderable, Renderable, MilStd2525TacticalGraphic, TacticalGraphic

public class SectorRangeFan
extends AbstractMilStd2525TacticalGraphic
implements PreRenderable

Implementation of the Sector Weapon/Sensor Range Fans graphic (2.X.4.3.4.2). The range fans are defined by a center position, list of radii, and list of left and right azimuths. If no azimuths are specified, the fans will be drawn as full circles.


Field Summary
protected  Iterable<String> altitudes
          Altitudes of the range fans.
protected  Angle arrowAngle
          Length of the arrowhead from base to tip, as a fraction of the Center Of Sector line length.
protected  SurfacePolygon arrowHead
          Polygon to draw a filled arrow head on the Center Of Sector line.
protected  double arrowLength
          Angle of the arrowhead.
protected static double AZIMUTH_LABEL_OFFSET
          Azimuth labels are placed to the side of the line that they label.
protected  NumberFormat azimuthFormat
          Number format used to create azimuth labels.
protected  Iterable<? extends Angle> azimuths
          Azimuths of the range fans.
protected  Angle centerAzimuth
          Azimuth of the Center Of Sector arrow.
protected  double centerOfSectorLength
          Length of the Center Of Sector line, as a fraction of the last range fan radius.
static Angle DEFAULT_ARROWHEAD_ANGLE
          Default angle of the arrowhead.
static double DEFAULT_ARROWHEAD_LENGTH
          Default length of the arrowhead, as a fraction of the Center Of Sector line length.
static double DEFAULT_CENTER_OF_SECTOR_LENGTH
          Default length of the Center Of Sector line, as a fraction of the final range fan radius.
static int DEFAULT_NUM_INTERVALS
          Default number of intervals used to draw each arcs.
static NumberFormat DEFAULT_NUMBER_FORMAT
          Default number format used to create azimuth and radius labels.
protected  int intervals
          Number of intervals used to draw each arcs.
protected  double maxRadius
          Maximum radius in the range fan.
protected  List<Path> paths
          Rings that make up the range fan.
protected  Position position
          Position of the center of the range fan.
protected  Iterable<Double> radii
          Radii of the range fans, in meters.
protected  NumberFormat radiusFormat
          Number format used to create radius labels.
protected  TacticalSymbol symbol
          Symbol drawn at the center of the range fan.
protected  TacticalSymbolAttributes symbolAttributes
          Attributes applied to the symbol.
 
Fields inherited from class gov.nasa.worldwind.symbology.milstd2525.AbstractMilStd2525TacticalGraphic
maskedSymbolCode, OUTLINE_STIPPLE_FACTOR_ANTICIPATED, OUTLINE_STIPPLE_FACTOR_PRESENT, OUTLINE_STIPPLE_PATTERN, symbolCode
 
Fields inherited from class gov.nasa.worldwind.symbology.AbstractTacticalGraphic
activeOverrides, activeShapeAttributes, DEFAULT_HIGHLIGHT_MATERIAL, DEFAULT_LABEL_INTERIOR_OPACITY, delegateOwner, frameTimestamp, highlightAttributes, highlighted, labelOffset, labels, modifiers, mustCreateLabels, normalAttributes, showGraphicModifiers, showHostileIndicator, showLocation, showTextModifiers, text, unitsFormat, visible
 
Constructor Summary
SectorRangeFan(String sidc)
          Create the range fan.
 
Method Summary
protected  void applyDefaultAttributes(ShapeAttributes attributes)
          Apply defaults to the active attributes bundle.
protected  void applyDelegateOwner(Object owner)
          Invoked each frame to apply to the current delegate owner to all renderable objects used to draw the graphic.
protected  List<Position> computeArrowheadPositions(DrawContext dc, Position base, Position tip, double arrowLength, Angle arrowAngle)
          Compute the positions of the arrow head for the sector center line.
protected  double computeAzimuthLabelOffset(double radius, double maxRadius)
          Compute an angular offset to apply to a azimuth label.
protected  Angle computeCenterSectorAngle(Angle finalLeftAzimuth, Angle finalRightAzimuth)
          Compute the angle of the Center Of Sector line.
protected  void createArc(DrawContext dc, double radius, Angle leftAzimuth, Angle rightAzimuth, List<Position> positions)
          Create positions to draw an arc around the graphic's center position.
protected  void createAzimuthLabels()
          Create azimuth labels.
protected  String createAzimuthLabelString(Angle azimuth)
          Create text for an azimuth label.
protected  void createCenterOfSectorArrow(DrawContext dc, Angle centerAzimuth, double finalRadius)
          Create shapes to draw the Center Of Sector arrow.
protected  void createLabels()
          Create labels for the start and end of the path.
protected  Path createPath(List<Position> positions)
          Create and configure the Path used to render this graphic.
protected  SurfacePolygon createPolygon()
          Create and configure a SurfacePolygon to render the arrow head on the sector center line.
protected  String createRangeLabelString(double radius, String altitude)
          Create text for a range label.
protected  void createShapes(DrawContext dc)
          Create the paths required to draw the graphic.
protected  void determineActiveAttributes()
          Determine active attributes for this frame.
protected  void determineLabelPositions(DrawContext dc)
          Determine positions for the start and end labels.
protected  Position determineRangeLabelPosition(Position center, Angle centerAzimuth, Angle leftAzimuth, Angle rightAzimuth, double radiusRadians)
          Determine the position of a range label for a ring in the range fan.
protected  void doRenderGraphic(DrawContext dc)
          Render the polygon.
protected  void doRenderGraphicModifiers(DrawContext dc)
          Render the graphic modifiers.
 Iterable<String> getAltitudes()
          Indicates the altitudes of the rings that make up the range fan.
 Angle getArrowAngle()
          Indicates the angle of the arrowhead.
 double getArrowLength()
          Indicates the length of the arrowhead.
 NumberFormat getAzimuthFormat()
          Indicates the number format applied to azimuth values to create the azimuth labels.
 Iterable<? extends Angle> getAzimuths()
          Indicates the left and right azimuths of the fans in this graphic.
 double getCenterOfSectorLength()
          Indicates the length of the Center Of Sector line.
 int getIntervals()
          Indicates the number of intervals used to draw the arc in this graphic.
 Object getModifier(String modifier)
          Indicates the current value of a text or graphic modifier.
 Position getPosition()
          Indicates the center position of the range ran.
 Iterable<? extends Position> getPositions()
          Indicates the positions of the control points that place and orient the graphic.
 Iterable<Double> getRadii()
          Indicates the radii of the rings that make up the range fan.
 NumberFormat getRadiusFormat()
          Indicates the number format applied to radius values to create the radius labels.
 Position getReferencePosition()
          A position associated with the object that indicates its aggregate geographic position.
static List<String> getSupportedGraphics()
          Indicates the graphics supported by this class.
 String getSymbol()
          Indicates a symbol drawn at the center of the range fan.
protected  Angle normalizeAzimuth(Angle azimuth)
          Normalize an azimuth angle to the range [-180:180] degrees.
 void preRender(DrawContext dc)
          
protected  void reset()
          Regenerate the graphics positions on the next frame.
 void setAltitudes(Iterable<String> altitudes)
          Specifies the altitudes of the rings that make up the range fan.
 void setArrowAngle(Angle arrowAngle)
          Specifies the angle of the arrowhead in the graphic.
 void setArrowLength(double arrowLength)
          Specifies the length of the arrowhead.
 void setAzimuthFormat(NumberFormat azimuthFormat)
          Specifies the number format applied to azimuth values to create the azimuth labels.
 void setAzimuths(Iterable<? extends Angle> azimuths)
          Specifies the left and right azimuths of the range fans in this graphic.
 void setCenterOfSector(double centerOfSectorLength)
          Specifies the length of the Center Of Sector line.
 void setIntervals(int intervals)
          Specifies the number of intervals used to draw the arc in this graphic.
 void setModifier(String modifier, Object value)
          Specifies the value of a text or graphic modifier.
 void setPosition(Position position)
          Specifies the center position of the range ran.
 void setPositions(Iterable<? extends Position> positions)
          Specifies the positions of the control points that place and orient the graphic.
 void setRadii(Iterable<Double> radii)
          Specifies the radii of the rings that make up the range fan.
 void setRadiusFormat(NumberFormat radiusFormat)
          Specifies the number format applied to radius values to create the radius labels.
 void setSymbol(String sidc)
          Specifies a symbol to draw at the center of the range fan.
 
Methods inherited from class gov.nasa.worldwind.symbology.milstd2525.AbstractMilStd2525TacticalGraphic
createSymbol, getDefaultMaterial, getIdentifier, getOutlineStippleFactor, getOutlineStipplePattern, getStatus, getText, mustShowHostileIndicator, setStatus
 
Methods inherited from class gov.nasa.worldwind.symbology.AbstractTacticalGraphic
addLabel, applyLabelAttributes, applyOverrideAttributes, computeGeometry, computeLabelInteriorOpacity, determineDelegateOwner, determinePerFrameAttributes, doRenderTextModifiers, getActiveDelegateOwner, getActiveOverrideAttributes, getActiveShapeAttributes, getAttributes, getDefaultLabelOffset, getDelegateOwner, getHighlightAttributes, getLabelMaterial, getLabelOffset, getUnitsFormat, isHighlighted, isShowGraphicModifiers, isShowHostileIndicator, isShowLocation, isShowTextModifiers, isVisible, move, moveTo, onModifierChanged, render, setAttributes, setDelegateOwner, setHighlightAttributes, setHighlighted, setLabelOffset, setShowGraphicModifiers, setShowHostileIndicator, setShowLocation, setShowTextModifiers, setText, setUnitsFormat, setVisible
 
Methods inherited from class gov.nasa.worldwind.avlist.AVListImpl
addPropertyChangeListener, addPropertyChangeListener, clearList, copy, firePropertyChange, firePropertyChange, getBooleanValue, getBooleanValue, getChangeSupport, getDoubleValue, getDoubleValue, getEntries, getIntegerValue, getIntegerValue, getLongValue, getLongValue, getRestorableStateForAVPair, getStringValue, getStringValue, getStringValue, getValue, getValues, hasKey, removeKey, removePropertyChangeListener, removePropertyChangeListener, setValue, setValues
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface gov.nasa.worldwind.symbology.TacticalGraphic
getAttributes, getDelegateOwner, getHighlightAttributes, getLabelOffset, getUnitsFormat, isShowGraphicModifiers, isShowHostileIndicator, isShowLocation, isShowTextModifiers, isVisible, setAttributes, setDelegateOwner, setHighlightAttributes, setLabelOffset, setShowGraphicModifiers, setShowHostileIndicator, setShowLocation, setShowTextModifiers, setText, setUnitsFormat, setVisible
 
Methods inherited from interface gov.nasa.worldwind.render.Renderable
render
 
Methods inherited from interface gov.nasa.worldwind.render.Highlightable
isHighlighted, setHighlighted
 
Methods inherited from interface gov.nasa.worldwind.Movable
move, moveTo
 
Methods inherited from interface gov.nasa.worldwind.avlist.AVList
addPropertyChangeListener, addPropertyChangeListener, clearList, copy, firePropertyChange, firePropertyChange, getEntries, getStringValue, getValue, getValues, hasKey, removeKey, removePropertyChangeListener, removePropertyChangeListener, setValue, setValues
 

Field Detail

altitudes

protected Iterable<String> altitudes
Altitudes of the range fans.


arrowAngle

protected Angle arrowAngle
Length of the arrowhead from base to tip, as a fraction of the Center Of Sector line length.


arrowHead

protected SurfacePolygon arrowHead
Polygon to draw a filled arrow head on the Center Of Sector line.


arrowLength

protected double arrowLength
Angle of the arrowhead.


AZIMUTH_LABEL_OFFSET

protected static final double AZIMUTH_LABEL_OFFSET
Azimuth labels are placed to the side of the line that they label. This value specifies a percentage that is multiplied by the maximum radius in the range fan to compute a distance for this offset.

See Also:
Constant Field Values

azimuthFormat

protected NumberFormat azimuthFormat
Number format used to create azimuth labels.


azimuths

protected Iterable<? extends Angle> azimuths
Azimuths of the range fans. The azimuths are specified in pairs, first the left azimuth, then the right azimuth.


centerAzimuth

protected Angle centerAzimuth
Azimuth of the Center Of Sector arrow.


centerOfSectorLength

protected double centerOfSectorLength
Length of the Center Of Sector line, as a fraction of the last range fan radius.


DEFAULT_ARROWHEAD_ANGLE

public static final Angle DEFAULT_ARROWHEAD_ANGLE
Default angle of the arrowhead.


DEFAULT_ARROWHEAD_LENGTH

public static final double DEFAULT_ARROWHEAD_LENGTH
Default length of the arrowhead, as a fraction of the Center Of Sector line length.

See Also:
Constant Field Values

DEFAULT_CENTER_OF_SECTOR_LENGTH

public static final double DEFAULT_CENTER_OF_SECTOR_LENGTH
Default length of the Center Of Sector line, as a fraction of the final range fan radius.

See Also:
Constant Field Values

DEFAULT_NUM_INTERVALS

public static final int DEFAULT_NUM_INTERVALS
Default number of intervals used to draw each arcs.

See Also:
Constant Field Values

DEFAULT_NUMBER_FORMAT

public static final NumberFormat DEFAULT_NUMBER_FORMAT
Default number format used to create azimuth and radius labels.


intervals

protected int intervals
Number of intervals used to draw each arcs.


maxRadius

protected double maxRadius
Maximum radius in the range fan.


paths

protected List<Path> paths
Rings that make up the range fan.


position

protected Position position
Position of the center of the range fan.


radii

protected Iterable<Double> radii
Radii of the range fans, in meters.


radiusFormat

protected NumberFormat radiusFormat
Number format used to create radius labels.


symbol

protected TacticalSymbol symbol
Symbol drawn at the center of the range fan.


symbolAttributes

protected TacticalSymbolAttributes symbolAttributes
Attributes applied to the symbol.

Constructor Detail

SectorRangeFan

public SectorRangeFan(String sidc)
Create the range fan.

Parameters:
sidc - Symbol code the identifies the graphic.
Method Detail

applyDefaultAttributes

protected void applyDefaultAttributes(ShapeAttributes attributes)
Apply defaults to the active attributes bundle. The default attributes are determined by the type of graphic. This method is called each frame to reset the active shape attributes to the appropriate default state. Override attributes specified by the application may be applied after the defaults have been set. Overridden to turn on shape interiors.

Overrides:
applyDefaultAttributes in class AbstractMilStd2525TacticalGraphic
Parameters:
attributes - Attributes bundle to receive defaults.

applyDelegateOwner

protected void applyDelegateOwner(Object owner)
Invoked each frame to apply to the current delegate owner to all renderable objects used to draw the graphic. This base class will apply the delegate owner to Label objects. Subclasses must implement this method to apply the delegate owner to any Renderables that they will draw in order to render the graphic.

Specified by:
applyDelegateOwner in class AbstractTacticalGraphic
Parameters:
owner - Current delegate owner.

computeArrowheadPositions

protected List<Position> computeArrowheadPositions(DrawContext dc,
                                                   Position base,
                                                   Position tip,
                                                   double arrowLength,
                                                   Angle arrowAngle)
Compute the positions of the arrow head for the sector center line.

Parameters:
dc - Current draw context
base - Position of the arrow's starting point.
tip - Position of the arrow head tip.
arrowLength - Length of the arrowhead as a fraction of the total line length.
arrowAngle - Angle of the arrow head.
Returns:
Positions required to draw the arrow head.

computeAzimuthLabelOffset

protected double computeAzimuthLabelOffset(double radius,
                                           double maxRadius)
Compute an angular offset to apply to a azimuth label. This angle will be added to the azimuth of the label's azimuth in order to place the label a little bit to the side of the line that it applies to.

Parameters:
radius - Radius at which the label will be placed.
maxRadius - Maximum radius in the range fan.
Returns:
Angle, in radians, to add to the range fan azimuth in order to determine the label position.

computeCenterSectorAngle

protected Angle computeCenterSectorAngle(Angle finalLeftAzimuth,
                                         Angle finalRightAzimuth)
Compute the angle of the Center Of Sector line. The center sector angle is computed as the average of the left and right azimuths of the last range fan in the graphic. MIL-STD-2525C does not specify how this angle should be computed, but the graphic template (pg. 693) suggests that the Center Of Sector line should bisect the last range fan arc.

Parameters:
finalLeftAzimuth - Left azimuth of the last range fan in the graphic.
finalRightAzimuth - Right azimuth of the last range fan in the graphic.
Returns:
Azimuth, from North, of the Center Of Sector line.

createArc

protected void createArc(DrawContext dc,
                         double radius,
                         Angle leftAzimuth,
                         Angle rightAzimuth,
                         List<Position> positions)
Create positions to draw an arc around the graphic's center position. The arc is described by a radius, left azimuth, and right azimuth. The arc positions are added onto an existing list of positions, in left to right order (the arc draws from the left azimuth to the right azimuth).

If the left and right azimuths are equal, then this methods adds a single position to the list at the desired azimuth and radius.

Parameters:
dc - Current draw context.
radius - Radius of the circular segment, in meters.
leftAzimuth - Azimuth (from North) of the left side of the arc.
rightAzimuth - Azimuth (from North) of teh right side of the arc.
positions - List to collect positions for the arc.

createAzimuthLabels

protected void createAzimuthLabels()
Create azimuth labels.


createAzimuthLabelString

protected String createAzimuthLabelString(Angle azimuth)
Create text for an azimuth label.

Parameters:
azimuth - Azimuth, measured clockwise from North.
Returns:
Azimuth label text.

createCenterOfSectorArrow

protected void createCenterOfSectorArrow(DrawContext dc,
                                         Angle centerAzimuth,
                                         double finalRadius)
Create shapes to draw the Center Of Sector arrow. This arrow bisects the final range fan.

Parameters:
dc - Current draw context.
centerAzimuth - Azimuth of the Center Of Sector arrow.
finalRadius - Radius, in meters, of the final range fan.

createLabels

protected void createLabels()
Create labels for the start and end of the path.

Overrides:
createLabels in class AbstractTacticalGraphic

createPath

protected Path createPath(List<Position> positions)
Create and configure the Path used to render this graphic.

Parameters:
positions - Positions that define the path.
Returns:
New path configured with defaults appropriate for this type of graphic.

createPolygon

protected SurfacePolygon createPolygon()
Create and configure a SurfacePolygon to render the arrow head on the sector center line.

Returns:
New surface polygon.

createRangeLabelString

protected String createRangeLabelString(double radius,
                                        String altitude)
Create text for a range label.

Parameters:
radius - Range of the ring, in meters.
altitude - Altitude string.
Returns:
Range label text for this ring.

createShapes

protected void createShapes(DrawContext dc)
Create the paths required to draw the graphic.

Parameters:
dc - Current draw context.

determineActiveAttributes

protected void determineActiveAttributes()
Determine active attributes for this frame. Overridden to update symbol attributes.

Overrides:
determineActiveAttributes in class AbstractTacticalGraphic

determineLabelPositions

protected void determineLabelPositions(DrawContext dc)
Determine positions for the start and end labels.

Overrides:
determineLabelPositions in class AbstractTacticalGraphic
Parameters:
dc - Current draw context.

determineRangeLabelPosition

protected Position determineRangeLabelPosition(Position center,
                                               Angle centerAzimuth,
                                               Angle leftAzimuth,
                                               Angle rightAzimuth,
                                               double radiusRadians)
Determine the position of a range label for a ring in the range fan. The method finds a point to either the left or right of the center line, depending on which has more space for the label.

Parameters:
center - Center of the range fan.
centerAzimuth - Azimuth of the Center Of Sector arrow.
leftAzimuth - Left azimuth of this ring.
rightAzimuth - Right azimuth of this ring.
radiusRadians - Radius, in radians, at which to place the label.
Returns:
Position for the range label on this ring.

doRenderGraphic

protected void doRenderGraphic(DrawContext dc)
Render the polygon.

Specified by:
doRenderGraphic in class AbstractTacticalGraphic
Parameters:
dc - Current draw context.
See Also:
AbstractTacticalGraphic.doRenderTextModifiers(gov.nasa.worldwind.render.DrawContext), AbstractTacticalGraphic.doRenderGraphicModifiers(gov.nasa.worldwind.render.DrawContext)

doRenderGraphicModifiers

protected void doRenderGraphicModifiers(DrawContext dc)
Render the graphic modifiers. This base class does not render anything, but subclasses may override this method to draw graphic modifiers. Overridden to render symbol at the center of the range fan.

Overrides:
doRenderGraphicModifiers in class AbstractTacticalGraphic
Parameters:
dc - Current draw context.

getAltitudes

public Iterable<String> getAltitudes()
Indicates the altitudes of the rings that make up the range fan. Note that the range fan is always drawn on the surface. The altitude strings are displayed as text.

Returns:
List of altitude strings. This method never returns null. If there are no altitudes, returns an empty list.

getArrowAngle

public Angle getArrowAngle()
Indicates the angle of the arrowhead.

Returns:
Angle of the arrowhead in the graphic.

getArrowLength

public double getArrowLength()
Indicates the length of the arrowhead.

Returns:
The length of the arrowhead as a fraction of the total line length.

getAzimuthFormat

public NumberFormat getAzimuthFormat()
Indicates the number format applied to azimuth values to create the azimuth labels.

Returns:
NumberFormat used to create azimuth labels.

getAzimuths

public Iterable<? extends Angle> getAzimuths()
Indicates the left and right azimuths of the fans in this graphic. The list contains pairs of azimuths, first left and then right.

Returns:
Left and right azimuths, measured clockwise from North. This method never returns null. If there are no azimuths, returns an empty list.

getCenterOfSectorLength

public double getCenterOfSectorLength()
Indicates the length of the Center Of Sector line.

Returns:
The length of the Center Of Sector as a fraction of the final range fan radius.

getIntervals

public int getIntervals()
Indicates the number of intervals used to draw the arc in this graphic.

Returns:
Intervals used to draw arc.

getModifier

public Object getModifier(String modifier)
Indicates the current value of a text or graphic modifier.

Specified by:
getModifier in interface TacticalGraphic
Overrides:
getModifier in class AbstractMilStd2525TacticalGraphic
Parameters:
modifier - Key that identifies the modifier to retrieve. The possible modifiers depends on the symbol set.
Returns:
The value of the modifier, or null if the modifier is not set.

getPosition

public Position getPosition()
Indicates the center position of the range ran.

Returns:
The range fan center position.

getPositions

public Iterable<? extends Position> getPositions()
Indicates the positions of the control points that place and orient the graphic.

Specified by:
getPositions in interface TacticalGraphic
Returns:
positions that orient the graphic. How many positions are returned depends on the type of graphic. Some graphics require only a single position, others require many.

getRadii

public Iterable<Double> getRadii()
Indicates the radii of the rings that make up the range fan.

Returns:
List of radii, in meters. This method never returns null. If there are no rings this returns an empty list.

getRadiusFormat

public NumberFormat getRadiusFormat()
Indicates the number format applied to radius values to create the radius labels.

Returns:
NumberFormat used to create radius labels.

getReferencePosition

public Position getReferencePosition()
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
Returns:
the object's reference position, or null if no reference position is available.

getSupportedGraphics

public static List<String> getSupportedGraphics()
Indicates the graphics supported by this class.

Returns:
List of masked SIDC strings that identify graphics that this class supports.

getSymbol

public String getSymbol()
Indicates a symbol drawn at the center of the range fan.

Returns:
The identifier of a symbol drawn at the center of the range fan. May be null.

normalizeAzimuth

protected Angle normalizeAzimuth(Angle azimuth)
Normalize an azimuth angle to the range [-180:180] degrees.

Parameters:
azimuth - Azimuth to normalize.
Returns:
Normalized azimuth. Returns null if azimuth is null.

preRender

public void preRender(DrawContext dc)

Specified by:
preRender in interface PreRenderable

reset

protected void reset()
Regenerate the graphics positions on the next frame.


setAltitudes

public void setAltitudes(Iterable<String> altitudes)
Specifies the altitudes of the rings that make up the range fan. Note that the range fan is always drawn on the surface. The altitude strings are displayed as text.

Parameters:
altitudes - List of altitude strings.

setArrowAngle

public void setArrowAngle(Angle arrowAngle)
Specifies the angle of the arrowhead in the graphic.

Parameters:
arrowAngle - The angle of the arrowhead. Must be greater than zero degrees and less than 90 degrees.

setArrowLength

public void setArrowLength(double arrowLength)
Specifies the length of the arrowhead.

Parameters:
arrowLength - Length of the arrowhead as a fraction of the total line length. If the arrowhead length is 0.25, then the arrowhead length will be one quarter of the total line length.

setAzimuthFormat

public void setAzimuthFormat(NumberFormat azimuthFormat)
Specifies the number format applied to azimuth values to create the azimuth labels.

Parameters:
azimuthFormat - NumberFormat to create azimuth labels.

setAzimuths

public void setAzimuths(Iterable<? extends Angle> azimuths)
Specifies the left and right azimuths of the range fans in this graphic. The provided iterable must specify pairs of azimuths: first left azimuth, first right azimuth, second left, second right, etc.

Parameters:
azimuths - Left and right azimuths, measured clockwise from North.

setCenterOfSector

public void setCenterOfSector(double centerOfSectorLength)
Specifies the length of the Center Of Sector line.

Parameters:
centerOfSectorLength - Length of the Center Of Sector arrow as a fraction of the final range fan radius.

setIntervals

public void setIntervals(int intervals)
Specifies the number of intervals used to draw the arc in this graphic. More intervals will result in a smoother looking arc.

Parameters:
intervals - Number of intervals for drawing the arc.

setModifier

public void setModifier(String modifier,
                        Object value)
Specifies the value of a text or graphic modifier.

Specified by:
setModifier in interface TacticalGraphic
Overrides:
setModifier in class AbstractMilStd2525TacticalGraphic
Parameters:
modifier - Key that identifies the modifier to set. The possible modifiers depends on the symbol set.
value - New value for the modifier.

setPosition

public void setPosition(Position position)
Specifies the center position of the range ran.

Parameters:
position - The new center position.

setPositions

public void setPositions(Iterable<? extends Position> positions)
Specifies the positions of the control points that place and orient the graphic.

Specified by:
setPositions in interface TacticalGraphic
Parameters:
positions - Control points. This graphic uses only one control point, which determines the center of the circle.

setRadii

public void setRadii(Iterable<Double> radii)
Specifies the radii of the rings that make up the range fan.

Parameters:
radii - List of radii, in meters. A circle will be created for each radius.

setRadiusFormat

public void setRadiusFormat(NumberFormat radiusFormat)
Specifies the number format applied to radius values to create the radius labels.

Parameters:
radiusFormat - NumberFormat to create radius labels.

setSymbol

public void setSymbol(String sidc)
Specifies a symbol to draw at the center of the range fan. Equivalent to setting the SymbologyConstants.SYMBOL_INDICATOR modifier. The symbol's position will be changed to match the range fan center position.

Parameters:
sidc - The identifier of a MIL-STD-2525C tactical symbol to draw at the center of the range fan. May be null to indicate that no symbol is drawn.

NASA World Wind