how to change clippingPlanes to clippingPolygons ?

**i am very excited to see that cesium 1.40 support ****clipping model by a clippingPlane list,but in my case, i want to change planes to polygons (created by point list) instead of ****rectangle,********how to do ? **

Hi there,

Clipping planes are actually going to be in the 1.41 release. In the meantime, you can clone the Cesium GitHub repo if you’d like to use them sooner.

If you need an arbitrary concave region, you can use multiple planes, and only the regions that intersect will be clipped. For example here, we use multiple planes to create a square clipping region.

The visual plane slider are entities, so you can swap those for another entity type out if you need.

Thanks,

Gabby

Hi Gabby,
Thank you for your quick replay, i want to change Clipping plane’s shape to a polygon like the picture show below. Thanks

在 2017年12月7日星期四 UTC+8上午5:50:03,Gabby Getz写道:

Is that possible for using clippingPlane to clip the underground?

GHT, You would be able to create a region shaped like that, yes. However it will discard the surface rather than pushing it down.

Ping Yang, you can also use clipping planes to discard parts of the globe surface like so:

var globe = viewer.scene.globe;

globe.clippingPlanes = new Cesium.ClippingPlaneCollection({

planes : [

    new Cesium.Plane(new Cesium.Cartesian3( 1.0,  0.0, 0.0), 700.0),

    new Cesium.Plane(new Cesium.Cartesian3(-1.0,  0.0, 0.0), 700.0),

    new Cesium.Plane(new Cesium.Cartesian3( 0.0,  1.0, 0.0), 700.0),

    new Cesium.Plane(new Cesium.Cartesian3( 0.0, -1.0, 0.0), 700.0)

]

});

Thanks,

Gabby