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

BoxOutlineGeometry and BoxGeometry Cleanup #3073

Merged
merged 26 commits into from
Oct 14, 2015
Merged

BoxOutlineGeometry and BoxGeometry Cleanup #3073

merged 26 commits into from
Oct 14, 2015

Conversation

ggetz
Copy link
Contributor

@ggetz ggetz commented Oct 14, 2015

Fixes #2260.

Changed minimumCorner and maximumCorner properties to just minimum and maximum.

Added fromAxisAlignedBoundingBox function.

@pjcozzi
Copy link
Contributor

pjcozzi commented Oct 14, 2015

Thanks @ggetz.

* });
* var geometry = Cesium.BoxGeometry.createGeometry(box);
*/
BoxGeometry.fromAxisAlignedBoundingBox = function(options) {
Copy link
Contributor

Choose a reason for hiding this comment

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

This doesn't need to take options. It can just take the bounding box object directly.

Copy link
Contributor

Choose a reason for hiding this comment

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

Mention this function and BoxOutlineGeometry.fromAxisAlignedBoundingBox in CHANGES.md.

Copy link
Contributor

Choose a reason for hiding this comment

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

For more info on opening a complete pull request, see CONTRIBUTING.md.

@ggetz
Copy link
Contributor Author

ggetz commented Oct 14, 2015

Ready for another look

@ggetz
Copy link
Contributor Author

ggetz commented Oct 14, 2015

I also did a search on the project and found no other references to minimumCorner or maximumCorner

* Decreased GPU memory usage in `BillboardCollection` and `LabelCollection` by using the WebGL ANGLE_instanced_arrays extension.
* Added CZML examples to Sandcastle. See the new CZML tab.
* Fixed token issue in ArcGisMapServerImageryProvider.
* `ImageryLayerFeatureInfo` now has an `imageryLayer` property, indicating the layer that contains the feature.
* Added `BoxOutlineGeometry.fromAxisAlignedBoundingBox` and `BoxGeometry.fromAxisAlignedBoundingBox` functtions
Copy link
Contributor

Choose a reason for hiding this comment

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

"functtions" -> "functions."

@pjcozzi
Copy link
Contributor

pjcozzi commented Oct 14, 2015

@ggetz can you give me commit access to your repo to help us collaborate on pull requests?

@@ -34,6 +36,8 @@ define([
* @constructor
*
* @param {Object} options Object with the following properties:
* @param {Cartesian3} options.minimum The minimum x, y, and z coordinates of the box.
* @param {Cartesian3} options.maximum The maximum x, y, and z coordinates of the box.
* @param {Cartesian3} options.minimumCorner The minimum x, y, and z coordinates of the box.
Copy link
Contributor

Choose a reason for hiding this comment

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

Remove the doc for minimumCorner and maximumCorner (since we don't want users to use them). Same comment for BoxOutlineGeometry.

throw new DeveloperError('boundingBox is required.');
}

var min = boundingBox.minimum;
Copy link
Contributor

Choose a reason for hiding this comment

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

Since we only use them in one place, there's no need to declare these locals. Let's keep it concise:

return new BoxGeometry({
    minimum : boundingBox.minimum,
    maximum : boundingBox.maximum
});

@pjcozzi
Copy link
Contributor

pjcozzi commented Oct 14, 2015

@ggetz thanks for the updates.

Any comment I made about BoxGeometry also applies to BoxOutlineGeometry.

@ggetz
Copy link
Contributor Author

ggetz commented Oct 14, 2015

@pjcozzi I made the changes you suggested

@@ -1,28 +1,29 @@
/*global define*/
define([
'./BoundingSphere',
Copy link
Contributor

Choose a reason for hiding this comment

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

Make sure WebStorm is inserting spaces for tabs. We did not need to change the formatting here. We just wanted to add a reference for deprecationWarning.

ggetz added 4 commits October 14, 2015 11:43
…into boxOutlineGeometry-cleanup

# Conflicts:
#	Source/Core/BoxGeometry.js
#	Source/Core/BoxOutlineGeometry.js
…into boxOutlineGeometry-cleanup

# Conflicts:
#	Source/Core/BoxGeometry.js
@ggetz
Copy link
Contributor Author

ggetz commented Oct 14, 2015

@pjcozzi I think I've fixed the formatting changes.

* ])
* },
* extrudedHeight: 300000
* ]),
Copy link
Contributor

Choose a reason for hiding this comment

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

Looks like the branches got mixed up, and this reverts your previous fix. Can you please update this?

@pjcozzi
Copy link
Contributor

pjcozzi commented Oct 14, 2015

When I run all the tests, I get two test failures:

image

@pjcozzi
Copy link
Contributor

pjcozzi commented Oct 14, 2015

Just a heads up that I made tweaks in 6e97913 and 716f8a6

@ggetz
Copy link
Contributor Author

ggetz commented Oct 14, 2015

@pjcozzi All the tests are now working and I merged the conflicting changes.

@@ -6,6 +6,8 @@ Change Log
* Breaking changes
* Deleted old `<subfolder>/package.json` and `*.profile.js` files, not used since we moved away from a Dojo-based build years ago. This should allow future compatibility with newer systems like Browserify and Webpack.
* Deprecated
* Depreciated `BoxGeometry.minimumCorner` and `BoxGeometry.maximumCorner`, use `BoxGeometry.minimum` and `BoxGeometry.maximum` instead. These will be removed in 1.17.
Copy link
Contributor

Choose a reason for hiding this comment

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

This should be Deprecated not Depreciated

@pjcozzi
Copy link
Contributor

pjcozzi commented Oct 14, 2015

Tests are good.

@pjcozzi
Copy link
Contributor

pjcozzi commented Oct 14, 2015

@ggetz congrats on another merged pull request!

pjcozzi added a commit that referenced this pull request Oct 14, 2015
BoxOutlineGeometry and BoxGeometry Cleanup
@pjcozzi pjcozzi merged commit 29dfda4 into CesiumGS:master Oct 14, 2015
@pjcozzi pjcozzi deleted the boxOutlineGeometry-cleanup branch October 14, 2015 18:56
@ggetz
Copy link
Contributor Author

ggetz commented Oct 14, 2015

@pjcozzi thanks!

mramato added a commit that referenced this pull request Oct 20, 2015
#3073 introduced a bug where the deprecated behavior did not work in
release mode.  Any code that handles deprecated behavior must be outside
of pragma statements or else it won't be part of the minified release.
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