Skip to content
This repository has been archived by the owner on Mar 8, 2023. It is now read-only.

HARP-11531: Look-at bounds for sphere. #1830

Merged
merged 7 commits into from
Sep 21, 2020
Merged

Conversation

atomicsulfate
Copy link
Collaborator

Thank you for contributing to harp.gl!

Before requesting a pull request, please remember to check the following documents:

If you are adding new functionality we would highly appreciate if you can describe what is the capability you are adding and even better if you can add some examples. Please also remember to add tests for it.

CI Check

Our bots will check whether your PR can be directly integrated into the mainline. We have some internal integration tests running on the background, our bots will inform you of the next steps and someone from our team will take a look and help if needed!

And please do not forget to sign-off your commit! You can read more about DCO here. But, in short, you just need to use git commit -s or append --signoff when you are committing to the repo.

Happy contributing!

@atomicsulfate atomicsulfate force-pushed the HARP-11531_Bounds4Sphere branch 3 times, most recently from f2bf35a to 136feb4 Compare September 8, 2020 15:49
@codecov
Copy link

codecov bot commented Sep 8, 2020

Codecov Report

Merging #1830 into master will increase coverage by 0.26%.
The diff coverage is 97.43%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #1830      +/-   ##
==========================================
+ Coverage   64.67%   64.93%   +0.26%     
==========================================
  Files         286      286              
  Lines       25782    25902     +120     
  Branches     5791     5818      +27     
==========================================
+ Hits        16674    16820     +146     
+ Misses       9108     9082      -26     
Impacted Files Coverage Δ
@here/harp-mapview/lib/BoundsGenerator.ts 95.48% <96.52%> (-2.44%) ⬇️
...re/harp-geoutils/lib/coordinates/GeoCoordinates.ts 78.57% <100.00%> (+1.07%) ⬆️
@here/harp-geoutils/lib/coordinates/GeoPolygon.ts 98.31% <100.00%> (+0.70%) ⬆️
@here/harp-mapview/lib/Utils.ts 80.22% <100.00%> (ø)
...here/harp-mapview/lib/text/TextElementsRenderer.ts 69.15% <0.00%> (+0.61%) ⬆️
@here/harp-mapview/lib/MapView.ts 67.50% <0.00%> (+0.73%) ⬆️
...ere/harp-mapview/lib/composing/LowResRenderPass.ts 44.23% <0.00%> (+3.84%) ⬆️
@here/harp-mapview/lib/CameraMovementDetector.ts 81.69% <0.00%> (+19.71%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 525ec55...c41783c. Read the comment docs.

@atomicsulfate atomicsulfate force-pushed the HARP-11531_Bounds4Sphere branch 2 times, most recently from 42bdddc to cf776eb Compare September 9, 2020 15:01
@here/harp-mapview/lib/BoundsGenerator.ts Outdated Show resolved Hide resolved
@here/harp-mapview/lib/BoundsGenerator.ts Show resolved Hide resolved
@here/harp-mapview/lib/BoundsGenerator.ts Outdated Show resolved Hide resolved
@here/harp-mapview/lib/BoundsGenerator.ts Outdated Show resolved Hide resolved
].forEach(ray => {
this.addFrustumIntersection(ray, frustum, coordinates);
});
// There should only be one horizon intersection, if there's 2 take the last one.
Copy link
Contributor

Choose a reason for hiding this comment

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

in what condition would there be two intersections?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I saw it happening even when theoretically it shouldn't. I assumed it was due to some precision problem when the starting side corner barely hits the world (whether the corner hits the world is decided doing raycasting, and horizon visibility is a completely separated computation in SphereHorizon). Let me revisit that to confirm.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

So i've confimed what I've said. I've just rewritten the comment to avoid confusion.

@atomicsulfate atomicsulfate changed the base branch from master to HARP-11531_SphereHorizon September 10, 2020 13:34
@atomicsulfate atomicsulfate force-pushed the HARP-11531_Bounds4Sphere branch 2 times, most recently from a058a1a to 08a1975 Compare September 10, 2020 13:47
Base automatically changed from HARP-11531_SphereHorizon to master September 11, 2020 10:19
@atomicsulfate atomicsulfate force-pushed the HARP-11531_Bounds4Sphere branch 3 times, most recently from 6846272 to 4168f40 Compare September 15, 2020 15:58
@FraukeF
Copy link
Contributor

FraukeF commented Sep 18, 2020

@harpgl-bot retest this please

FraukeF
FraukeF previously approved these changes Sep 21, 2020
@atomicsulfate
Copy link
Collaborator Author

@harpgl-bot retest this please

Add support for multiple antimeridian crossings (concave poligons).

Only supported for polygon with  sides <=180 degrees longitude.
@atomicsulfate atomicsulfate merged commit 94c45bf into master Sep 21, 2020
@atomicsulfate atomicsulfate deleted the HARP-11531_Bounds4Sphere branch September 21, 2020 09:56
nzjony pushed a commit that referenced this pull request Sep 22, 2020
* HARP-11531: Look-at bounds for sphere.

* HARP-11531: Move longitude span calculation to GeoCoordinates.

* HARP-11531: Move coordinates wrapping to GeoPolygon.

* HARP-11531: Adapt to SphereHorizon interface change in isFullyVisible.

* HARP-11531: Adapt screen instructions in bounds generation example.

Sphere projection is supported now.

Also fix lint error in BoundsGeneratorTest.

* HARP-11531: Fix GeoPolygon coordinate wrapping.

Add support for multiple antimeridian crossings (concave poligons).

Only supported for polygon with  sides <=180 degrees longitude.

* HARP-11531: Rewrite comment in addSideIntersectionsOnSphere.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants