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

pragmatically and precisely compute ellipse rectangle on demand #6382

Merged
merged 3 commits into from
Mar 28, 2018

Conversation

likangning93
Copy link
Contributor

@likangning93 likangning93 commented Mar 27, 2018

In place of #6376.
Fixes #6347.

This does the thing where ellipses crossing the poles get circles as well.

Sandcastle for comparison on cesiumjs.

@cesium-concierge
Copy link

Signed CLA is on file.

@likangning93, thanks for the pull request! Maintainers, we have a signed CLA from @likangning93, so you can review this at any time.

⚠️ I noticed that CHANGES.md has not been updated. If this change updates the public API in any way, fixes a bug, or makes any non-trivial update, please add a bullet point to CHANGES.md and comment on this pull request so we know it was updated. For more info, see the Pull Request Guidelines.


I am a bot who helps you make Cesium awesome! Contributions to my configuration are welcome.

🌍 🌎 🌏

@@ -805,7 +798,7 @@ define([
VertexFormat.pack(value._vertexFormat, array, startingIndex);
startingIndex += VertexFormat.packedLength;

Rectangle.pack(value._rectangle, array, startingIndex);
Rectangle.pack(value.rectangle, array, startingIndex);
Copy link
Contributor

Choose a reason for hiding this comment

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

Not sure we need to pack the rectangle. It looks like we're not unpacking it

@@ -980,6 +975,9 @@ define([
*/
rectangle : {
get : function() {
if (!defined(this._rectangle)) {
this._rectangle = computeRectangle(this);
Copy link
Contributor

Choose a reason for hiding this comment

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

It can be in a separate PR, but we should also update polygon, corridor and rectangle to work this way

@hpinkos
Copy link
Contributor

hpinkos commented Mar 28, 2018

Looks good @likangning93! Those are my only comments

@likangning93
Copy link
Contributor Author

likangning93 commented Mar 28, 2018

@hpinkos this is up-to-date and passing for me locally, but I can't see CI for some reason?

[EDIT] looks like Travis might just be backed up

@hpinkos
Copy link
Contributor

hpinkos commented Mar 28, 2018

Yeah I've seen travis do that before where it just totally misses running on a commit

@@ -15,6 +16,7 @@ define([
defineProperties,
EllipseGeometry,
Ellipsoid,
Rectangle,
Copy link
Contributor

Choose a reason for hiding this comment

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

Is this needed anymore?

@hpinkos
Copy link
Contributor

hpinkos commented Mar 28, 2018

I think this warrants an entry in CHANGES.md too

@likangning93
Copy link
Contributor Author

I think this warrants an entry in CHANGES.md too

geometry rectangles are currently private in the API though?

@hpinkos
Copy link
Contributor

hpinkos commented Mar 28, 2018

geometry rectangles are currently private in the API though

Oh right, I forgot about that. Nevermind =)

@likangning93
Copy link
Contributor Author

@hpinkos Travis is done, this is ready!

@hpinkos
Copy link
Contributor

hpinkos commented Mar 28, 2018

Awesome job @likangning93! Gold star for the sandcastle example, that made testing this really easy.
I'll work on adding the rectangle changes to the other ground geometry types.

@hpinkos hpinkos merged commit dae5c92 into CesiumGS:master Mar 28, 2018
@hpinkos hpinkos deleted the fixEllipseRectanglePragmatic branch March 28, 2018 19:12
@pjcozzi
Copy link
Contributor

pjcozzi commented Mar 28, 2018

Update CHANGES.md?

@hpinkos
Copy link
Contributor

hpinkos commented Mar 28, 2018

@pjcozzi no because it's a change to part of the private API

@pjcozzi
Copy link
Contributor

pjcozzi commented Mar 28, 2018

OK, I thought it fixed a bug.

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