-
Notifications
You must be signed in to change notification settings - Fork 1.4k
A (fast) ApplyInverse() method for 3D affine transformations #464
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
Conversation
|
Can one of the admins verify this patch? |
|
@lmoneta : Is there a unit test to which I can add a check for the new method. Please let me know what you think. |
|
@phsft-bot build! @sawenzel, this looks good. You can add a unit test under math//genvector/test/testGenVector.cxx and test/testGenVectorVc.cxx. The latter should probably be moved in the folder of the former. About unit tests: #451 introduces a gtest in tree. It will land soon but I don't think this PR should wait for it. |
| return operator()(v); | ||
| } | ||
|
|
||
| /** |
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 seems we are missing some punctuation here.
| } | ||
|
|
||
| /** | ||
| Directly apply the inverse affine transformation on Points |
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'd add punctuation here, too.
| fM[kXZ] * tmp.X() + fM[kYZ] * tmp.Y() + fM[kZZ] * tmp.Z()); | ||
| } | ||
|
|
||
| /** |
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'd for a complete sentence starting with capital letter.
| return PositionVector3D<CoordSystem>(ApplyInverse(Point(p))); | ||
| } | ||
|
|
||
| /** |
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'd form a sentence here, too.
|
@vgvassilev : Thanks for the review. Will fix the comments. |
|
Sandro, thank you for the PR ! Yes, It would be great to have also a unit test in the math/genvector/test/testGenVector.cxx test program Best Lorenzo |
a4f97b8 to
119a85f
Compare
|
I added a unit test and fixed the spelling things. |
|
Thanks! It seems clang-format is unhappy. |
|
Ok. Will check. |
|
@vgvassilev : Which file? If I apply clang-format on the unit test ... the whole file is changed (not just my part). Same for Transform3D |
119a85f to
37cef30
Compare
|
@sawenzel, you can get the diff (by clicking on view raw log) and apply it or run |
1d771f3 to
b57d8ae
Compare
…rm3D)
* a direct ApplyInverse() function for Points and Vectors
* faster than using the Inverse() + operator() mechanism, because
- avoid intermediate calculation and memory of inverse
- we know the precise form of the inverse transformation a priori
(the inverse of an 3D rotation is is transpose, etc.)
* added unit test
b57d8ae to
aaf4f79
Compare
|
@phsft-bot build! |
|
Starting build on |
|
@martinmine, "centos7/gcc49, mac1011/native, slc6/gcc49, slc6/gcc62, ubuntu14/native": Could we change one of the default platforms from |
|
It seems the failures are unrelated to this PR. Merging. Thanks for the contribution! |
…rm3D) (root-project#464) * a direct ApplyInverse() function for Points and Vectors * faster than using the Inverse() + operator() mechanism, because - avoid intermediate calculation and memory of inverse - we know the precise form of the inverse transformation a priori (the inverse of an 3D rotation is is transpose, etc.) * added unit test
…rm3D) (root-project#464) * a direct ApplyInverse() function for Points and Vectors * faster than using the Inverse() + operator() mechanism, because - avoid intermediate calculation and memory of inverse - we know the precise form of the inverse transformation a priori (the inverse of an 3D rotation is is transpose, etc.) * added unit test
(the inverse of an 3D rotation is is transpose, etc.)