Class EchelonSymbol
- java.lang.Object
-
- gov.nasa.worldwind.avlist.AVListImpl
-
- gov.nasa.worldwind.WWObjectImpl
-
- gov.nasa.worldwind.symbology.AbstractTacticalSymbol
-
- gov.nasa.worldwind.symbology.milstd2525.graphics.EchelonSymbol
-
- All Implemented Interfaces:
AVList
,Draggable
,MessageListener
,Movable
,Highlightable
,Renderable
,TacticalSymbol
,WWObject
,java.beans.PropertyChangeListener
,java.util.EventListener
public class EchelonSymbol extends AbstractTacticalSymbol
Tactical symbol implementation to render the echelon modifier as part of a tactical graphic.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class gov.nasa.worldwind.symbology.AbstractTacticalSymbol
AbstractTacticalSymbol.IconAtlasElement, AbstractTacticalSymbol.IconSource, AbstractTacticalSymbol.IconTexture, AbstractTacticalSymbol.Label, AbstractTacticalSymbol.Line, AbstractTacticalSymbol.OrderedSymbol
-
Nested classes/interfaces inherited from interface gov.nasa.worldwind.symbology.TacticalSymbol
TacticalSymbol.LODSelector
-
-
Field Summary
Fields Modifier and Type Field Description protected static Offset
DEFAULT_OFFSET
protected Position
orientationPosition
The label is drawn along a line from the label position to the orientation position.protected Angle
rotation
Rotation to apply to symbol, computed each frame.protected java.lang.String
sidc
Identifier for this graphic.-
Fields inherited from class gov.nasa.worldwind.symbology.AbstractTacticalSymbol
activeAttrs, activeIconTexture, activeModifiers, altitudeMode, BEogsh, currentGlyphs, currentLabels, currentLines, DEFAULT_DEPTH_OFFSET, DEFAULT_GLYPH_ATLAS, DEFAULT_LABEL_LINES, DEFAULT_MAX_TIME_SINCE_LAST_USED, DEFAULT_UNITS_FORMAT, defaultAttrs, delegateOwner, depthOffset, dragEnabled, draggableSupport, enableBatchPicking, enableBatchRendering, formattedPosition, frameNumber, glyphAtlas, glyphMap, highlightAttrs, highlighted, iconOffset, iconRect, iconRetriever, iconSize, iconTexture, LAYOUT_ABSOLUTE, LAYOUT_NONE, LAYOUT_RELATIVE, LOADING_IMAGE_PATH, LODSelector, MAX_SYMBOL_DIMENSION, maxTimeSinceLastUsed, modifierRetriever, modifiers, normalAttrs, offset, pickLayer, pickSupport, position, showGraphicModifiers, showHostileIndicator, showLocation, showTextModifiers, staticLayoutRect, staticScreenRect, thisFramesOrderedSymbol, unitsFormat, unresolvedGlyph, visible
-
-
Constructor Summary
Constructors Constructor Description EchelonSymbol(java.lang.String sidc)
Constructs a new symbol with the specified position.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected AVList
assembleIconRetrieverParameters(AVList params)
protected Angle
computeRotation(Vec4 screenPoint, Vec4 orientationScreenPoint)
Compute the amount of rotation to apply to a label in order to keep it oriented toward its orientation position.protected void
computeTransform(DrawContext dc, AbstractTacticalSymbol.OrderedSymbol osym)
protected void
drawIcon(DrawContext dc)
Overridden to apply rotation.java.lang.String
getIdentifier()
Indicates a string identifier for this symbol.Position
getOrientationPosition()
Indicates the orientation position.void
setOrientationPosition(Position orientationPosition)
Specifies the orientation position.-
Methods inherited from class gov.nasa.worldwind.symbology.AbstractTacticalSymbol
addGlyph, addGlyph, addLabel, addLabel, addLine, addLine, applyImplicitModifiers, beginDrawing, computeMinTextLayout, computeScale, computeScaledBounds, computeScaledRect, computeScreenExtent, computeSymbolPoints, createPickedObject, determineActiveAttributes, doDrag, doDrawOrderedRenderable, drag, draw, drawBatched, drawGlyphs, drawGraphicModifiers, drawLabels, drawLines, drawOrderedRenderable, drawTextModifiers, endDrawing, getActiveAttributes, getAltitudeMode, getAttributes, getDelegateOwner, getDepthOffset, getFormattedPosition, getGlyph, getGlyphAtlas, getHighlightAttributes, getIconRetriever, getLODSelector, getMaxLabelLines, getMaxSymbolDimension, getModifier, getModifierRetriever, getOffset, getPosition, getReferencePosition, getUnitsFormat, intersectsFrustum, isDragEnabled, isEnableBatchPicking, isEnableBatchRendering, isHighlighted, isShowGraphicModifiers, isShowHostileIndicator, isShowLocation, isShowTextModifiers, isVisible, layout, layoutDynamicModifiers, layoutGraphicModifiers, layoutIcon, layoutLabelRect, layoutPoints, layoutRect, layoutStaticModifiers, layoutTextModifiers, makeOrderedRenderable, move, moveTo, mustDrawGraphicModifiers, mustDrawIcon, mustDrawTextModifiers, mustLayout, pick, prepareToDraw, removeDeadModifiers, render, reset, setAltitudeMode, setAttributes, setDelegateOwner, setDepthOffset, setDragEnabled, setEnableBatchPicking, setEnableBatchRendering, setGlyphAtlas, setHighlightAttributes, setHighlighted, setIconRetriever, setLODSelector, setModifier, setModifierRetriever, setOffset, setPosition, setShowGraphicModifiers, setShowHostileIndicator, setShowLocation, setShowTextModifiers, setUnitsFormat, setVisible
-
Methods inherited from class gov.nasa.worldwind.WWObjectImpl
onMessage, propertyChange
-
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, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
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
-
Methods inherited from interface gov.nasa.worldwind.event.MessageListener
onMessage
-
-
-
-
Field Detail
-
DEFAULT_OFFSET
protected static final Offset DEFAULT_OFFSET
-
sidc
protected java.lang.String sidc
Identifier for this graphic.
-
orientationPosition
protected Position orientationPosition
The label is drawn along a line from the label position to the orientation position.
-
rotation
protected Angle rotation
Rotation to apply to symbol, computed each frame.
-
-
Constructor Detail
-
EchelonSymbol
public EchelonSymbol(java.lang.String sidc)
Constructs a new symbol with the specified position. The position specifies the latitude, longitude, and altitude where this symbol is drawn on the globe. The position's altitude component is interpreted according to the altitudeMode.- Parameters:
sidc
- MIL-STD-2525C sidc code.- Throws:
java.lang.IllegalArgumentException
- ifsidc
is null, or does not contain a value for the Echelon field.
-
-
Method Detail
-
getOrientationPosition
public Position getOrientationPosition()
Indicates the orientation position. The label oriented on a line drawn from the label's position to the orientation position.- Returns:
- Position used to orient the label. May be null.
-
setOrientationPosition
public void setOrientationPosition(Position orientationPosition)
Specifies the orientation position. The label is oriented on a line drawn from the label's position to the orientation position. If the orientation position is null then the label is drawn with no rotation.- Parameters:
orientationPosition
- Draw label oriented toward this position.
-
getIdentifier
public java.lang.String getIdentifier()
Indicates a string identifier for this symbol. The format of the identifier depends on the symbol set to which this symbol belongs. For symbols belonging to the MIL-STD-2525 symbol set, this returns a 15-character alphanumeric symbol identification code (SIDC).- Returns:
- an identifier for this symbol.
-
assembleIconRetrieverParameters
protected AVList assembleIconRetrieverParameters(AVList params)
- Overrides:
assembleIconRetrieverParameters
in classAbstractTacticalSymbol
-
computeTransform
protected void computeTransform(DrawContext dc, AbstractTacticalSymbol.OrderedSymbol osym)
- Overrides:
computeTransform
in classAbstractTacticalSymbol
-
drawIcon
protected void drawIcon(DrawContext dc)
Overridden to apply rotation.- Overrides:
drawIcon
in classAbstractTacticalSymbol
-
computeRotation
protected Angle computeRotation(Vec4 screenPoint, Vec4 orientationScreenPoint)
Compute the amount of rotation to apply to a label in order to keep it oriented toward its orientation position.- Parameters:
screenPoint
- Geographic position of the text, projected onto the screen.orientationScreenPoint
- Orientation position, projected onto the screen.- Returns:
- The rotation angle to apply when drawing the label.
-
-