Hi,
I'm trying to create 'flat' rings with cesium. After seeing that
Polyline would create a 'donut', I opted for a polygon hierarchy
instead. but it doesn't seem to work.
for one, if I create a polygon the following way:
var center = new Cesium.Cartographic(0.2930215893394521,
0.818292397338644, 1880.6159971414636);
var radius = 10000;
var outer = Cesium.Shapes.computeCircleBoundary(
ellipsoid,
ellipsoid.cartographicToCartesian(center),
radius);
var polygon = new Cesium.Polygon();
polygon.configureFromPolygonHierarchy({
positions: outer
});
primitives.add(polygon);
then it seems that the polygon will appear / disappear when being zoomed
in on it. like some culling algorithm determines it should not be displayed.
if I try to create a ring from it:
var center = new Cesium.Cartographic(0.2930215893394521,
0.818292397338644, 1880.6159971414636);
var radius = 10000;
var outer = Cesium.Shapes.computeCircleBoundary(
ellipsoid,
ellipsoid.cartographicToCartesian(center),
radius);
var inner = Cesium.Shapes.computeCircleBoundary(
ellipsoid,
ellipsoid.cartographicToCartesian(center),
radius * 0.8);
var polygon = new Cesium.Polygon();
polygon.configureFromPolygonHierarchy({
positions: outer,
holes: [{ positions: inner }]
});
primitives.add(polygon);
then Cesium will hang
I wonder what am I doing wrong?
Akos