-
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
scale geometric error with tileset #7411
scale geometric error with tileset #7411
Conversation
removed geometricError recalculation on each "get"
Thanks for the pull request @Vineg!
Reviewers, don't forget to make sure that:
I am a bot who helps you make Cesium awesome! Contributions to my configuration are welcome. 🌍 🌎 🌏 |
@lilleyse this is ready for review |
Can you add some unit tests for the new matrix function? |
Thanks again for your contribution @Vineg! No one has commented on this pull request in 30 days. Maintainers, can you review, merge or close to keep things tidy? I'm going to re-bump this in 30 days. If you'd like me to stop, just comment with |
@lilleyse can you review this? |
Yes, sorry for the delay. I plan to review this soon. |
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.
Thank @Vineg, just some small comments from me.
I opened CesiumGS/3d-tiles#367 to keep track of this change in the spec.
@Vineg @geoscan-builder bump =) let us know when these comments are addressed and this is ready for another look. Thanks! |
Yeah, I hope to get back to this soon |
Thanks again for your contribution @Vineg! No one has commented on this pull request in 30 days. Maintainers, can you review, merge or close to keep things tidy? I'm going to re-bump this in 30 days. If you'd like me to stop, just comment with |
1 similar comment
Thanks again for your contribution @Vineg! No one has commented on this pull request in 30 days. Maintainers, can you review, merge or close to keep things tidy? I'm going to re-bump this in 30 days. If you'd like me to stop, just comment with |
@cesium-concierge stop |
@lilleyse what's the status of this PR? |
@hpinkos Waiting on my review which I'll finish up now. |
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.
Thansk @Vineg, this is really close.
Matrix4.getRotation = function(matrix, result) { | ||
return Matrix4.getMatrix3(matrix, result); | ||
}; | ||
|
||
/** | ||
* Gets the upper left 3x3 rotation matrix of the provided matrix, assuming the matrix is a affine transformation matrix. |
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.
Unrelated typo I noticed.
* Gets the upper left 3x3 rotation matrix of the provided matrix, assuming the matrix is a affine transformation matrix. | |
* Gets the upper left 3x3 rotation matrix of the provided matrix, assuming the matrix is an affine transformation matrix. |
* | ||
* @param {Matrix3} matrix The matrix. | ||
* @param {Matrix3} result The object onto which to store the result. | ||
* @returns {Cartesian3} The modified result parameter |
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.
* @returns {Cartesian3} The modified result parameter | |
* @returns {Matrix3} The modified result parameter |
/** | ||
* @deprecated moved to Matrix4.getMatrix3 | ||
*/ | ||
Matrix4.getRotation = function(matrix, result) { |
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.
It's fine to keep the original description and then insert the @deprecated
line. Also add a deprecationWarning
to the function.
/**
* Gets the upper left 3x3 rotation matrix of the provided matrix, assuming the matrix is a affine transformation matrix.
*
* @param {Matrix4} matrix The matrix to use.
* @param {Matrix3} result The object onto which to store the result.
* @returns {Matrix3} The modified result parameter.
*
* @deprecated This function has been deprecated. Use {@link Matrix4#getMatrix3} instead.
*
* @example
* // returns a Matrix3 instance from a Matrix4 instance
*
* // m = [10.0, 14.0, 18.0, 22.0]
* // [11.0, 15.0, 19.0, 23.0]
* // [12.0, 16.0, 20.0, 24.0]
* // [13.0, 17.0, 21.0, 25.0]
*
* var b = new Cesium.Matrix3();
* Cesium.Matrix4.getRotation(m,b);
*
* // b = [10.0, 14.0, 18.0]
* // [11.0, 15.0, 19.0]
* // [12.0, 16.0, 20.0]
*/
Matrix4.getRotation = function(matrix, result) {
deprecationWarning('Matrix4.getRotation', 'Matrix4.getRotation is deprecated and will be removed in Cesium 1.65. Use Matrix4.getMatrix3 instead.');
return Matrix4.getMatrix3(matrix, result);
};
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.
Add the deprecation notice to CHANGES.md
:
##### Deprecated :hourglass_flowing_sand:
* The function `Matrix4.getRotation` has been deprecated and renamed to `Matrix4.getMatrix3`. `Matrix4.getRotation` will be removed in version 1.65. [#7411](https://github.com/AnalyticalGraphicsInc/cesium/pull/7411)
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.
There are still a lot of occurrences of Matrix4.getRotation
in the code that should be changed to Matrix4.getMatrix3
(one in Frustum.html
, the rest in specs).
var scale = new Cartesian3(); | ||
var expectedScale = new Cartesian3(1.0, 1.0, 1.0); | ||
result = Matrix3.getRotation(matrix, result); | ||
console.log(result); |
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.
Remove console.log(result)
expect(function() { | ||
return Matrix3.getRotation(); | ||
}).toThrowDeveloperError(); | ||
}); |
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.
Also add a separate check for getRotation throws without a result
Note to self after merging: this PR fixes both #5330 and #7398 And update the spec: CesiumGS/3d-tiles#367 |
I'm going to merge this into a branch and take over the rest of the clean up. Thanks for all the work you did for this @Vineg! |
#5330