-
Notifications
You must be signed in to change notification settings - Fork 51
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
Moved ScreenToPlane and ScreenToScene from ign-gui to ign-rendering #363
Conversation
Codecov Report
@@ Coverage Diff @@
## ign-rendering3 #363 +/- ##
==================================================
+ Coverage 53.23% 53.35% +0.12%
==================================================
Files 131 131
Lines 12007 12036 +29
==================================================
+ Hits 6392 6422 +30
+ Misses 5615 5614 -1
Continue to review full report at Codecov.
|
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.
the reason I wanted to change the ClickToScene events is to give more data, but ScreenToScene
only returns a math::Vector3d
. Getting a copy of the RayQueryResult
from line 52 would be most useful to downstream applications, so you can know if you clicked on something or not and even the ign-rendering id of what was clicked on.
I think you could have a 2nd API:
math::Vector3d ScreenToScene(
const math::Vector2i &,
const CameraPtr &_camera,
const RayQueryPtr &,
RayQueryResult &);
so you could pass a reference to a RayQueryResult
if you want the extra information
I think if we back port this to ign-gui3
, it could benefit to citadel users
Signed-off-by: ahcorde <ahcorde@gmail.com>
5e8454d
to
efa50b8
Compare
Signed-off-by: ahcorde <ahcorde@gmail.com>
Retargeted to |
Signed-off-by: ahcorde <ahcorde@gmail.com>
Signed-off-by: Steven Peters <scpeters@openrobotics.org>
I just made some minor Doxygen fixes in 4f85db9 |
I've made some improvements to the test in branch ahcorde/feature/clickto...scpeters/feature/clickto Please consider merging or cherry-picking them into this branch if you approve. The change to |
Signed-off-by: Steven Peters <scpeters@openrobotics.org>
* Use tighter tolerances in expectations * Use IGN_PI/2 instead of 1.57 to tighten X tolerance * Clarify comments about max distance, which is only used when the ray does not intersect an object * Add expectations on RayQueryResult values * Add test of API without RayQueryResult Signed-off-by: Steven Peters <scpeters@openrobotics.org>
…robotics/ign-rendering into ahcorde/feature/clickto
Signed-off-by: Steven Peters <scpeters@openrobotics.org>
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.
thanks, this is looking good. I just thought of one more thing to test and added it in 7d864e1
/// \param[in] _maxDistance maximum distance to check the collision | ||
/// \return 3D coordinates of a point in the 3D scene. | ||
IGNITION_RENDERING_VISIBLE | ||
math::Vector3d ScreenToScene( |
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.
global functions start with lower case. Can we change this to screenToScene
? Same goes for the other functions added in this class.
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.
ahh I'm a few mins late
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.
🎉 New feature
Summary
Moved ScreenToPlane and ScreenToScene from ign-gui to ign-rendering. Some of the small plugins that I'm creating to consolidate the Scene3D use these methods.
@scpeters do you need to retarget this PR to another branch ?
Checklist
codecheck
passed (See contributing)Note to maintainers: Remember to use Squash-Merge