CesiumGS / CesiumGS/cesium

Support multiple ClippingPolygons with mixed inverse-settings

Open
#12,995 2 comments 0 reactions 0 assignees View on GitHub
type - enhancement
Dominant language
JavaScript
Stars
15.7k
Forks
3.9k
Avg merge
4d 6h
Merged PRs (30d)
34

Description

### Feature

We need to create scenes that have multiple ClippingPolygons that can have mixed inverse-settings.

An example use-case would be to have a ClippingPolygon on a globe and/or 3DTiles-tileset that defines an area of interest, clipping away everything outside of it (inverse = true). Then there'd be ClippingPolygons used to create holes in the visible part of the tileset (inverse = false).

It could look something like this, where the purple polygon would be used to clip a hole:

Image

It does not looks like this is possible, since the inverse-setting is set on the ClippingPolygonCollection and there can be only one collection on the globe/3DTiles-tileset.

[Sandcastle](https://sandcastle.cesium.com/#c=jVZtb9s2EP4rhD/ZQ0ZRJEVKXhqsy7oWQ7oFS9cv0zDQEm1zk0WDpOK6Rf77Tm+pnLjr/MG2eM/dc3d87uwoQqVeq6YKaFPZlUYHE7aoqMx+b6tjXue12e2tC+gbpDy61t40O7R2dofyWdE95bPvWlhhax/QvdEH7dALVOvDgMbvu7P5iL+2dVCm1i6fXaBPeY3QSnl9o47a3ZriH+2WaK0qry9aky90rd/aUj83KchMBWPr6WEwO11B8OnZ1u70D00Ip8ha3ZtN5/9GV/vn9o22BfBOKB8Wk0LB/Le3NVSqDsqEsdbX2v4Mxz+qoO5s4wqNK6vKeRswn21D2PtlFNli73SloWrdlIAkJMYraD4urNP4YOrSHjyudYh8s2+bH/mDLnX9F2dU4IEZupfX04za+9rAN0hpgGBdBxOM9vheVY32bRZ4baoAtzHvbMcFenE15g46gM6VgwUP8RaLzm2n9vP52tqwd6YOndvj0wjFW6OdcsX2CEmG9y3nfAFGb9o2+0mgz2dtoIlWrlvhmXpz20ecf0KPUPSwmJZbnCL9qeaexLm2VaWLNsy8U9zYq+6mTX2vnQfJBNdM7rmXMu4UiLvZwGc4nx51rlGEGq9R2Bo/UqFgOyxSoMdKAymYAaKdg2FA8yEJiNjJbTGW6TV8lm05YPqjTRf1Q9O/8tmHfLZEVLCYSIoZIZwLEbOLKeTYQqTgaZLgjMaSCUaS9ATysYUkksdJKnHKMwhCZdojHi6+SCtJkqUJpjyOWRbHsTjDKzMmCRZSUJZkQpyjhaSlxITJNIuFkF+lFSkUwHFG4hRqYWdYU0k54TjNWFtunPCztJSkKc44yTKSsPjrtNDiJMOCpYILJukZ2oTSmGJB4yTOMujIOVqWSWgIkBNomhhp8/rPqeweR1eVZa/ZWu1Ao/lslDYaJNctgkdJL8fEH2dxOdHQkI7+AFIvdflGm802LFFMCBlMsFK1M6paPk6SrazDt7//dnvzasDYJvQ7dhiYyVmHfuL79uXrV7+8e9kBH57NVwFlOYXX1fGd7QsttQ+mHlb7dKaVC/BN1Wzec7JU8iwB1fOUgvIJG285jknKOcFU8ITC3cZyMEgpYkoJhrYzuCLRD8Gie7fOQNMH2qGJpXH92vjvRBD6lmDOKeWSyoSlWcrJRHJgjKlIYFYy6LQUMhN0akxTmYFdMEokF9komsXw2ez/B3uaMJHCFpApl0Ikchqfcg5qpAQImMg4/7wdIGtIClTLJGQGY8WTE/J+GMrGDW0hX1iPpV41m7utPfzk4Dr9rXZ3neZgZ7UaAYfZxezSh2Olr9qI3w9/KhpXzTGOgt7tKxCej1YN/MwHXHjfslxGo8tlae6RKV+c+RMBa1V5D5Z1U1V35qPOZ1eXEeBP3NqfYRiaX2HLVurYQrbx1U1/iDG+jODxuVewtlopN4n4Lw)

Contributor guide

Open the contributing guide

Research direction

Start with the linked Sandcastle example and trace how ClippingPolygonCollection is applied to the globe or 3DTiles tileset. Define the behavior for combining multiple polygons with mixed inverse settings, then verify that the example supports an inverse area of interest together with non-inverse holes.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript
Domain
computer-graphics
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.