Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

3D Tiles bounding volume improvements #750

Merged
merged 4 commits into from
Nov 15, 2023
Merged

3D Tiles bounding volume improvements #750

merged 4 commits into from
Nov 15, 2023

Conversation

kring
Copy link
Member

@kring kring commented Nov 6, 2023

This is a PR into #747 so merge that first.

Fixes #647

  • Added TileBoundingVolumes class to Cesium3DTilesContent, making it easier to create the rich bounding volume types in CesiumGeometry and CesiumGeospatial from the simple std::vector representations in Cesium3DTiles
  • Added transform method to CesiumGeometry::BoundingSphere.
  • Added toSphere, fromSphere, and fromAxisAligned methods to CesiumGeometry::OrientedBoundingBox.
  • Added TileTransform class to Cesium3DTilesContent, making it easier to create a glm::dmat4 from the transform property of a Cesium3DTiles::Tile.

Base automatically changed from tileset-manipulation-refactoring to main November 10, 2023 18:11
@j9liu j9liu self-requested a review November 10, 2023 20:19
Copy link
Contributor

@j9liu j9liu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@kring looks good to me! I had two comments about docs but I'll push a commit for those + merge right after

Comment on lines 69 to 70
* If the transformation has non-uniform scale, the bounding sphere's radius
* is scaled by the scale of the transformation's axis with the largest scale.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This reads a bit more clearly to me?

Suggested change
* If the transformation has non-uniform scale, the bounding sphere's radius
* is scaled by the scale of the transformation's axis with the largest scale.
* If the transformation has non-uniform scale, the bounding sphere's radius
* is scaled by the largest scale value among the transformation's axes.

*
* @param boundingVolume The bounding volume from which to get the region.
* @return The region, or `std::nullopt` if the bounding volume does not
* define a region. The box is defined in geographic coordinates.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
* define a region. The box is defined in geographic coordinates.
* define a region. The region is defined in geographic coordinates.

@j9liu j9liu merged commit 007fe0b into main Nov 15, 2023
14 checks passed
@j9liu j9liu deleted the bounding-volumes branch November 15, 2023 17:13
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.

OrientedBoundingBox::contains doesn't consider OBB center position
2 participants