public class OmnidirectionalSightline extends AbstractRenderable implements Attributable, Highlightable, Movable
OmnidirectionalSightline displays an overlay on the WorldWind terrain indicating which terrain features are visible, and which are occluded. Visible terrain features, those having a direct line-of-sight to the center position, appear in the sightline's normal attributes or its highlight attributes, depending on the highlight state. Occluded terrain features appear in the sightline's occlude attributes, regardless of highlight state. Terrain features outside the sightline's range are excluded from the overlay.
| Constructor and Description |
|---|
OmnidirectionalSightline(Position position,
double range)
Constructs an OmnidirectionalSightline that displays the line-of-sight from a specified center position and
range.
|
OmnidirectionalSightline(Position position,
double range,
ShapeAttributes attributes)
Constructs an OmnidirectionalSightline that displays the line-of-sight from a specified center position and
range.
|
| Modifier and Type | Method and Description |
|---|---|
int |
getAltitudeMode()
Indicates the altitude mode associated with this sightline's position.
|
ShapeAttributes |
getAttributes()
Indicates this sightline's "normal" attributes.
|
ShapeAttributes |
getHighlightAttributes()
Indicates this sightline's "highlight" attributes.
|
ShapeAttributes |
getOccludeAttributes()
Indicates this sightline's "occlude" attributes.
|
Position |
getPosition()
Indicates the geographic position where this sightline is centered.
|
double |
getRange()
Indicates this sightline's range.
|
Position |
getReferencePosition()
A position associated with the object that indicates its aggregate geographic position.
|
boolean |
isHighlighted()
Indicates whether this sightline's overlay uses its highlight attributes rather than its normal attributes for
visible features.
|
void |
moveTo(Globe globe,
Position position)
Moves the sightline over the globe's surface.
|
OmnidirectionalSightline |
setAltitudeMode(int altitudeMode)
Sets the altitude mode associated with this sightline's position.
|
void |
setAttributes(ShapeAttributes attributes)
Sets this sightline's "normal" attributes to the supplied attributes bundle.
|
void |
setHighlightAttributes(ShapeAttributes highlightAttributes)
Sets this sightline's "highlight" attributes.
|
void |
setHighlighted(boolean highlighted)
Sets the highlighted state of this sightline, which indicates whether this sightline's overlay uses its highlight
attributes rather than its normal attributes for visible features.
|
void |
setOccludeAttributes(ShapeAttributes occludeAttributes)
Sets this sightline's "occlude" attributes.
|
OmnidirectionalSightline |
setPosition(Position position)
Sets this sightline's geographic position to the values in the supplied position.
|
OmnidirectionalSightline |
setRange(double meters)
Sets this sightline's range.
|
getDisplayName, getPickDelegate, getUserProperty, hasUserProperty, isEnabled, putUserProperty, removeUserProperty, render, setDisplayName, setEnabled, setPickDelegatepublic OmnidirectionalSightline(Position position, double range)
position - the position where the sightline is centeredrange - the sightline's range in meters from its positionjava.lang.IllegalArgumentException - If the position is null, or if the range is negativepublic OmnidirectionalSightline(Position position, double range, ShapeAttributes attributes)
position - the position where the sightline is centeredrange - the sightline's range in meters from its positionattributes - a reference to an attributes bundle used by this sightline when not highlightedjava.lang.IllegalArgumentException - If the position is null, or if the range is negativepublic Position getPosition()
public OmnidirectionalSightline setPosition(Position position)
position - the new position where this sightline is centeredjava.lang.IllegalArgumentException - If the position is nullpublic int getAltitudeMode()
WorldWind.AltitudeMode for possiblepublic OmnidirectionalSightline setAltitudeMode(int altitudeMode)
altitudeMode - the new altitude mode, see WorldWind.AltitudeMode for acceptable
valuespublic double getRange()
public OmnidirectionalSightline setRange(double meters)
meters - this sightline's range in metersjava.lang.IllegalArgumentException - If the range is negativepublic ShapeAttributes getAttributes()
getAttributes in interface Attributablepublic void setAttributes(ShapeAttributes attributes)
setAttributes in interface Attributableattributes - a reference to an attributes bundle used by this sightline when not highlightedpublic ShapeAttributes getHighlightAttributes()
getHighlightAttributes in interface Attributablepublic void setHighlightAttributes(ShapeAttributes highlightAttributes)
setHighlightAttributes in interface AttributablehighlightAttributes - a reference to the attributes bundle used by this sightline when highlightedpublic ShapeAttributes getOccludeAttributes()
public void setOccludeAttributes(ShapeAttributes occludeAttributes)
It is permissible to share attribute bundles between sightlines.
occludeAttributes - a reference to an attributes bundle used by this sightline when occludedpublic boolean isHighlighted()
isHighlighted in interface Highlightablepublic void setHighlighted(boolean highlighted)
setHighlighted in interface Highlightablehighlighted - true to highlight this sightline, and false otherwisepublic Position getReferencePosition()
getReferencePosition in interface MovablegetPosition()public void moveTo(Globe globe, Position position)
setPosition(Position).