Provides utilities for Measurements.
- Source:
Methods
(static) addPosition(globe, positions, position, followTerrain) → {Array.<Position>}
Adds a position to a list of positions.
If the path is following the terrain the elevation is also computed.
Parameters:
Name | Type | Description |
---|---|---|
globe |
Globe | |
positions |
Array.<Position> | The list of positions to add to |
position |
Position | The position to add to the list |
followTerrain |
Boolean |
- Source:
Returns:
The list of positions
- Type
- Array.<Position>
(static) angleBetweenVectors(v1, v2) → {Number}
Computes the angle between two Vec3 in radians.
Parameters:
Name | Type | Description |
---|---|---|
v1 |
Vec3 | |
v2 |
Vec3 |
- Source:
Returns:
The ange in radians
- Type
- Number
(static) isLocationInside(location, locations) → {Boolean}
Determines whether a location is located inside a given polygon.
Parameters:
Name | Type | Description |
---|---|---|
location |
Location | |
locations |
Array.<Location> | The list of positions describing the polygon. Last one should be the same as the first one. |
- Source:
Returns:
true if the location is inside the polygon.
- Type
- Boolean
(static) subdividePositions(globe, positions, followTerrain, pathType, maxLength) → {Array.<Position>}
Subdivide a list of positions so that no segment is longer then the provided maxLength.
If needed, new intermediate positions will be created along lines that follow the given pathType one of WorldWind.LINEAR, WorldWind.RHUMB_LINE or WorldWind.GREAT_CIRCLE. All position elevations will be either at the terrain surface if followTerrain is true, or interpolated according to the original elevations.
Parameters:
Name | Type | Description |
---|---|---|
globe |
Globe | |
positions |
Array.<Position> | |
followTerrain |
Boolean | |
pathType |
String | One of WorldWind.LINEAR, WorldWind.RHUMB_LINE or WorldWind.GREAT_CIRCLE |
maxLength |
Number | The maximum length for one segment |
- Source:
Returns:
a list of positions with no segment longer then maxLength and elevations following
terrain or not.
- Type
- Array.<Position>