GlobeEngine
SmallBody.h
Go to the documentation of this file.
1 #ifndef ExoViewer_SmallBody_h
2 #define ExoViewer_SmallBody_h
3 
4 #include "Body.h"
5 
6 namespace geAstro{
7 
8  class SmallBody : public ge::Sphere {
9 
10  public:
11  /* ASTEROIDS:
12  'IEO': 'Atira',
13  'IMB' : 'Inner Main-belt Asteroid',
14  'TNO' : 'TransNeptunian Object',
15  'ATE' : 'Aten',
16  'MBA' : 'Main-belt Asteroid',
17  'PAA' : 'Parabolic Asteroid',
18  'APO' : 'Apollo',
19  'OMB' : 'Outer Main-belt Asteroid',
20  'HYA' : 'Hyperbolic Asteroid',
21  'AMO' : 'Amor',
22  'TJN' : 'Jupiter Trojan',
23  'AST' : 'Asteroid (other)',
24  'MCA' : 'Mars-crossing Asteroid',
25  'CEN' : 'Centaur'
26  */
27  /* COMETS:
28  'HYP': 'Hyperbolic Comet',
29  'ETc': 'Encke-type Comet',
30  'PAR': 'Parabolic Comet',
31  'CTc': 'Chiron-type Comet',
32  'JFC': 'Jupiter-family Comet*',
33  'JFc': 'Jupiter-family Comet',
34  'HTC': 'Halley-type Comet*',
35  'COM': 'Comet (other)'
36  */
38  IEO = 0, IMB, TNO, ATE, MBA, PAA, APO, OMB, HYA, AMO, TJN, AST, MCA, CEN,
39  HYP, ETc, PAR, CTc, JFC, JFc, HTC, COM,
41  };
42 
43  SmallBody();
44  ~SmallBody();
45  void clear();
46  void update();
47  void createSmallBody(BodyInfo _bodyinfo, vmml::Vector3d _position, SmallBodyType _type);
48  void createSmallBody(BodyInfo _bodyinfo, vmml::Vector3d _position, SmallBodyType _type, std::shared_ptr<ge::Shader> _programForSpheres, std::shared_ptr<ge::Texture2Drgba> _texHandle);
49 
51  static std::string getTypeString(SmallBodyType _t);
52  static std::string getTypeDescriptionString(SmallBodyType _t);
53  static SmallBodyType getEnumFromString(const std::string _str);
54  const std::shared_ptr<Body> getBody() const;
55  private:
56  std::shared_ptr<Body> smallBodyBody;
57  std::shared_ptr<ge::Texture2Drgba> smallBodyTex;
58  SmallBodyType type;
59  bool smallBodyWithMesh;
60  };
61 }
62 #endif
Definition: SmallBody.h:38
Definition: SmallBody.h:39
Definition: SmallBody.h:39
Definition: SmallBody.h:38
void clear()
Definition: SmallBody.cpp:14
SmallBody()
Definition: SmallBody.cpp:5
Definition: SmallBody.h:38
Definition: SmallBody.h:38
Definition: SmallBody.h:39
Definition: SmallBody.h:38
const std::shared_ptr< Body > getBody() const
Definition: SmallBody.cpp:57
~SmallBody()
Definition: SmallBody.cpp:10
Definition: SmallBody.h:38
Definition: SmallBody.h:39
Definition: SmallBody.h:38
Definition: Sphere.h:18
Definition: AstroCommon.h:18
SmallBodyType
Definition: SmallBody.h:37
Definition: SmallBody.h:39
static SmallBodyType getEnumFromString(const std::string _str)
Definition: SmallBody.cpp:125
Definition: SmallBody.h:38
SmallBody::SmallBodyType getType() const
Definition: SmallBody.cpp:61
Definition: SmallBody.h:38
Definition: SmallBody.h:39
Definition: SmallBody.h:38
void update()
Definition: SmallBody.cpp:53
Definition: SmallBody.h:38
Definition: SmallBody.h:38
static std::string getTypeString(SmallBodyType _t)
Definition: SmallBody.cpp:65
Definition: SmallBody.h:8
Definition: SmallBody.h:40
Definition: SmallBody.h:39
Definition: SmallBody.h:38
static std::string getTypeDescriptionString(SmallBodyType _t)
Definition: SmallBody.cpp:95
Definition: SmallBody.h:38
Definition: Body.h:25
void createSmallBody(BodyInfo _bodyinfo, vmml::Vector3d _position, SmallBodyType _type)
Definition: SmallBody.cpp:19
Definition: SmallBody.h:39