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 for default scale of oriented bounding box #6147

Conversation

hanbollar
Copy link
Contributor

constructor comment said scale was 2x2x2, comment above variable definition in constructor said Matrix3.IDENTITY, and variable was defaulted with Matrix3.ZERO. --> for orientedBoundingBox halfAxes variable.

updated to all be Matrix3.ZERO to match other types of default construction used in the rest of the class.

@cesium-concierge
Copy link

Signed CLA is on file.

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


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

🌍 🌎 🌏

@@ -66,7 +66,7 @@ define([
/**
* The transformation matrix, to rotate the box to the right position.
* @type {Matrix3}
* @default {@link Matrix3.IDENTITY}
* @default {@link Matrix3.ZERO}
*/
this.halfAxes = Matrix3.clone(defaultValue(halfAxes, Matrix3.ZERO));
Copy link
Contributor

Choose a reason for hiding this comment

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

I think the changes here should be reversed. The doc is correct, but Matrix3.ZERO should be Matrix3.IDENTITY.

2x2x2 is correct because the half axes are 1x1x1 but the full cube is 2x2x2.

@hanbollar
Copy link
Contributor Author

discussed the solution with @lilleyse and agreed to keep it at Matrix3.ZERO.

This is ready for another look

@hpinkos
Copy link
Contributor

hpinkos commented Jan 25, 2018

Thanks @hanbollar!

@hpinkos hpinkos merged commit a1e3c6a into CesiumGS:master Jan 25, 2018
@hanbollar hanbollar deleted the fix-for-default-scale-of-oriented-bounding-box branch February 2, 2018 19:02
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