1. A concise explanation of the problem you’re experiencing.
I want to clipping multiple Polygon on Cesium3DTileset, but now I can only clipping one.
2. A minimal code example. If you’ve found a bug, this helps us reproduce and repair it.
var tileset = viewer.scene.primitives.add(new Cesium.Cesium3DTileset({
url: tiles.url,
clippingPlanes: [
new Cesium.ClippingPlaneCollection({ // clipping one Polygon
planes: [
new Cesium.ClippingPlane(new Cesium.Cartesian3(0.0, 1.0, 0.0), 1.0),
new Cesium.ClippingPlane(new Cesium.Cartesian3(0.0, -1.0, 0.0), -1.0),
new Cesium.ClippingPlane(new Cesium.Cartesian3(-1.0, 0.0, 0.0), 1.0),
new Cesium.ClippingPlane(new Cesium.Cartesian3(-1.0, 0.0, 0.0), -1.0)
],
unionClippingRegions: false,
}),
new Cesium.ClippingPlaneCollection({ // clipping two Polygon
planes: [
new Cesium.ClippingPlane(new Cesium.Cartesian3(0.0, 1.0, 0.0), 2.0),
new Cesium.ClippingPlane(new Cesium.Cartesian3(0.0, -1.0, 0.0), -2.0),
new Cesium.ClippingPlane(new Cesium.Cartesian3(-1.0, 0.0, 0.0), 2.0),
new Cesium.ClippingPlane(new Cesium.Cartesian3(-1.0, 0.0, 0.0), -2.0)
],
unionClippingRegions: false,
})
]
}));
3. Context. Why do you need to do this? We might know a better way to accomplish your goal.
I want to clip multiple polygons in Cesium3DTileset,Used to display the pipeline model below.
4. The Cesium version you’re using, your operating system and browser.
1.66