GlobeEngine
HabitableZone.h
Go to the documentation of this file.
1 #ifndef ExoViewer_HabitableZone_h
2 #define ExoViewer_HabitableZone_h
3 
4 #include <ctype.h>
5 #include "OpenGL_Includes.h"
6 #include <math.h>
7 #include <vector>
8 #include <vmmlib/vmmlib.hpp>
9 #include "Ring.h"
10 #include "Camera.h"
11 #include "Texture.h"
13 #include "Body.h"
14 
15 namespace geAstro{
16 
18  {
19  double optimisticIn;
20  double optimisticOut;
23  };
24 
26  {
27  public:
28 
29  HabitableZone();
31  void clear();
32  void create() {};
33  void createForSingleStar(double _temperatur, double _mass,
34  std::shared_ptr<HabitableZoneClassification> _hzClass);
35  void update();
36  void draw(std::shared_ptr<ge::Camera> _cam);
37  void setScaleFactor(double _scaleFactor);
38  void setScaled(bool _scaled);
39  void setAlpha(float _alpha);
40 
41  void createDrawable(double inclination, double omega, double w);
42 
43  int isBodyInsideHZ(std::shared_ptr<Body> _body) const;
44 
45  const HabitaleZoneInfo* getData();
46 
47  void setShaders(); //for shader reloading
48 
49  private:
50  float alpha;
51  double scale(double _value) const;
52  double scaleFactor;
53  bool scaled;
54 
55  ge::Ring drawable_InnerOptimisitc;
56  ge::Ring drawable_OuterOptimisitc;
57  ge::Ring drawable_conservative;
58  ge::Ring scaledDrawable_InnerOptimisitc;
59  ge::Ring scaledDrawable_OuterOptimisitc;
60  ge::Ring scaledDrawable_conservative;
61 
62  HabitaleZoneInfo data;
63 
64  double alphaDifference;
65 
66  };
67 
68 }
69 
70 #endif
Definition: DrawableComponent.h:25
const HabitaleZoneInfo * getData()
Definition: HabitableZone.cpp:189
void update()
Definition: HabitableZone.cpp:94
Definition: Ring.h:18
int isBodyInsideHZ(std::shared_ptr< Body > _body) const
Definition: HabitableZone.cpp:160
Definition: AstroCommon.h:18
void setScaled(bool _scaled)
Definition: HabitableZone.cpp:181
void create()
Definition: HabitableZone.h:32
double optimisticOut
Definition: HabitableZone.h:20
void createForSingleStar(double _temperatur, double _mass, std::shared_ptr< HabitableZoneClassification > _hzClass)
Definition: HabitableZone.cpp:44
HabitableZone()
Definition: HabitableZone.cpp:5
void setShaders()
Definition: HabitableZone.cpp:193
double optimisticIn
Definition: HabitableZone.h:19
Definition: HabitableZone.h:17
double conservativeOut
Definition: HabitableZone.h:22
void createDrawable(double inclination, double omega, double w)
Definition: HabitableZone.cpp:97
void setScaleFactor(double _scaleFactor)
Definition: HabitableZone.cpp:173
Definition: HabitableZone.h:25
double conservativeIn
Definition: HabitableZone.h:21
~HabitableZone()
Definition: HabitableZone.cpp:10
void draw(std::shared_ptr< ge::Camera > _cam)
Definition: HabitableZone.cpp:145
void clear()
Definition: HabitableZone.cpp:15
void setAlpha(float _alpha)
Definition: HabitableZone.cpp:185