Skip to content
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

Enable ray heightmap ray query #778

Merged
merged 4 commits into from
Dec 8, 2022
Merged

Enable ray heightmap ray query #778

merged 4 commits into from
Dec 8, 2022

Conversation

iche033
Copy link
Contributor

@iche033 iche033 commented Dec 6, 2022

Signed-off-by: Ian Chen [email protected]

🦟 Bug fix

Summary

Ray queries now return intersection points with heightmaps. This fixes the issue with weird view control movements when orbiting / panning with a mouse on heightmaps. However, mouse picking (selecting heightmap visual) is not working yet. It may require a change to API - added a todo for this.

To test

Run the Utils_TEST:

GZ_ENGINE_TO_TEST=ogre2 ./build/gz-rendering7/bin/UNIT_Utils_TEST 

Camera movement in heightmap demo should also be working well now. Build and run the demo. Move camera with the mouse and you should see the anchor points for camera orbiting and panning should now be where the mouse click is.

You can also try view control in heightmaps.df world in gz sim.

gz sim -v 4 heightmap.sdf

ray_heightmap

Checklist

  • Signed all commits for DCO
  • Added tests
  • Updated documentation (as needed)
  • Updated migration guide (as needed)
  • Consider updating Python bindings (if the library has them)
  • codecheck passed (See contributing)
  • All tests passed (See test coverage)
  • While waiting for a review on your PR, please help review another open pull request to support the maintainers

Note to maintainers: Remember to use Squash-Merge and edit the commit message to match the pull request summary while retaining Signed-off-by messages.

@github-actions github-actions bot added the 🌱 garden Ignition Garden label Dec 6, 2022
@codecov
Copy link

codecov bot commented Dec 6, 2022

Codecov Report

Merging #778 (155d21a) into gz-rendering7 (05f7e40) will increase coverage by 0.58%.
The diff coverage is 100.00%.

@@                Coverage Diff                @@
##           gz-rendering7     #778      +/-   ##
=================================================
+ Coverage          75.53%   76.12%   +0.58%     
=================================================
  Files                164      164              
  Lines              14382    14392      +10     
=================================================
+ Hits               10864    10956      +92     
+ Misses              3518     3436      -82     
Impacted Files Coverage Δ
ogre2/src/Ogre2Heightmap.cc 78.28% <ø> (+7.07%) ⬆️
ogre2/src/Ogre2RayQuery.cc 62.18% <100.00%> (+0.97%) ⬆️
ogre2/src/Ogre2SelectionBuffer.cc 93.25% <100.00%> (+0.19%) ⬆️
ogre2/src/Ogre2Scene.cc 80.94% <0.00%> (+1.88%) ⬆️
ogre2/src/Ogre2MaterialSwitcher.cc 88.57% <0.00%> (+9.52%) ⬆️
ogre2/src/Ogre2GzHlmsTerraPrivate.cc 76.92% <0.00%> (+35.38%) ⬆️

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

ogre2/src/Ogre2RayQuery.cc Show resolved Hide resolved
ogre2/src/Ogre2SelectionBuffer.cc Show resolved Hide resolved
test/common_test/Utils_TEST.cc Outdated Show resolved Hide resolved
@iche033 iche033 merged commit 918c1f1 into gz-rendering7 Dec 8, 2022
@iche033 iche033 deleted the ray_heightmap branch December 8, 2022 02:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🌱 garden Ignition Garden
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

2 participants