Package-level declarations

Types

Link copied to clipboard
abstract class AbstractMesh(attributes: ShapeAttributes) : AbstractShape

Provides an abstract base class for mesh shapes.

Link copied to clipboard

Base class for all geometric shapes.

Link copied to clipboard
interface Attributable

Interface to controlling a shape's attributes. Shapes implementing this interface use the ShapeAttributes bundle for specifying the normal attributes and the highlight attributes.

Link copied to clipboard
open class Ellipse @JvmOverloads constructor(center: Position, majorRadius: Double, minorRadius: Double, attributes: ShapeAttributes = ShapeAttributes()) : AbstractShape

Ellipse shape defined by a geographic center position and radii for the semi-major and semi-minor axes.

Axes and Heading


Ellipse axes, by default, are oriented such that the semi-major axis points East and the semi-minor axis points North. Ellipse provides an optional heading, which when set to anything other than 0.0 rotates the semi-major and semi-minor axes about the center position, while retaining the axes relative relationship to one another. Heading is defined clockwise from North. Configuring ellipse with a heading of 45.0 results in the semi-major axis pointing Southeast and the semi-minor axis pointing Northeast.

Altitude Mode and Terrain Following


Ellipse geometry displays at a constant altitude determined by the geographic center position and altitude mode. For example, an ellipse with a center position altitude of 1km and altitude mode of ABSOLUTE displays at 1km above mean sea level. The same ellipse with an altitude mode of RELATIVE_TO_GROUND displays at 1km above ground level, relative to the ellipse's center location.
Surface ellipse geometry, where an ellipse appears draped across the terrain, may be achieved by enabling ellipse's terrain following state and setting its altitude mode to CLAMP_TO_GROUND. See isFollowTerrain and altitudeMode.

Display Granularity


Ellipse's appearance on screen is composed of discrete segments which approximate the ellipse's geometry. This approximation is chosen such that the display appears to be a continuous smooth ellipse. Applications can control the maximum number of angular intervals used in this representation with maximumIntervals.

Link copied to clipboard
open class Ellipsoid @JvmOverloads constructor(center: Position, xRadius: Double, yRadius: Double, zRadius: Double, attributes: ShapeAttributes = ShapeAttributes()) : AbstractMesh

3D ellipsoid centered at a geographic position. Supports three independent semi-axes for a tri-axial ellipsoid; pass xRadius == yRadius for a rotation spheroid (the common "two-radius" case of one equatorial radius paired with a polar radius).

Link copied to clipboard
open class GeographicMesh(positions: Array<Array<Position>>, attributes: ShapeAttributes = ShapeAttributes()) : AbstractMesh, IRayIntersectable

Represents a 3D geographic mesh.

Link copied to clipboard
interface Highlightable

Interface to control a shape's highlighting. Shapes implementing this interface have their own highlighting behaviors and attributes and the means for setting them.

Link copied to clipboard
data class Intersection(val position: Position, val distance: Double)

Represents an intersection result.

Link copied to clipboard

Provides a common API for 3D shapes that support ray intersection.

Link copied to clipboard
open class Label @JvmOverloads constructor(position: Position, var text: String? = null, var attributes: TextAttributes = TextAttributes()) : AbstractRenderable, Highlightable, Movable

Represents a label at a geographic position. Labels display one or more lines of text, separated by '\n', according to specified TextAttributes. Lines are aligned inside the text block by the horizontal fraction of TextAttributes.textOffset anchor: 0 = left, 0.5 = center, 1 = right.

Link copied to clipboard
interface Movable
Link copied to clipboard

Orientation mode indicates how WorldWind interprets a renderable's orientation value, e.g., tilt and rotate values. Accepted values are RELATIVE_TO_GLOBE, and RELATIVE_TO_SCREEN.

Link copied to clipboard
open class Path @JvmOverloads constructor(positions: List<Position>, attributes: ShapeAttributes = ShapeAttributes()) : AbstractShape
Link copied to clipboard

Path type indicates how WorldWind create a geographic path between two locations. Accepted values are GREAT_CIRCLE, LINEAR and RHUMB_LINE.

Link copied to clipboard
open class Placemark @JvmOverloads constructor(position: Position, var attributes: PlacemarkAttributes = PlacemarkAttributes(), var label: String? = null) : AbstractRenderable, Highlightable, Movable

