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 ***************************************************************************/
22 * @brief Data for a section of the globe.
25 #include "tcGeoData.h"
31 * Constructors + destructor
34 /// Primary constructor.
35 tcGeoData::tcGeoData(DataType type
)
41 tcGeoData::~tcGeoData()
49 /// Render schematic drawing.
50 void tcGeoData::renderSchematic(double meanRadius
, tcObserver
* const observer
)
52 double boxHeight
[2] = {1.0, 1.005};
53 glColor3f(1.0f
, 0.0f
, 1.0f
);
54 for (int i
= 0; i
< 2; ++i
)
56 glBegin(GL_LINE_LOOP
);
58 glVertex3((meanRadius
*boxHeight
[i
]) * (GLvec3d
)m_coordinates
[0][0]);
59 glVertex3((meanRadius
*boxHeight
[i
]) * (GLvec3d
)m_coordinates
[0][1]);
60 glVertex3((meanRadius
*boxHeight
[i
]) * (GLvec3d
)m_coordinates
[1][1]);
61 glVertex3((meanRadius
*boxHeight
[i
]) * (GLvec3d
)m_coordinates
[1][0]);
67 for (int i
= 0; i
< 2; ++i
)
69 for (int j
= 0; j
< 2; ++j
)
71 glVertex3((meanRadius
*boxHeight
[0]) * (GLvec3d
)m_coordinates
[i
][j
]);
72 glVertex3((meanRadius
*boxHeight
[1]) * (GLvec3d
)m_coordinates
[i
][j
]);