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

[core] Limit pitch based on edge insets. Fix max Z calculation in getProjMatrix. #15195

Merged
merged 2 commits into from
Aug 1, 2019

Commits on Aug 1, 2019

  1. [core] Limit pitch based on edge insets. Fix max Z calculation in get…

    …ProjMatrix.
    
    Patch partly fixes #15163 in a way that it doesn't allow loading tens of thousands of tiles and attempt to show area above horizon:
    
    Limit pitch based on edge insets. It is not too bad - current limit of 60 degrees stays active until center of perspective is moved towards the bottom, to 84% of screen height. The plan is to split removal of 60 degrees limit to follow up patch.
    
    Fix max Z calculation in getProjMatrix. TransformState::getProjMatrix calculation of farZ was complex with possibility to lead to negative z values. Replacing it with simpler, precise calculation:
    furthestDistance = cameraToCenterDistance / (1 - tanFovAboveCenter * std::tan(getPitch()));
    
    TransformState::getProjMatrix calculation of farZ was an aproximation. Replacing it with simpler, but precise calculation.
    
    Related to: #15163
    astojilj committed Aug 1, 2019
    Configuration menu
    Copy the full SHA
    0b411ca View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    f37d81d View commit details
    Browse the repository at this point in the history