What's the state of the art in Cesium for creating a Polygon with height and extrusion? For example, an airspace. I see one earlier forum post suggesting separate polygons representing TOP, BOTTOM, SIDE_A, SIDE_B, SIDE_C, SIDE_N. Is this work-around still the state of things for representing an airspace?
Thank you!
--
You received this message because you are subscribed to the Google Groups "cesium-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to cesium-dev+...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Thank you Matthew,
I was defining all my points like:
Cesium.Cartographic.fromDegrees(-95, 32.0, 10000),
then saying "extrudedHeight : 300000.0" when creating the Cesium.GeometryInstance instance:
Here's the correct code snippet:
var positions = ellipsoid.cartographicArrayToCartesianArray([
Cesium.Cartographic.fromDegrees(-95, 37.0),
Cesium.Cartographic.fromDegrees(-95, 32.0),
Cesium.Cartographic.fromDegrees(-90, 33.0),
Cesium.Cartographic.fromDegrees(-87, 31.0),
Cesium.Cartographic.fromDegrees(-87, 35.0)
]);
var bluePolygonOutlineInstance = new Cesium.GeometryInstance({
geometry : Cesium.PolygonOutlineGeometry.fromPositions({
positions : positions,
extrudedHeight : 300000.0,
height : 100000.0
}),
attributes : {
color : Cesium.ColorGeometryInstanceAttribute.fromColor(Cesium.Color.WHITE)
}
});