RealtimeSightline

open class RealtimeSightline @JvmOverloads constructor(position: Position, range: Double, var heading: Angle = ZERO, fieldOfView: Angle = POS360, var attributes: ShapeAttributes = ShapeAttributes()) : AbstractRenderable, Attributable, Highlightable, Movable

Displays a realtime sightline's visibility within the WorldWind scene, resolved every frame against the rendered geometry (terrain and world-space 3D content such as 3D Tiles meshes, filled shapes and COLLADA models) — unlike ViewshedSightline, which ray-marches a static elevation grid. The sightline's placement and coverage are defined by a center position, a range, and a horizontal wedge given by heading and fieldOfView; the default 360-degree field of view covers the full sphere (the former OmnidirectionalSightline), while narrower angles model directional sensors (the former DirectionalSightline, no longer limited to 90).
Terrain and scene features within the coverage appear in the sightline's normal attributes or its highlight attributes when there is a direct line-of-sight to the center position, and in the occlude attributes otherwise. Features outside the range or wedge are untinted.

Limitations and Planned Improvements

Surface decals and screen-space sprites such as placemarks and leader lines are intentionally excluded as they do not represent occluding volumes. The visibility overlay is drawn in ShapeAttributes' interior color only. Requires a depth-texture-capable context (GLES3 / WebGL2 / desktop GL3+); on older contexts the sightline is not rendered.

Constructors

Link copied to clipboard
constructor(position: Position, range: Double, heading: Angle = ZERO, fieldOfView: Angle = POS360, attributes: ShapeAttributes = ShapeAttributes())

Properties

Link copied to clipboard
open override var altitudeMode: AltitudeMode

The sightline's altitude mode. See AltitudeMode

Link copied to clipboard
open override var attributes: ShapeAttributes

Indicates this sightline's "normal" attributes. These attributes are used for the sightline's overlay when the highlighted flag is false, and there is a direct line-of-sight from the sightline's center position to a terrain feature. If null and this sightline is not highlighted, visible terrain features are excluded from the overlay.

Link copied to clipboard
open override var displayName: String?
Link copied to clipboard

The sightline's horizontal field of view about heading. Elevation coverage above the horizon is capped at half the field of view for angles below 180 degrees. A zero field of view is an empty wedge; the sightline renders nothing.

Link copied to clipboard

The sightline's heading clockwise from North. Irrelevant at the default 360-degree field of view.

Link copied to clipboard

The attributes to use for visible features, when the sightline is highlighted.

Link copied to clipboard
open override var isEnabled: Boolean
Link copied to clipboard
open override var isHighlighted: Boolean

Determines whether the normal or highlighted attributes should be used for visible features.

Link copied to clipboard
open override var isPickEnabled: Boolean
Link copied to clipboard
open override val isPointShape: Boolean

true when this shape's referencePosition coincides with where the user actually sees the shape (Placemark, Label, sightlines — the reference is the rendered location). false for shapes whose reference is computed from extended geometry and may sit far from where the user grabbed (Polygon centroid, Path centroid, Mesh).

Link copied to clipboard

The attributes to use for occluded features.

Link copied to clipboard
open override var pickDelegate: Any?
Link copied to clipboard

Indicates the geographic position where this sightline is centered.

Link copied to clipboard

Indicates this sightline's range. Range represents the sightline's transmission distance in meters from its center position.

Link copied to clipboard
open override val referencePosition: Position

A position associated with the object that indicates its aggregate geographic position. For a RealtimeSightline, this is simply it's position property.

Link copied to clipboard
open override var zOrder: Double

Functions

Link copied to clipboard
open override fun <T> getUserProperty(key: Any): T?
Link copied to clipboard
open override fun hasUserProperty(key: Any): Boolean
Link copied to clipboard
open override fun moveTo(globe: Globe, position: Position)

Moves the sightline over the globe's surface.

Link copied to clipboard
open override fun putUserProperty(key: Any, value: Any): Any?
Link copied to clipboard
open override fun removeUserProperty(key: Any): Any?
Link copied to clipboard
open override fun render(rc: RenderContext)