Validator - Bounding Volume Spatial Coherence
See original GitHub issueFor CesiumGS/3d-tiles-tools#9 @sumitshyamsukha
Let’s do this one now:
tile.content.boundingVolume, when defined, is completely inside tile.boundingVolume (use Cesium’s functions)
There are three bounding volume types: region, box, and sphere. They are defined here: https://github.com/AnalyticalGraphicsInc/3d-tiles/blob/master/schema/boundingVolume.schema.json
If a tile has a content bounding volume, check that it is inside it’s bounding volume. To visualize what a bounding volume / content bounding volume looks like, go to the 3D Tiles Sandcastle when running the 3d-tiles branch in Cesium and check out the BV On/Off
and Contents BV On/Off
buttons.
We’ll need support the following checks:
- Region inside region
- Box inside region
- Sphere inside region
- Sphere inside sphere
- Region inside sphere
- Box inside sphere
- Box inside box
- Region inside box
- Sphere inside box
I’ll update with ideas for solving some of these, but to start region inside region should be pretty straightforward. Just need to check that the west/south/east/north/min/max are within the other’s values.
Issue Analytics
- State:
- Created 7 years ago
- Comments:5 (5 by maintainers)
Yes add it to the existing traversal in
validateTileset
.@rms13
Let’s tackle the region tests now.
While region is technically a curved surface along the earth, I think we can assume for most cases that it is close enough to a box shape. This will heavily simplify these 4 checks.
To convert a region to a box, check out
TileBoundingRegion
in Cesium, specifically:OrientedBoundingBox.fromRectangle(this.rectangle, this.minimumHeight, this.maximumHeight, ellipsoid);
Once converted to a box the previous written comparisons can be used.