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

BoundingSphere and Cartesian functions #548

Merged
merged 5 commits into from
Mar 7, 2013
Merged

BoundingSphere and Cartesian functions #548

merged 5 commits into from
Mar 7, 2013

Conversation

pjcozzi
Copy link
Contributor

@pjcozzi pjcozzi commented Mar 7, 2013

Part of the models branch:

  • Added BoundingSphere.fromCornerPoints.
  • Added fromArray and distance functions to Cartesian2, Cartesian3, and Cartesian4.

Longer-term we want to masquerade arrays as Cartesians, but these functions are orthogonal to that effort.

result = new BoundingSphere();
}

var center = Cartesian3.add(corner, oppositeCorner);
Copy link
Contributor

Choose a reason for hiding this comment

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

You could use result.center as the result to add to avoid creating one or two new Cartesian3s.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yeap. Updated. Please retest; I used the GitHub editor. Questionable, I know.

@bagnell
Copy link
Contributor

bagnell commented Mar 7, 2013

Just the one comment. Otherwise, looks good and the tests pass.

@bagnell
Copy link
Contributor

bagnell commented Mar 7, 2013

Tests pass. Merging.

bagnell added a commit that referenced this pull request Mar 7, 2013
BoundingSphere and Cartesian functions
@bagnell bagnell merged commit 41790e1 into master Mar 7, 2013
@bagnell bagnell deleted the modelhelpers branch March 7, 2013 22:08
});

it('fromCornerPoints with a result parameter', function() {
var sphere = new BoundingSphere;
Copy link
Contributor

Choose a reason for hiding this comment

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

The first time the new ant jsHint command caught something for me 😄 I'll fix this since you sounded like you were busy.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Cool! Thanks.

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.

3 participants