-
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
Use selection buffer in ray question (ogre2) - part 2 #383
Use selection buffer in ray question (ogre2) - part 2 #383
Conversation
Signed-off-by: Ian Chen <[email protected]>
Signed-off-by: Ian Chen <[email protected]>
Signed-off-by: Ian Chen <[email protected]>
Signed-off-by: Ian Chen <[email protected]>
Signed-off-by: Ian Chen <[email protected]>
Signed-off-by: Ian Chen <[email protected]>
|
||
/// \brief Ogre pixel box that contains description of the data buffer | ||
public: Ogre::PixelBox *pixelBox = nullptr; | ||
|
||
/// \brief The selection buffer material | ||
public: Ogre::MaterialPtr selectionMaterial; |
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.
public: Ogre::MaterialPtr selectionMaterial; | |
public: Ogre::MaterialPtr selectionMaterial{nullptr}; |
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.
looks like Ogre::SharedPtr
can't be set or init to nullptr
.
Signed-off-by: Ian Chen <[email protected]>
Signed-off-by: Ian Chen <[email protected]>
Signed-off-by: Ian Chen <[email protected]>
Signed-off-by: Ian Chen <[email protected]>
Codecov Report
@@ Coverage Diff @@
## rayquery_selection_buffer #383 +/- ##
============================================================
Coverage ? 56.34%
============================================================
Files ? 147
Lines ? 14100
Branches ? 0
============================================================
Hits ? 7944
Misses ? 6156
Partials ? 0 Continue to review full report at Codecov.
|
Signed-off-by: Ian Chen <[email protected]>
Signed-off-by: Ian Chen <[email protected]>
Signed-off-by: Ian Chen <[email protected]>
* testing using selection buffer for rayquery Signed-off-by: Ian Chen <[email protected]> * remove commented out code Signed-off-by: Ian Chen <[email protected]> * codecheck Signed-off-by: Ian Chen <[email protected]> * style Signed-off-by: Ian Chen <[email protected]> * Use selection buffer in ray question (ogre2) - part 2 (#383) * extend selection buffer to return depth Signed-off-by: Ian Chen <[email protected]> * selection buffer depth working Signed-off-by: Ian Chen <[email protected]> * cleanup Signed-off-by: Ian Chen <[email protected]> * style Signed-off-by: Ian Chen <[email protected]> * add check for mac Signed-off-by: Ian Chen <[email protected]> * Add shaders Signed-off-by: Ian Chen <[email protected]> * enable mac test Signed-off-by: Ian Chen <[email protected]> * style Signed-off-by: Ian Chen <[email protected]> * fix bad merge Signed-off-by: Ian Chen <[email protected]> * fix drag and drop Signed-off-by: Ian Chen <[email protected]> * fix utils test Signed-off-by: Ian Chen <[email protected]> * fix doxy Signed-off-by: Ian Chen <[email protected]> * remove comment Signed-off-by: Ian Chen <[email protected]>
🎉 New feature
Summary
This further improves performance of ray queries. As described in #378, there are 2 stages in our ray query implementation. This PR focuses on stage 2. The selection buffer implementation in ogre2 is extended to return depth data which is then used compute the intersection point of user mouse clicks. This replaces the slow CPU based ray-triangle intersection tests in stage 2 of the current ray query implementation.
Note the ray-triangle intersection code is not removed, and can still be used if a selection buffer is not available.
Test it
see gazebosim/gz-sim#969
Checklist
codecheck
passed (See contributing)Note to maintainers: Remember to use Squash-Merge