Skip to content

Bounding volume generalizations#189

Merged
javagl merged 4 commits intomainfrom
bounding-volume-generalizations
Mar 13, 2026
Merged

Bounding volume generalizations#189
javagl merged 4 commits intomainfrom
bounding-volume-generalizations

Conversation

@javagl
Copy link
Copy Markdown
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 started 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.

@javagl
Copy link
Copy Markdown
Contributor Author

javagl commented Mar 13, 2026

This has been verified to work as expected in CesiumGS/3d-tiles-validator#359 (and already been reviewed), so should be ready to merge.

@javagl javagl marked this pull request as ready for review March 13, 2026 12:23
@javagl javagl merged commit 645723b into main Mar 13, 2026
2 checks passed
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