summaryrefslogtreecommitdiff
path: root/src/ProjectionLSQ.H
diff options
context:
space:
mode:
authorJohannes Hofmann <Johannes.Hofmann@gmx.de>2006-12-17 16:13:32 +0100
committerJohannes Hofmann <Johannes.Hofmann@gmx.de>2006-12-17 16:13:32 +0100
commit23900d0b19e5c978934108f6a54aa82f6c7f27cb (patch)
tree33008c888e2205c32296272c5e766d292233a212 /src/ProjectionLSQ.H
parent6ee81353d9dd4a9a97f8e91d6a619e59808f8106 (diff)
use LSQ for all projection types
Diffstat (limited to 'src/ProjectionLSQ.H')
-rw-r--r--src/ProjectionLSQ.H54
1 files changed, 54 insertions, 0 deletions
diff --git a/src/ProjectionLSQ.H b/src/ProjectionLSQ.H
new file mode 100644
index 0000000..0834108
--- /dev/null
+++ b/src/ProjectionLSQ.H
@@ -0,0 +1,54 @@
+//
+// Copyright 2006 Johannes Hofmann <Johannes.Hofmann@gmx.de>
+//
+// This software may be used and distributed according to the terms
+// of the GNU General Public License, incorporated herein by reference.
+
+#ifndef PROJECTIONLSQ_H
+#define PROJECTIONLSQ_H
+
+#include "Hill.H"
+#include "ViewParams.H"
+
+class ProjectionLSQ {
+ private:
+ double comp_scale(double alph_a, double alph_b, double d1, double d2);
+
+ int lsq(const Hills *m, ViewParams *parms, int distortion_correct);
+
+ protected:
+ double sec(double a);
+
+ public:
+
+#define ARGS double c_view, double c_nick, double c_tilt, double scale, double k0, double k1, double m_view, double m_nick
+
+ virtual double mac_x(ARGS);
+ virtual double mac_y(ARGS);
+ virtual double mac_x_dc_view(ARGS);
+ virtual double mac_x_dc_nick(ARGS);
+ virtual double mac_x_dc_tilt(ARGS);
+ virtual double mac_x_dscale(ARGS);
+ virtual double mac_x_dk0(ARGS);
+ virtual double mac_x_dk1(ARGS);
+ virtual double mac_y_dc_view(ARGS);
+ virtual double mac_y_dc_nick(ARGS);
+ virtual double mac_y_dc_tilt(ARGS);
+ virtual double mac_y_dscale(ARGS);
+ virtual double mac_y_dk0(ARGS);
+ virtual double mac_y_dk1(ARGS);
+
+#undef ARGS
+
+
+ typedef enum {
+ RECTILINEAR = 0,
+ CYLINDRICAL = 1
+ } Projection_t;
+
+ void get_coordinates(double a_view, double a_nick,
+ const ViewParams *parms, double *x, double *y);
+
+ int comp_params(const Hills *h, ViewParams *parms);
+};
+#endif