Stellarium 0.12.3
Main Page
Namespaces
Classes
Coding Style
Scripting
Plugins
Renderer
File Structure
File List
File Members
core
StelSkyPolygon.hpp
1
/*
2
* Copyright (C) 2008 Fabien Chereau
3
*
4
* This program is free software; you can redistribute it and/or
5
* modify it under the terms of the GNU General Public License
6
* as published by the Free Software Foundation; either version 2
7
* of the License, or (at your option) any later version.
8
*
9
* This program is distributed in the hope that it will be useful,
10
* but WITHOUT ANY WARRANTY; without even the implied warranty of
11
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12
* GNU General Public License for more details.
13
*
14
* You should have received a copy of the GNU General Public License
15
* along with this program; if not, write to the Free Software
16
* Foundation, Inc., 51 Franklin Street, Suite 500, Boston, MA 02110-1335, USA.
17
*/
18
19
#ifndef _STELSKYPOLYGON_HPP_
20
#define _STELSKYPOLYGON_HPP_
21
22
#include "MultiLevelJsonBase.hpp"
23
#include "
StelSphereGeometry.hpp
"
24
#include "StelSkyImageTile.hpp"
25
26
#include <QTimeLine>
27
28
class
StelCore
;
29
31
class
StelSkyPolygon
:
public
MultiLevelJsonBase
32
{
33
Q_OBJECT
34
35
public
:
37
StelSkyPolygon
() {initCtor();}
38
40
StelSkyPolygon
(
const
QString& url,
StelSkyPolygon
* parent=NULL);
42
StelSkyPolygon
(
const
QVariantMap& map,
StelSkyPolygon
* parent);
43
45
~StelSkyPolygon
();
46
48
void
draw
(
StelCore
* core,
class
StelRenderer
* renderer,
StelProjectorP
projector,
float
opacity=1.);
49
51
DataSetCredits
getDataSetCredits
()
const
{
return
dataSetCredits
;}
52
54
ServerCredits
getServerCredits
()
const
{
return
serverCredits
;}
55
58
QVariantMap
toQVariantMap
()
const
;
59
60
protected
:
62
float
minResolution
;
63
65
ServerCredits
serverCredits
;
66
68
DataSetCredits
dataSetCredits
;
69
71
QList<SphericalConvexPolygon>
skyConvexPolygons
;
72
73
protected
:
74
76
virtual
void
loadFromQVariantMap
(
const
QVariantMap& map);
77
78
private
:
80
QVariantList subTilesUrls;
81
83
void
initCtor();
84
87
void
getTilesToDraw(QMultiMap<double, StelSkyPolygon*>& result,
StelCore
* core,
const
SphericalRegionP
& viewPortPoly,
bool
recheckIntersect=
true
);
88
91
bool
drawTile(
class
StelRenderer
* renderer,
StelProjectorP
projector);
92
94
double
getMinResolution()
const
{
return
minResolution
;}
95
96
// Used for smooth fade in
97
QTimeLine* texFader;
98
};
99
100
#endif // _STELSKYPOLYGON_HPP_
Generated on Sat Aug 10 2013 17:12:44 for Stellarium by
1.8.3.1