Represents a Placemark shape. A placemark displays an image, a label and a leader connecting the placemark's geographic position to the ground. All three of these items are optional. By default, the leader is not pickable. See Placemark.isLeaderPickingEnabled.
Placemarks may be drawn with either an image or as single-color square with a specified size. When the placemark attributes indicate a valid image, the placemark's image is drawn as a rectangle in the image's original dimensions, scaled by the image scale attribute. Otherwise, the placemark is drawn as a square with width and height equal to the value of the image scale attribute, in pixels, and color equal to the image color attribute.

Link copied to clipboard
open class PlacemarkAttributes(var imageSource: ImageSource?, imageColor: Color, imageOffset: Offset, var imageScaleX: Double, var imageScaleY: Double, var minimumImageScale: Double, var isDrawLabel: Boolean, var isDrawLeader: Boolean, var isDepthTest: Boolean, labelAttributes: TextAttributes, leaderAttributes: ShapeAttributes)

Holds attributes applied to Placemark shapes. The defaults indicate a placemark displayed as a white 1x1 pixel square centered on the placemark's geographic position.

Link copied to clipboard
open class PointMemo

Per-shape memo of the window-independent terms of a geographic to Cartesian conversion, reused across frames and rendering windows by point shapes (Placemark, Label).

Link copied to clipboard
open class Polygon @JvmOverloads constructor(positions: List<Position> = emptyList(), attributes: ShapeAttributes = ShapeAttributes()) : AbstractShape
Link copied to clipboard
open class ProjectedMediaSurface @JvmOverloads constructor(bottomLeft: Location, bottomRight: Location, topRight: Location, topLeft: Location, attributes: ShapeAttributes = ShapeAttributes()) : AbstractShape
Link copied to clipboard
Link copied to clipboard
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.

Link copied to clipboard
open class ScreenImage(imageSource: ImageSource, screenOffset: Offset = Offset.bottomLeft(), imageOffset: Offset = Offset.bottomLeft(), var imageScale: Double = 1.0, var imageRotation: Angle = Angle.ZERO, color: Color = Color(1f, 1f, 1f, 1f)) : AbstractRenderable
Link copied to clipboard
open class ShapeAttributes(var isDrawInterior: Boolean, var isDrawOutline: Boolean, var isDrawVerticals: Boolean, var isDepthTest: Boolean, var isLightingEnabled: Boolean, interiorColor: Color, outlineColor: Color, var outlineWidth: Float, var interiorImageSource: ImageSource?, var outlineImageSource: ImageSource?, var isPickInterior: Boolean, var isPickOutline: Boolean, var shadowMode: ShadowMode = ShadowMode.ENABLED)

Holds attributes applied to geographic shapes.

Link copied to clipboard

Decal that projects an image (CPU-loaded) or a Texture (GPU-resident) onto the terrain over sector. Use the imageSource constructor for the typical bitmap/URL path (the texture is resolved via RenderContext.getTexture and cached in RenderResourceCache); use the texture constructor when the data already lives on the GPU — e.g. the output of a render-to-texture pass — to skip the upload round-trip entirely.

Link copied to clipboard
open class TextAttributes

Holds attributes applied to text shapes and Placemark labels.

Link copied to clipboard
open class TiledSurfaceImage(tileFactory: TileFactory, levelSet: LevelSet) : AbstractRenderable
Link copied to clipboard
open class TriangleMesh(positions: Array<Position>, indices: IntArray, attributes: ShapeAttributes = ShapeAttributes()) : AbstractMesh, IRayIntersectable

Represents a 3D triangle mesh.

Link copied to clipboard
sealed class ViewshedArea

The geographic footprint that a ViewshedSightline analyses.

Link copied to clipboard
open class ViewshedSightline @JvmOverloads constructor(position: Position, area: ViewshedArea, samplesPerSide: Int = 1024, var attributes: ShapeAttributes = ShapeAttributes()) : AbstractRenderable, Attributable, Highlightable, Movable

Visibility-from-observer overlay computed against the source elevation model rather than the rendered terrain mesh. Sampling resolution is decoupled from the camera's terrain LoD, so far-away coverage areas remain accurate even when the visible terrain tiles are coarse.