1 /***************************************************************************
2 * This file is part of Tecorrec. *
3 * Copyright 2008 James Hogan <james@albanarts.com> *
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. *
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. *
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 ***************************************************************************/
25 * @brief Manages data for a globe.
31 class tcPhotographyData
;
35 /** Manages data for a globe.
36 * Holds terrain elevation and imagery data.
55 * Constructors + destructor
58 /// Primary constructor.
59 tcGlobe(double meanRadius
);
68 /// Add a dataset to the globe.
69 void addDataSet(tcPhotographyData
* data
);
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
);
88 /// Get the mean radius.
89 double meanRadius() const;
97 /// Draw a line of latitude.
98 void drawLineOfLatitude(double latitude
) const;
101 void renderCell(tcObserver
* const observer
, const tcGeo
& swCorner
, const tcGeo
& neCorner
) const;
109 /// Mean radius in metres.
113 tcSrtmModel
* m_elevation
;
115 /// List of geo data sets.
116 QList
<tcPhotographyData
*> m_data
;
122 /// Current elevation mode.
123 ElevationMode m_elevationMode
;
125 /// Current level of elevation correction.
126 float m_elevationCorrection
;