Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Polygon entities are classifying 3D Tiles by default #6195

Closed
lilleyse opened this issue Feb 8, 2018 · 5 comments
Closed

Polygon entities are classifying 3D Tiles by default #6195

lilleyse opened this issue Feb 8, 2018 · 5 comments

Comments

@lilleyse
Copy link
Contributor

lilleyse commented Feb 8, 2018

Any polygon created with the entity API is classifying 3D Tiles by default, but it should instead appear underneath.

@bagnell could you take a look at this?

Reported on the forum: https://groups.google.com/forum/#!topic/cesium-dev/leIJUfQ37ro

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

Cesium.CesiumIon.create3DTileset(1458, { accessToken: 'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJqdGkiOiIxYmJiNTAxOC1lOTg5LTQzN2EtODg1OC0zMWJjM2IxNGNlYmMiLCJpZCI6NDQsImFzc2V0cyI6WzE0NThdLCJpYXQiOjE0OTkyNjM4MjB9.1WKijRa-ILkmG6utrhDWX6rDgasjD7dZv-G5ZyCmkKg' })
    .then(function(tileset) {
        viewer.scene.primitives.add(tileset);
        viewer.zoomTo(tileset);
    });

viewer.entities.add({
    polygon : {
        hierarchy : new Cesium.PolygonHierarchy(Cesium.Cartesian3.fromRadiansArray([-1.3194369277314022, 0.6988062530900625, -1.3193955980204217, 0.6988091578771254, -1.3193931220959367, 0.698743632490865, -1.3194358224045408, 0.6987471965556998])),
        material : Cesium.Color.RED
    }
});

polygons-on-3dtiles

@bagnell
Copy link
Contributor

bagnell commented Feb 8, 2018

I'm not sure if this is the right fix, but you can change GroundPrimitive.classificationType to default to TERRAIN instead of BOTH. The other option would be to add that option to entities.

@lilleyse
Copy link
Contributor Author

lilleyse commented Feb 9, 2018

I think adding the option to entities make sense. Having it default to BOTH is probably fine, but the entity API should allow control of it.

Also maybe this is obvious, but why does a polygon default to being a ground primitive?

@hpinkos
Copy link
Contributor

hpinkos commented Feb 12, 2018

@lilleyse everything defaults to being a ground primitive through the Entity API unless you specify height. This is so it contours to terrain by default.

@hpinkos
Copy link
Contributor

hpinkos commented Feb 26, 2018

@bagnell @lilleyse We need to fix this before March 1st

@cesium-concierge
Copy link

Congratulations on closing the issue! I found these Cesium forum links in the comments above:

https://groups.google.com/forum/#!topic/cesium-dev/leIJUfQ37ro

If this issue affects any of these threads, please post a comment like the following:

The issue at #6195 has just been closed and may resolve your issue. Look for the change in the next stable release of Cesium or get it now in the master branch on GitHub https://github.com/AnalyticalGraphicsInc/cesium.


I am a bot who helps you make Cesium awesome! Contributions to my configuration are welcome.

🌍 🌎 🌏

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants