Fix exaggeration of ellipsoid voxel clipping bounds #12959
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
This PR fixes exaggeration of ellipsoid voxels, by exaggerating the clipping bounds along with the shape bounds.
A
VoxelPrimitive
implements vertical exaggeration differently depending on the shape type:VoxelShapeType.BOX
andVoxelShapeType.CYLINDER
apply the exaggeration as a transform, which is multiplied with themodelMatrix
. This approach assumes the exaggeration is along the same axis for every point in the voxel (e.g.,Z
for cylinders). This is a reasonable approximation for datasets only covering a small area of the Earth, with some assumptions (!) about the shape orientation.VoxelShapeType.ELLIPSOID
is often used for datasets covering a large portion of the globe, so the exaggeration must be along the local ellipsoid normal, which varies across the dataset. This is implemented via scaling/shifting of the shape's height bounds.The missing element for ellipsoids, highlighted in #12811, was that clipping bounds were not exaggerated. Data near the clipping bound could therefore be clipped off when the shape was exaggerated. This PR corrects that by exaggerating the clipping bounds along with the shape bounds.
Issue number and link
Fixes #12811
Testing plan
Load the test local Sandcastle and verify that the entire dataset is exaggerated without being truncated.
Author checklist
CONTRIBUTORS.md
CHANGES.md
with a short summary of my change