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

Minor fix to checking projector default visibility flags #920

Merged
merged 2 commits into from
Oct 5, 2023

Conversation

iche033
Copy link
Contributor

@iche033 iche033 commented Sep 25, 2023

🦟 Bug fix

Summary

Fixed check to see if projector is using default or custom visibility flags. If it's using the default flags, we can skip all the extra computation added for visibility toggling.

The check is not quite correct (so it's currently not skipping the extra computations). The default visibility flags (from SDF) is 0xFFFFFFFF but the code is checking against GZ_VISIBILITY_ALL which is 0x0FFFFFFF. So updated check to make sure the visibility flags contain all of GZ_VISIBILITY_ALL bits instead of exact equality comparison.

This is more of a performance improvement and does not change projector behavior.

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 🎵 harmonic Gazebo Harmonic label Sep 25, 2023
@codecov
Copy link

codecov bot commented Sep 25, 2023

Codecov Report

Merging #920 (27f87e0) into gz-rendering8 (dad0364) will decrease coverage by 0.01%.
The diff coverage is 33.33%.

❗ Current head 27f87e0 differs from pull request most recent head d5a1adb. Consider uploading reports for the commit d5a1adb to get more accurate results

@@                Coverage Diff                @@
##           gz-rendering8     #920      +/-   ##
=================================================
- Coverage          75.15%   75.14%   -0.01%     
=================================================
  Files                177      177              
  Lines              16830    16832       +2     
=================================================
  Hits               12649    12649              
- Misses              4181     4183       +2     
Files Coverage Δ
ogre2/src/Ogre2Projector.cc 69.76% <33.33%> (-1.10%) ⬇️

@iche033 iche033 merged commit c1af6fd into gz-rendering8 Oct 5, 2023
4 of 6 checks passed
@iche033 iche033 deleted the projector_visibility_flags branch October 5, 2023 00:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🎵 harmonic Gazebo Harmonic
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

3 participants