Stellarium 0.12.4
MilkyWay.hpp
1 /*
2  * Stellarium
3  * Copyright (C) 2002 Fabien Chereau
4  *
5  * This program is free software; you can redistribute it and/or
6  * modify it under the terms of the GNU General Public License
7  * as published by the Free Software Foundation; either version 2
8  * of the License, or (at your option) any later version.
9  *
10  * This program 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 this program; if not, write to the Free Software
17  * Foundation, Inc., 51 Franklin Street, Suite 500, Boston, MA 02110-1335, USA.
18  */
19 
20 #ifndef _MILKYWAY_HPP_
21 #define _MILKYWAY_HPP_
22 
23 #include "StelModule.hpp"
24 #include "VecMath.hpp"
25 #include "renderer/GenericVertexTypes.hpp"
26 #include "renderer/StelIndexBuffer.hpp"
27 #include "renderer/StelVertexBuffer.hpp"
28 
31 class MilkyWay : public StelModule
32 {
33  Q_OBJECT
34 
35 public:
36  MilkyWay();
37  virtual ~MilkyWay();
38 
40  // Methods defined in the StelModule class
44  virtual void init();
45 
50  virtual void draw(StelCore* core, class StelRenderer* renderer);
51 
54  virtual void update(double deltaTime);
55 
57  virtual double getCallOrder(StelModuleActionName actionName) const {Q_UNUSED(actionName); return 1.;}
58 
60  // Setter and getters
61 public slots:
63  double getIntensity() const {return intensity;}
65  void setIntensity(double aintensity) {intensity = aintensity;}
66 
68  Vec3f getColor() const {return color;}
70  void setColor(const Vec3f& c) {color=c;}
71 
73  void setFlagShow(bool b);
75  bool getFlagShow(void) const;
76 
77 private:
78  float radius;
79  class StelTextureNew* tex;
80  Vec3f color;
81  float intensity;
82  class LinearFader* fader;
83 
85  class StelGeometrySphere* skySphere;
86 };
87 
88 #endif // _MILKYWAY_HPP_