[core, ios] replace altitude with fov
ported from -js: eb6c6596c6a7a61363d30356674e0002153b1d19 `altitude` was a terribly-named variable that was used to indirectly control the fov. This should eliminate some confusion. `altitude` was equivalent to `cameraToCenterDistance / height`
This commit is contained in:
committed by
John Firebaugh
parent
ebd241363d
commit
38b5cb0c77
@@ -25,7 +25,7 @@ Values makeValues(const LinePaintProperties::Evaluated& properties,
|
||||
|
||||
// calculate how much longer the real world distance is at the top of the screen
|
||||
// than at the middle of the screen.
|
||||
float topedgelength = std::sqrt(std::pow(state.getSize().height, 2.0f) / 4.0f * (1.0f + std::pow(state.getAltitude(), 2.0f)));
|
||||
float topedgelength = std::sqrt(std::pow(state.getSize().height, 2.0f) / 4.0f * (1.0f + std::pow(state.getCameraToCenterDistance(), 2.0f)));
|
||||
float x = state.getSize().height / 2.0f * std::tan(state.getPitch());
|
||||
|
||||
return Values {
|
||||
|
||||
Reference in New Issue
Block a user