summaryrefslogtreecommitdiff
path: root/src/Panorama.cxx
diff options
context:
space:
mode:
authorJohannes Hofmann <Johannes.Hofmann@gmx.de>2006-12-14 17:23:17 +0100
committerJohannes Hofmann <Johannes.Hofmann@gmx.de>2006-12-14 17:23:17 +0100
commit489bdd091ea9dae275717e95340a9fdd07dcba8c (patch)
tree414e271dae25ad7532ca20e829c4daf9b7c2e447 /src/Panorama.cxx
parentc3a34dad14632abed6cc15679a57997f91b99560 (diff)
change Projection::comp_params() to allow a variable amount of known mountains
Diffstat (limited to 'src/Panorama.cxx')
-rw-r--r--src/Panorama.cxx10
1 files changed, 7 insertions, 3 deletions
diff --git a/src/Panorama.cxx b/src/Panorama.cxx
index 6ed8486..a5c4baf 100644
--- a/src/Panorama.cxx
+++ b/src/Panorama.cxx
@@ -161,6 +161,7 @@ int
Panorama::guess(Hills *p, Hill *m1) {
Hill *p2, *m_tmp1, *m_tmp2;
Hill *m2;
+ Hills h;
double best = 100000000.0, v;
double a_center_best, a_nick_best, a_tilt_best, scale_best;
int x1_sav, y1_sav;
@@ -193,7 +194,10 @@ Panorama::guess(Hills *p, Hill *m1) {
m2->x = p2->x;
m2->y = p2->y;
- comp_params(m1, m2);
+ h.clear();
+ h.add(m1);
+ h.add(m2);
+ comp_params(&h);
v = get_value(p);
@@ -220,10 +224,10 @@ Panorama::guess(Hills *p, Hill *m1) {
}
int
-Panorama::comp_params(Hill *m1, Hill *m2) {
+Panorama::comp_params(Hills *h) {
int ret;
- ret = proj->comp_params(m1, m2, &parms);
+ ret = proj->comp_params(h, &parms);
update_visible_mountains();
return ret;
}