fromPositions
fun fromPositions(options: CoplanarPolygonGeometry.Companion.FromPositionsOptions): CoplanarPolygonGeometry(source)
A description of a coplanar polygon from an array of positions.
// create a polygon from points
const polygon = CoplanarPolygonGeometry.fromPositions({
positions : Cartesian3.fromDegreesArray([
-72.0, 40.0,
-70.0, 35.0,
-75.0, 30.0,
-70.0, 30.0,
-68.0, 40.0
])
});
const geometry = PolygonGeometry.createGeometry(polygon);
Content copied to clipboard