Conversation
|
@kring is this something of interest for this project or not? |
|
Sorry this got by me @JeroenTekle. This seems like a useful feature to me. Based on a quick review though, I think some work needs to be done on the coordinate system. Currently the bounds will be returned as an AABB in ECEF, which is probably not what users need or expect. It should be transformed to the Cesium3DTileset game object's coordinate system, and the documentation of the Bounds property should say as much. You'll notice that Also, before we can merge this, we do need you to sign the Contributor License Agreement if you haven't already: |
|
No problem @kring. For my specific use case I actually need coordinates in ECEF (or GCS) to be able to set the CesiumGeoreference's Origin to the tileset center. I could however convert the game object's local coordinates bounds using In this case it might actually be better to expose the root |
That's not unreasonable, but lifetime management will be tricky. You can simply construct a So I think just providing a way to get the Bounds directly will be simpler for now. But you can definitely implement that by constructing a Cesium3DTile and then getting and returning its bounds. |
I've added a bounds property to Cesium3DTileset. Personally I use this to teleport to tiles added manually by users.
The bounds calculating code is copied & modified from
Cesium3DTileImpl::getBounds. The tileset needs some time to load before this property can be used._pTilesetneeds to be set &getRootTile()needs to be available as well. Because of this I now return bounds with all 0's but I don't think this is the most elegant solution. How would you suggest to handle this?