Skip to content

Conversation

@javagl
Copy link
Contributor

@javagl javagl commented Aug 29, 2025

This is a minor generalization, aiming at providing what is necessary to implement CesiumGS/3d-tiles-validator#233

As part of the createTilesetJson command, there already was a ContentBoundingVolumes class that could compute the bounding volume (box) for arbitrary content data (PNTS, B3DM, CMPT, I3DM, most boiling down to GLB). The computation was just iterating over all points of PNTS or "positions" that had been found in the GLB data, possibly transforming them with some RTC_CENTER or whatnot, and computing an oriented bounding box from these positions.

With this PR, the whole iteration over the points is moved into a dedicated VertexProcessing class that just passes the resulting positions to some arbitrary "consumer". The ContentBoundingVolumes class now just uses this class, and "consumes" the points by collecting them in an array and eventually computing the bounding volume of these points.

I also stated a BoundingVolumesContainment class that contains methods for checking whether a certain point is contained in a bounding volume. This may eventually be used by the validator: It will establish a "consumer" that processes the vertex positions by checking whether they are contained in the bounding volumes (and create an error/warning when this is not the case)

I'll keep this as a 'draft' for now, because I'd like to make sure that it's actually possible to implement the counterpart of this in the 3D Tiles Validator, based on this state.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants