Drafts for using dynamic content structures #13088
Draft
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This is a DRAFT (never supposed to be merged), illustrating how some of the classes that are part of the (time) dynamic 3D Tiles PR could be used within the
Multiple3DTileContentclass.The changes for this experiment are summarized in a single commit: 6adf794
I think that the
Multiple3DTileContentclass could be simplified considerably with some of these helper classes (most importantly, theContentHandle). It would allow to omit theproperties, as well as the
functions, which juggled with these properties (and the tileset statistics) in a less-than-straightforward way.
The state here is sufficient for loading the
Specs/MultipleContentsexamples, both in their "1.0" and "1.1" versions (!), and displaying them properly.The specs themself will likely fail, because they are overconstrained and diligently check the behavior of the aforementioned functions. This is related to one of the greatest hurdles for actually implementing this change: There are quite a few places that already do some sort of "special handling" for multiple contents.
This is revolving around the
Cesium3DTile.hasMultipleContentflag, someinstanceofchecks, the use of theinnerContentsgetter of theCesium3DTileContentinterface, the usual state space and lifecycle issues related to theCesium3DTileproperties that involvecontentState,content.ready, andcontentReady(!), and several other details.Eventually, one goal of actually applying this simplification could be to work towards a state where all these questions become less relevant. A smaller state space is easier to reason about.