-
Notifications
You must be signed in to change notification settings - Fork 3.5k
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
Fix for default scale of oriented bounding box #6147
Conversation
…t, and what was actually used in default constructor
@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)); |
There was a problem hiding this comment.
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
.
discussed the solution with @lilleyse and agreed to keep it at Matrix3.ZERO. This is ready for another look |
Thanks @hanbollar! |
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.