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

Make objects split by cylinder projections wraparound appear on one side of the screen #3438

Merged
merged 1 commit into from
Oct 1, 2023

Conversation

10110111
Copy link
Contributor

Description

Some projections expand azimuth dimension over the width of the screen. This makes objects that are clipped by a side of the screen appear on the other side. But currently these objects remain single objects, which results in stretching over the whole distance between one side of the projection to the other.

This commit improves on this situation by making it possible to put an object completely on one side of the screen — the one where object's center resides. This loses the second half that should appear on the opposite side of the screen, but at least avoids the stretching artifacts.

Currently this is only applied to Cylinder projection and its derivatives. Others may be tweaked similarly in subsequent commits.

Fixes #3437

Type of change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • This change requires a documentation update
  • Housekeeping

How Has This Been Tested?

Test Configuration:

  • Operating system: Ubuntu 20.04
  • Graphics Card: Intel UHD Graphics 620

Checklist:

  • My code follows the code style of this project.
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation (header file)
  • I have updated the respective chapter in the Stellarium User Guide
  • My changes generate no new warnings
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes
  • Any dependent changes have been merged and published in downstream modules

@github-actions
Copy link

Great PR! Please pay attention to the following items before merging:

Files matching src/**/*.cpp:

  • Are possibly unused includes removed?

This is an automatically generated QA checklist based on modified files.

@gzotti gzotti added this to the 23.4 milestone Oct 1, 2023
@gzotti gzotti added enhancement Improve existing functionality importance: medium A bit annoying, minor miscalculation, but no crash labels Oct 1, 2023
…ide of the screen

Some projections expand azimuth dimension over the width of the screen.
This makes objects that are clipped by a side of the screen appear on
the other side. But currently these objects remain single objects, which
results in stretching over the whole distance between one side of the
projection to the other.

This commit improves on this situation by making it possible to put an
object completely on one side of the screen — the one where object's
center resides. This loses the second half that should appear on the
opposite side of the screen, but at least avoids the stretching
artifacts.

Currently this is only applied to Cylinder projection and its
derivatives. Others may be tweaked similarly in subsequent commits.
@10110111 10110111 force-pushed the one-sided-projection branch from 91361b3 to 3dff972 Compare October 1, 2023 10:13
@gzotti gzotti self-requested a review October 1, 2023 14:56
Copy link
Member

@gzotti gzotti left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

OK for me, thanks!

@10110111 10110111 merged commit cdd531b into Stellarium:master Oct 1, 2023
10 checks passed
@10110111 10110111 deleted the one-sided-projection branch October 1, 2023 15:28
@alex-w alex-w added the state: published The fix has been published for testing in weekly binary package label Oct 23, 2023
@github-actions
Copy link

Hello @10110111!

Please check the fresh version (development snapshot) of Stellarium:
https://github.com/Stellarium/stellarium-data/releases/tag/weekly-snapshot

@alex-w alex-w removed the state: published The fix has been published for testing in weekly binary package label Dec 23, 2023
Copy link

Hello @10110111!

Please check the latest stable version of Stellarium:
https://github.com/Stellarium/stellarium/releases/latest

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Improve existing functionality importance: medium A bit annoying, minor miscalculation, but no crash
Development

Successfully merging this pull request may close these issues.

Equirectangular Projection solar system bodies render bug at edge of screen
3 participants