CesiumGS / cesium

An open-source JavaScript library for world-class 3D globes and maps :earth_americas:
https://cesium.com/cesiumjs/
Apache License 2.0
12.8k stars 3.46k forks source link

Polygons being culled incorrectly in 2D #1552

Open mramato opened 10 years ago

mramato commented 10 years ago

I have a CZML file (which I can share) that loads a bunch of Polygons at an altitude above the earth. It works great in 3D mode but the polygons disappear when in 2D. They do show up in Columbus View when zoomed out, but get culled when you try and zoom anywhere near them. I've scene similar things with other geometry types, so I'm not sure if this is a polygon specific issue or a problem with Geometry on the whole.

mramato commented 10 years ago

With #1551 this is now easy to see that the bounding volume is very wrong in CV. I think the problem is 2D has something to do with the bounding volume being close to the center of the earth.

image

That strip of dark polygons near the bottom of the image is the Primitive, as you can see, the bounding sphere is no where near it.

kring commented 10 years ago

I think there's a pretty good chance that fixing #1539 will fix this as well.

bagnell commented 9 years ago

This was only partially fixed by #2269. Polygons on the surface will still disappear in 2D.

hpinkos commented 7 years ago

Code example:

var viewer = new Cesium.Viewer('cesiumContainer');

viewer.entities.add({
    polygon : {
        hierarchy : Cesium.Cartesian3.fromDegreesArray([-115.0, 37.0,
                                                        -115.0, 32.0,
                                                        -107.0, 33.0,
                                                        -102.0, 31.0,
                                                        -102.0, 35.0]),
        material : Cesium.Color.RED,
        height: 3000000
    }
});