Polyline geometry processing functions, including arc generation and subdivision.
Methods
Subdivides polyline and raises all points to the specified height. Returns an array of numbers to represent the positions.
| Name | Type | Description | ||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
options |
object |
Object with the following properties:
|
Returns:
A new array of positions of type {number} that have been subdivided and raised to the surface of the ellipsoid.
Example:
const positions = Cesium.Cartesian3.fromDegreesArray([
-105.0, 40.0,
-100.0, 38.0,
-105.0, 35.0,
-100.0, 32.0
]);
const surfacePositions = Cesium.PolylinePipeline.generateArc({
positons: positions
});
static Cesium.PolylinePipeline.generateCartesianArc(options) → Array.<Cartesian3>
Subdivides polyline and raises all points to the specified height. Returns an array of new {Cartesian3} positions.
| Name | Type | Description | ||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
options |
object |
Object with the following properties:
|
Returns:
A new array of cartesian3 positions that have been subdivided and raised to the surface of the ellipsoid.
Example:
const positions = Cesium.Cartesian3.fromDegreesArray([
-105.0, 40.0,
-100.0, 38.0,
-105.0, 35.0,
-100.0, 32.0
]);
const surfacePositions = Cesium.PolylinePipeline.generateCartesianArc({
positons: positions
});
static Cesium.PolylinePipeline.generateCartesianRhumbArc(options) → Array.<Cartesian3>
Subdivides polyline and raises all points to the specified height using Rhumb Lines. Returns an array of new {Cartesian3} positions.
| Name | Type | Description | ||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
options |
object |
Object with the following properties:
|
Returns:
A new array of cartesian3 positions that have been subdivided and raised to the surface of the ellipsoid.
Example:
const positions = Cesium.Cartesian3.fromDegreesArray([
-105.0, 40.0,
-100.0, 38.0,
-105.0, 35.0,
-100.0, 32.0
]);
const surfacePositions = Cesium.PolylinePipeline.generateCartesianRhumbArc({
positons: positions
});
Subdivides polyline and raises all points to the specified height using Rhumb lines. Returns an array of numbers to represent the positions.
| Name | Type | Description | ||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
options |
object |
Object with the following properties:
|
Returns:
A new array of positions of type {number} that have been subdivided and raised to the surface of the ellipsoid.
Example:
const positions = Cesium.Cartesian3.fromDegreesArray([
-105.0, 40.0,
-100.0, 38.0,
-105.0, 35.0,
-100.0, 32.0
]);
const surfacePositions = Cesium.PolylinePipeline.generateRhumbArc({
positons: positions
});
Breaks a
Polyline into segments such that it does not cross the ±180 degree meridian of an ellipsoid.
| Name | Type | Default | Description |
|---|---|---|---|
positions |
Array.<Cartesian3> | The polyline's Cartesian positions. | |
modelMatrix |
Matrix4 |
Matrix4.IDENTITY
|
optional The polyline's model matrix. Assumed to be an affine transformation matrix, where the upper left 3x3 elements are a rotation matrix, and the upper three elements in the fourth column are the translation. The bottom row is assumed to be [0, 0, 0, 1]. The matrix is not verified to be in the proper form. |
Returns:
An object with a
positions property that is an array of positions and a
segments property.
- PolygonPipeline.wrapLongitude
- Polyline
- PolylineCollection
Example:
const polylines = new Cesium.PolylineCollection();
const polyline = polylines.add(...);
const positions = polyline.positions;
const modelMatrix = polylines.modelMatrix;
const segments = Cesium.PolylinePipeline.wrapLongitude(positions, modelMatrix);
