Skip to content
New issue

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

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

Already on GitHub? # to your account

Optimize Geometry Bounding Sphere #999

Merged
merged 2 commits into from
Aug 2, 2013
Merged

Optimize Geometry Bounding Sphere #999

merged 2 commits into from
Aug 2, 2013

Conversation

bagnell
Copy link
Contributor

@bagnell bagnell commented Jul 31, 2013

Optimizes the bounding sphere for combined geometry.

Before:
image

After:
image

}

if (typeof boundingSphere !== 'undefined') {
Cartesian3.divideByScalar(boundingSphere.center, i, boundingSphere.center);
Copy link
Contributor

Choose a reason for hiding this comment

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

Don't use i here. Shouldn't it be i - 1 anyway? Regardless, use length because the semantics are much better.

Copy link
Contributor

Choose a reason for hiding this comment

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

Sorry, i is right, but use length instead.

@pjcozzi
Copy link
Contributor

pjcozzi commented Aug 1, 2013

Sorry to bikeshed this but I wrote the original code and designed the new algorithm and want to keep the code clean, clean, clean.

@bagnell
Copy link
Contributor Author

bagnell commented Aug 1, 2013

@pjcozzi This is ready for another review.

@pjcozzi
Copy link
Contributor

pjcozzi commented Aug 2, 2013

All good. Make sure to keep #766 up to date.

pjcozzi added a commit that referenced this pull request Aug 2, 2013
@pjcozzi pjcozzi merged commit 6d1ae9a into master Aug 2, 2013
@pjcozzi pjcozzi deleted the geometryBoundingSphere branch August 2, 2013 12:49
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants