Class: SurfaceEllipse

SurfaceEllipse(center, majorRadius, minorRadius, heading, attributes)

Represents an ellipse draped over the terrain surface.

SurfaceEllipse uses the following attributes from its associated shape attributes bundle:

  • Draw interior
  • Draw outline
  • Interior color
  • Outline color
  • Outline width
  • Outline stipple factor
  • Outline stipple pattern

Constructor

new SurfaceEllipse(center, majorRadius, minorRadius, heading, attributes)

Constructs a surface ellipse with a specified center and radii and an optional attributes bundle.
Parameters:
Name Type Description
center Location The ellipse's center location.
majorRadius Number The ellipse's major radius in meters.
minorRadius Number The ellipse's minor radius in meters.
heading Number The heading of the major axis in degrees.
attributes ShapeAttributes The attributes to apply to this shape. May be null, in which case attributes must be set directly before the shape is drawn.
Source:
Throws:
If the specified center location is null or undefined or if either specified radii is negative.
Type
ArgumentError

Extends

Members

(static) DEFAULT_NUM_INTERVALS :Number

The default number of intervals the ellipse generates.
Type:
  • Number
Source:

(static) MIN_NUM_INTERVALS :Number

The minimum number of intervals the ellipse generates.
Type:
  • Number
Source:

attributes :ShapeAttributes

The shape's attributes. If null and this shape is not highlighted, this shape is not drawn.
Type:
Inherited From:
Default Value:
Source:

center :Location

This shape's center location.
Type:
Source:

displayName :String

The shape's display name and label text.
Type:
  • String
Inherited From:
Default Value:
  • Surface Shape
Source:

enabled :Boolean

Indicates whether this shape is drawn.
Type:
  • Boolean
Inherited From:
Default Value:
  • true
Source:

expirationInterval :Number

Indicates how long to use terrain-specific shape data before regenerating it, in milliseconds. A value of zero specifies that shape data should be regenerated every frame. While this causes the shape to adapt more frequently to the terrain, it decreases performance.
Type:
  • Number
Inherited From:
Default Value:
  • 2000 (milliseconds)
Source:

heading :Number

The heading of the major axis, specified as degrees clockwise from North.
Type:
  • Number
Default Value:
  • 0
Source:

highlightAttributes :ShapeAttributes

The attributes used when this shape's highlighted flag is true. If null and the highlighted flag is true, this shape's normal attributes are used. If they, too, are null, this shape is not drawn.
Type:
Inherited From:
Default Value:
  • null
Source:

highlighted :Boolean

Indicates whether this shape displays with its highlight attributes rather than its normal attributes.
Type:
  • Boolean
Inherited From:
Default Value:
  • false
Source:

intervals :Number

The number of intervals to generate locations for.
Type:
  • Number
Default Value:
  • SurfaceEllipse.DEFAULT_NUM_INTERVALS
Source:

majorRadius :Number

This shape's major radius, in meters.
Type:
  • Number
Source:

maximumNumEdgeIntervals :Number

The maximum number of intervals an edge will be broken into. This is the number of intervals that an edge that spans to opposite side of the globe would be broken into. This is strictly an upper bound and the number of edge intervals may be lower if this resolution is not needed.
Type:
  • Number
Inherited From:
Default Value:
  • SurfaceShape.DEFAULT_NUM_EDGE_INTERVALS
Source:

minorRadius :Number

This shape's minor radius in meters.
Type:
  • Number
Source:

pathType :String

The path type to used to interpolate between locations on this shape. Recognized values are:
  • WorldWind.GREAT_CIRCLE
  • WorldWind.RHUMB_LINE
  • WorldWind.LINEAR
Type:
  • String
Inherited From:
Default Value:
  • WorldWind.GREAT_CIRCLE
Source:

pickDelegate :Object

Indicates the object to return as the owner of this shape when picked.
Type:
  • Object
Inherited From:
Default Value:
  • null
Source:

polarThrottle :Number

A dimensionless number that controls throttling of edge traversal near the poles where edges need to be sampled more closely together. A value of 0 indicates that no polar throttling is to be performed.
Type:
  • Number
Inherited From:
Default Value:
  • SurfaceShape.DEFAULT_POLAR_THROTTLE
Source:

sector :Sector

Defines the extent of the shape in latitude and longitude. This sector only has valid data once the boundary is defined. Prior to this, it is null.
Type:
Inherited From:
Source:

userProperties :Object

An application defined object associated with this renderable. A typical use case is to associate application defined data with a picked renderable.
Type:
  • Object
Inherited From:
Default Value:
  • An empty object
Source:

Methods

area(globe, terrainConformant)

Returns this shape's area in square meters.
Parameters:
Name Type Description
globe Globe The globe on which to compute the area.
terrainConformant Boolean If true, the returned area is that of the terrain, including its hillsides and other undulations. If false, the returned area is the shape's projected area.
Inherited From:
Source:

computeExtent(dc) → {BoundingBox}

Computes the extent for the shape based on its sectors.
Parameters:
Name Type Description
dc DrawContext The drawing context containing a globe.
Inherited From:
Source:
Returns:
The extent for the shape.
Type
BoundingBox

computeSectors(dc) → {Array.<Sector>}

Computes the bounding sectors for the shape. There will be more than one if the shape crosses the date line, but does not enclose a pole.
Parameters:
Name Type Description
dc DrawContext The drawing context containing a globe.
Inherited From:
Source:
Returns:
Bounding sectors for the shape.
Type
Array.<Sector>

computeShiftedLocations(globe, oldLocation, newLocation, locations) → {Array.<Location>}

Computes a new set of locations translated from a specified location to a new location for a shape.
Parameters:
Name Type Description
globe Globe The globe on which to compute a new set of locations.
oldLocation Location The original reference location.
newLocation Location The new reference location.
locations Array.<Location> The locations to translate.
Inherited From:
Source:
Returns:
The translated locations.
Type
Array.<Location>

(protected) createShapeDataObject() → {Object}

Creates a new shape data object for the current globe state. Subclasses may override this method to modify the shape data object that this method creates, but must also call this method on this base class. Applications do not call this method.
Inherited From:
Source:
Returns:
The shape data object.
Type
Object

get()

A hash key of the total visible external state of the surface shape.
Inherited From:
Source:

(protected) isShapeDataCurrent(dc, shapeData) → {Boolean}

Indicates whether a specified shape data object is current. Subclasses may override this method to add criteria indicating whether the shape data object is current, but must also call this method on this base class. Applications do not call this method.
Parameters:
Name Type Description
dc DrawContext The current draw context.
shapeData Object The object to validate.
Inherited From:
Source:
Returns:
true if the object is current, otherwise false.
Type
Boolean

render(dc)

Render this renderable. Some shapes actually draw themselves during this call, others only add themselves to the draw context's ordered rendering list for subsequent drawing when their renderOrdered method is called. This method is intended to be called by layers such as RenderableLayer and not by applications.
Parameters:
Name Type Description
dc DrawContext The current draw context.
Inherited From:
Source:

renderToTexture(dc, ctx2D, xScale, yScale, dx, dy)

Internal use only. Render the shape onto the texture map of the tile.
Parameters:
Name Type Description
dc DrawContext The draw context to render onto.
ctx2D CanvasRenderingContext2D The rendering context for SVG.
xScale Number The multiplicative scale factor in the horizontal direction.
yScale Number The multiplicative scale factor in the vertical direction.
dx Number The additive offset in the horizontal direction.
dy Number The additive offset in the vertical direction.
Inherited From:
Source: