public class HoldingLine extends AbstractMilStd2525TacticalGraphic
Modifier and Type | Field and Description |
---|---|
protected double |
curvature
Scale factor that determines the curvature of the corners of the arc.
|
static double |
DEFAULT_CURVATURE
Scale factor that determines the curvature of the corners of the arc.
|
static int |
DEFAULT_NUM_INTERVALS
Default number of intervals used to draw the arc.
|
protected int |
intervals
Number of intervals used to draw the arc.
|
protected Path |
path
Path used to render the line.
|
protected Position |
position1
First control point, defines the start of the line.
|
protected Position |
position2
Second control point, defines the end of the line.
|
protected Position |
position3
Third control point, defines the top of the arc.
|
maskedSymbolCode, OUTLINE_STIPPLE_FACTOR_ANTICIPATED, OUTLINE_STIPPLE_FACTOR_PRESENT, OUTLINE_STIPPLE_PATTERN, symbolCode
activeOverrides, activeShapeAttributes, DEFAULT_HIGHLIGHT_MATERIAL, DEFAULT_LABEL_INTERIOR_OPACITY, delegateOwner, dragEnabled, draggableSupport, frameTimestamp, highlightAttributes, highlighted, labelOffset, labels, modifiers, mustCreateLabels, normalAttributes, showGraphicModifiers, showHostileIndicator, showLocation, showTextModifiers, text, unitsFormat, visible
Constructor and Description |
---|
HoldingLine(java.lang.String sidc)
Create a new Holding Line graphic.
|
Modifier and Type | Method and Description |
---|---|
protected void |
applyDelegateOwner(java.lang.Object owner)
Invoked each frame to apply to the current delegate owner to all renderable objects used to draw the graphic.
|
protected void |
computeArc(Globe globe,
java.util.List<Position> positions,
Position center,
Angle startAzimuth,
Angle endAzimuth,
double radius,
int intervals)
Compute the positions required to draw an arc.
|
protected void |
computeRoundCorner(Globe globe,
java.util.List<Position> positions,
Vec4 ptLeg1,
Vec4 ptVertex,
Vec4 ptLeg2,
double distance,
int intervals)
Compute positions to draw a rounded corner between three points.
|
protected void |
createLabels()
Create labels for the start and end of the path.
|
protected Path |
createPath()
Create and configure the Path used to render this graphic.
|
protected void |
createShape(DrawContext dc)
Create a Path to render the line.
|
protected void |
determineLabelPositions(DrawContext dc)
Determine positions for the start and end labels.
|
protected void |
doRenderGraphic(DrawContext dc)
Render this graphic, without modifiers.
|
double |
getCurvature()
Indicates a factor that controls the curvatures of the arcs in this graphic.
|
protected java.lang.String |
getGraphicLabel() |
int |
getIntervals()
Indicates the number of intervals used to draw the arc in this graphic.
|
java.lang.Iterable<? extends Position> |
getPositions()
Indicates the positions of the control points that place and orient the graphic.
|
Position |
getReferencePosition()
A position associated with the object that indicates its aggregate geographic position.
|
static java.util.List<java.lang.String> |
getSupportedGraphics()
Indicates the graphics supported by this class.
|
protected void |
onShapeChanged() |
void |
setCurvature(double curvature)
Specifies a factor that determines the curvature of the arcs in this graphic.
|
void |
setIntervals(int intervals)
Specifies the number of intervals used to draw the arc in this graphic.
|
void |
setPositions(java.lang.Iterable<? extends Position> positions)
Specifies the positions of the control points that place and orient the graphic.
|
applyDefaultAttributes, createSymbol, getDefaultMaterial, getIdentifier, getModifier, getOutlineStippleFactor, getOutlineStipplePattern, getStatus, getText, mustShowHostileIndicator, setModifier, setStatus
addLabel, applyLabelAttributes, applyOverrideAttributes, computeGeometry, computeLabelInteriorOpacity, determineActiveAttributes, determineDelegateOwner, determinePerFrameAttributes, doDrag, doRenderGraphicModifiers, doRenderTextModifiers, drag, getActiveDelegateOwner, getActiveOverrideAttributes, getActiveShapeAttributes, getAttributes, getDefaultLabelOffset, getDelegateOwner, getHighlightAttributes, getLabelMaterial, getLabelOffset, getUnitsFormat, isDragEnabled, isHighlighted, isShowGraphicModifiers, isShowHostileIndicator, isShowLocation, isShowTextModifiers, isVisible, move, moveTo, onModifierChanged, render, setAttributes, setDelegateOwner, setDragEnabled, setHighlightAttributes, setHighlighted, setLabelOffset, setShowGraphicModifiers, setShowHostileIndicator, setShowLocation, setShowTextModifiers, setText, setUnitsFormat, setVisible
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
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getAttributes, getDelegateOwner, getHighlightAttributes, getLabelOffset, getUnitsFormat, isShowGraphicModifiers, isShowHostileIndicator, isShowLocation, isShowTextModifiers, isVisible, setAttributes, setDelegateOwner, setHighlightAttributes, setLabelOffset, setShowGraphicModifiers, setShowHostileIndicator, setShowLocation, setShowTextModifiers, setText, setUnitsFormat, setVisible
render
isHighlighted, setHighlighted
addPropertyChangeListener, addPropertyChangeListener, clearList, copy, firePropertyChange, firePropertyChange, getEntries, getStringValue, getValue, getValues, hasKey, removeKey, removePropertyChangeListener, removePropertyChangeListener, setValue, setValues
protected double curvature
public static final double DEFAULT_CURVATURE
public static final int DEFAULT_NUM_INTERVALS
protected int intervals
protected Path path
protected Position position1
protected Position position2
protected Position position3
public HoldingLine(java.lang.String sidc)
sidc
- Symbol code the identifies the graphic.protected void applyDelegateOwner(java.lang.Object owner)
applyDelegateOwner
in class AbstractTacticalGraphic
owner
- Current delegate owner.protected void computeArc(Globe globe, java.util.List<Position> positions, Position center, Angle startAzimuth, Angle endAzimuth, double radius, int intervals)
globe
- Current globe.positions
- Add arc positions to this list.center
- Center point of the arc.startAzimuth
- Starting azimuth.endAzimuth
- Ending azimuth.radius
- Radius of the arc, in meters.intervals
- Number of intervals to generate.protected void computeRoundCorner(Globe globe, java.util.List<Position> positions, Vec4 ptLeg1, Vec4 ptVertex, Vec4 ptLeg2, double distance, int intervals)
globe
- Current globe.positions
- Positions will be added to this list.ptLeg1
- Point at the end of the one leg.ptVertex
- Point at the vertex of the corner.ptLeg2
- Point at the end of the other let.distance
- Distance from the vertex at which the arc should begin and end.intervals
- Number of intervals to use to generate the arc.protected void createLabels()
createLabels
in class AbstractTacticalGraphic
protected Path createPath()
protected void createShape(DrawContext dc)
dc
- Current draw context.protected void determineLabelPositions(DrawContext dc)
determineLabelPositions
in class AbstractTacticalGraphic
dc
- Current draw context.protected void doRenderGraphic(DrawContext dc)
doRenderGraphic
in class AbstractTacticalGraphic
dc
- Current draw context.AbstractTacticalGraphic.doRenderTextModifiers(gov.nasa.worldwind.render.DrawContext)
,
AbstractTacticalGraphic.doRenderGraphicModifiers(gov.nasa.worldwind.render.DrawContext)
public double getCurvature()
setCurvature(double)
protected java.lang.String getGraphicLabel()
public int getIntervals()
public java.lang.Iterable<? extends Position> getPositions()
public Position getReferencePosition()
public static java.util.List<java.lang.String> getSupportedGraphics()
protected void onShapeChanged()
public void setCurvature(double curvature)
curvature
- Factor that determines curvature of the arc.public void setIntervals(int intervals)
intervals
- Number of intervals for drawing the arc.public void setPositions(java.lang.Iterable<? extends Position> positions)
positions
- Control points that orient the graphic. Must provide at least three points.