Basic and very rubbish adding of imagary on top of elevation data - per pixel colouri...
[tecorrec.git] / geo / tcObserver.h
blobd1f66d9fbd7be8dd8a15475d372ce6bc934f4361
1 /***************************************************************************
2 * This file is part of Tecorrec. *
3 * Copyright 2008 James Hogan <james@albanarts.com> *
4 * *
5 * Tecorrec is free software: you can redistribute it and/or modify *
6 * it under the terms of the GNU General Public License as published by *
7 * the Free Software Foundation, either version 2 of the License, or *
8 * (at your option) any later version. *
9 * *
10 * Tecorrec is distributed in the hope that it will be useful, *
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of *
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
13 * GNU General Public License for more details. *
14 * *
15 * You should have received a copy of the GNU General Public License *
16 * along with Tecorrec. If not, write to the Free Software Foundation, *
17 * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. *
18 ***************************************************************************/
20 #ifndef _tcObserver_h_
21 #define _tcObserver_h_
23 /**
24 * @file tcObserver.h
25 * @brief Viewing information for an observer.
28 #include "tcGeo.h"
30 /// Viewing information for an observer.
31 class tcObserver
33 public:
36 * Constructors + destructor
39 /// Primary constructor.
40 tcObserver();
42 /// Destructor.
43 virtual ~tcObserver();
46 * Main interface
49 /// Set up the OpenGL projection matrix for this observer.
50 void setupProjection(double aspect) const;
52 /// Set up the OpenGL modelview matrix for this observer.
53 void setupModelView() const;
56 * Mutators
59 /// Adjust the focus directly.
60 void setFocus(const tcGeo& focus, double altitude);
62 /// Make a local transformation of the focus.
63 void moveFocusRelative(double dx, double dy);
65 /// Adjust the range exponentially.
66 void adjustRange(double x);
68 /// Adjust the azimuth in radians.
69 void adjustAzimuth(double daz);
71 /// Adjust the elevation in radians.
72 void adjustElevation(double del);
74 private:
77 * Variables
80 /// Geographical position of focus.
81 tcGeo m_focus;
83 /// Altitude of focus.
84 double m_focusAltitude;
86 /// Observation direction relative to focus.
87 tcGeo m_view;
89 /// Range of camera.
90 double m_range;
93 #endif