diff options
author | Johannes Hofmann <johannes.hofmann@gmx.de> | 2005-05-20 11:34:39 +0000 |
---|---|---|
committer | Johannes Hofmann <johannes.hofmann@gmx.de> | 2005-05-20 11:34:39 +0000 |
commit | f680b80a513c991f9afdb6c96566cfbb22a7f208 (patch) | |
tree | e466d7f7b8f06872dec5ef420c577b5b75d2d65b /src/Panorama.cxx | |
parent | b957c92f76e834f7727c2bcf259566cbd78b8002 (diff) |
add viewpoint name to control window
add viewpoint name to control window
Diffstat (limited to 'src/Panorama.cxx')
-rw-r--r-- | src/Panorama.cxx | 48 |
1 files changed, 47 insertions, 1 deletions
diff --git a/src/Panorama.cxx b/src/Panorama.cxx index 7321c3a..7e1ccff 100644 --- a/src/Panorama.cxx +++ b/src/Panorama.cxx @@ -1,5 +1,5 @@ // -// "$Id: Panorama.cxx,v 1.42 2005/05/10 18:45:29 hofmann Exp $" +// "$Id: Panorama.cxx,v 1.43 2005/05/20 13:34:39 hofmann Exp $" // // Panorama routines. // @@ -60,6 +60,7 @@ Panorama::Panorama() { a_nick = 0.0; a_tilt = 0.0; scale = 3500.0; + view_name = NULL; } Panorama::~Panorama() { @@ -91,6 +92,13 @@ Panorama::set_viewpoint(const char *name) { return 1; } + if (view_name) { + free(view_name); + view_name = NULL; + } + + view_name = strdup(name); + update_angles(); return 0; @@ -330,6 +338,29 @@ Panorama::set_height_dist_ratio(double r) { update_visible_mountains(); } +void +Panorama::set_view_lat(double v) { + view_lam = v * deg2rad; + update_angles(); +} + +void +Panorama::set_view_long(double v) { + view_phi = v * deg2rad; + update_angles(); +} + +void +Panorama::set_view_height(double v) { + view_height = v; + update_angles(); +} + +const char * +Panorama::get_viewpoint() { + return view_name; +} + double Panorama::get_center_angle() { return a_center / deg2rad; @@ -355,6 +386,21 @@ Panorama::get_height_dist_ratio() { return height_dist_ratio; } +double +Panorama::get_view_lat() { + return view_lam / deg2rad; +} + +double +Panorama::get_view_long() { + return view_phi / deg2rad; +} + +double +Panorama::get_view_height() { + return view_height; +} + int Panorama::get_pos(const char *name, double *phi, double *lam, double *height) { int i; |