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

fix 3d tiles culling #4064

Merged
merged 2 commits into from
Dec 20, 2019
Merged

fix 3d tiles culling #4064

merged 2 commits into from
Dec 20, 2019

Conversation

Pessimistress
Copy link
Collaborator

For #3983

Change List

  • Bump loaders.gl to 2.0.0-beta.8 (bounding volume fix)
  • Fix frustum plane conversion

.subtract(viewportCenterCartesian)
.scale(-1) // Want the normal to point into the frustum since that's what culling expects
.normalize();
scratchPlane.distance = Math.abs(scratchPlane.normal.dot(cartesianPos));
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

This was the issue - distance should be -scratchPlane .normal.dot(cartesianPos)

Copy link
Contributor

@xintongxia xintongxia left a comment

Choose a reason for hiding this comment

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

I wonder what kind of tests we can do to make sure this calculation is correct?

@coveralls
Copy link

coveralls commented Dec 20, 2019

Coverage Status

Coverage decreased (-0.008%) to 83.376% when pulling 932e3c7 on x/3d-tiles-culling into 1549262 on master.

@Pessimistress Pessimistress merged commit 7bd2182 into master Dec 20, 2019
@Pessimistress Pessimistress deleted the x/3d-tiles-culling branch December 21, 2019 18:07
chrisgervang pushed a commit that referenced this pull request Jan 31, 2020
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.

4 participants