diff options
author | Johannes Hofmann <Johannes.Hofmann@gmx.de> | 2005-08-08 18:32:26 +0100 |
---|---|---|
committer | Johannes Hofmann <Johannes.Hofmann@gmx.de> | 2005-08-08 18:32:26 +0100 |
commit | f1e6812f1826a67965f9f1204b600d7a6ca519ce (patch) | |
tree | 3287d5cc2fa06a2f24059976017ef6f0718d1df9 /src | |
parent | c75e55caac167e9750b1407d9cad67955dc3bc42 (diff) |
add variable view_angle
Diffstat (limited to 'src')
-rw-r--r-- | src/Panorama.H | 1 | ||||
-rw-r--r-- | src/Panorama.cxx | 3 |
2 files changed, 3 insertions, 1 deletions
diff --git a/src/Panorama.H b/src/Panorama.H index 4981bcb..12e62bf 100644 --- a/src/Panorama.H +++ b/src/Panorama.H @@ -31,6 +31,7 @@ class Panorama { double view_phi, view_lam, view_height; char *view_name; double height_dist_ratio; + double view_angle; Hills *mountains; Hills *close_mountains; Hills *visible_mountains; diff --git a/src/Panorama.cxx b/src/Panorama.cxx index aeba8ad..59f70eb 100644 --- a/src/Panorama.cxx +++ b/src/Panorama.cxx @@ -39,6 +39,7 @@ Panorama::Panorama() { height_dist_ratio = 0.07; pi_d = asin(1.0) * 2.0; deg2rad = pi_d / 180.0; + view_angle = pi_d / 2.0; parms.a_center = 0.0; parms.a_nick = 0.0; parms.a_tilt = 0.0; @@ -402,7 +403,7 @@ Panorama::update_visible_mountains() { m->a_view += 2.0*pi_d; } - if (m->a_view < pi_d / 3.0 && m->a_view > - pi_d / 3.0) { + if (m->a_view < view_angle && m->a_view > - view_angle) { visible_mountains->add(m); m->flags |= HILL_VISIBLE; } else { |