-
Notifications
You must be signed in to change notification settings - Fork 3.5k
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
Added support for large Rectangles in OrientedBoundingBox.fromRectangle #8475
Conversation
Thanks for the pull request @IanLilleyT!
Reviewers, don't forget to make sure that:
|
Very cool, this will help tremendously with global datasets! |
@IanLilleyT could this fix #4483? |
@hpinkos Just tested and it does not fix it, but I'm looking into it |
@hpinkos Looks like |
🤦♀️ Nice catch @IanLilleyT 😆 |
@lilleyse fixed some bugs, ready for review |
Looks good based on my checks
The only thing to fix now is there's a crash when switching to 2D or CV with the Alasaka tileset. |
@lilleyse did you check rectangles at the poles? |
@IanLilleyT cool, I'll check that out next |
There have been reports of 3D tiles that use
TileBoundingRegion
disappearing when viewing from a horizon angle. This is because the root tile generates a brokenOrientedBoundingBox
when theRectangle
's width is greater than half the ellipsoid. The terrain system doesn't have this problem because it handles this edge case and generates aBoundingSphere
instead.In this PR
OrientedBoundingBox.fromRectangle
has been made to work with larger rectangles. The approach is different than small rectangles which orient the OBB around the rectangle's center normal. I tried doing it this way for large rectangles but it produced very poorly fitted, albeit correct OBBs. The final approach ignores the latitude when calculating the OBBs orientation.With this fix, all of the special case code is gone. I did a good amount of testing but this change impacts a lot of core systems so more eyes on it the better.
Fixes #4483
Sandcastle
Examples:
3D tile before (incorrectly culled):
3D tile after:
@loshjawrence
@lilleyse
@jasonbeverage