Remove elevation model. implemented correction adjustment using gui
[tecorrec.git] / geo / tcGlobe.h
blobee1757d52ce58ec6522fe232d382092539257e18
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 _tcGlobe_h_
21 #define _tcGlobe_h_
23 /**
24 * @file tcGlobe.h
25 * @brief Manages data for a globe.
28 #include <QList>
30 class tcGeo;
31 class tcPhotographyData;
32 class tcObserver;
33 class tcSrtmModel;
35 /** Manages data for a globe.
36 * Holds terrain elevation and imagery data.
38 class tcGlobe
40 public:
43 * Enumerations
46 /// Elevation modes.
47 enum ElevationMode
49 NoElevation,
50 RawElevation,
51 CorrectedElevation
55 * Constructors + destructor
58 /// Primary constructor.
59 tcGlobe(double meanRadius);
61 /// Destructor.
62 virtual ~tcGlobe();
65 * Data sets
68 /// Add a dataset to the globe.
69 void addDataSet(tcPhotographyData* data);
72 * Rendering
75 /// Render from the POV of an observer.
76 void render(tcObserver* const observer);
78 /// Set the elevation mode to render in.
79 void setElevationMode(ElevationMode mode);
81 /// Set the level of correction to show.
82 void setElevationCorrection(float correction);
85 * Accessors
88 /// Get the mean radius.
89 double meanRadius() const;
91 private:
94 * Rendering
97 /// Draw a line of latitude.
98 void drawLineOfLatitude(double latitude) const;
100 /// Render a cell.
101 void renderCell(tcObserver* const observer, const tcGeo& swCorner, const tcGeo& neCorner) const;
103 private:
106 * Variables
109 /// Mean radius in metres.
110 double m_meanRadius;
112 /// Elevation model.
113 tcSrtmModel* m_elevation;
115 /// List of geo data sets.
116 QList<tcPhotographyData*> m_data;
119 * Rendering options
122 /// Current elevation mode.
123 ElevationMode m_elevationMode;
125 /// Current level of elevation correction.
126 float m_elevationCorrection;
129 #endif