Remove scene graph and ownership concepts from clipping planes
- Dominant language
- JavaScript
- Stars
- 15.7k
- Forks
- 3.9k
- Avg merge
- 4d 6h
- Merged PRs (30d)
- 34
Description
When a clipping plane is added to an object it becomes a part of that object's scene graph. This makes it really easy to define a simple clipping plane in object-local space and have it move with the model or tileset. However this design has led to a few complications along the way:
* Ownership code is really complicated
* Can't use the same clipping planes on different objects
* Georeferenced tilesets that don't use tileset transforms (like NYC 3d buildings) don't have a clear origin point. So we kinda fake it and say the clipping plane origin is the tileset's bounding sphere center. https://github.com/AnalyticalGraphicsInc/cesium/blob/4c6a296f63c63627b1cbe0a1f81d77a08799dd27/Source/Scene/Cesium3DTileset.js#L862-L873 This is documented but its inconsistent, sometimes the origin is the bottom-center and sometimes it's the bounding sphere origin depending on the tileset.
We should consider moving to a model where clipping planes are always defined in global coordinates. It gives developers more control and streamlines a lot of the code.
Contributor guide
Research direction
Start by reading the clipping-plane ownership and scene-graph behavior described in the issue, including the referenced Cesium3DTileset.js section at lines 862-873. Investigate how object-local origins and tileset transforms are handled across the clipping-plane implementation. Done requires an agreed design and coordinated changes that consistently define clipping planes in global coordinates.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript
- Domain
- computer-graphics
- Issue type
- Refactor
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100