1 #ifndef ExoViewer_Body_h
2 #define ExoViewer_Body_h
4 #include "OpenGL_Includes.h"
7 #include <vmmlib/vmmlib.hpp>
40 rotationPeriod = -1.0;
51 BodyInfo(
const std::shared_ptr<BodyInfo> copy){
53 radius = copy->radius;
55 rotationPeriod = copy->rotationPeriod;
56 axisTilt = copy->axisTilt;
57 transittime = copy->transittime;
58 temperature = copy->temperature;
60 structure.
crustDepth = copy->structure.crustDepth;
61 structure.
mantleDepth = copy->structure.mantleDepth;
62 structure.
coreDepth = copy->structure.coreDepth;
82 void setParent(std::shared_ptr<Body> _parent);
85 void createOrbit(
OrbitInfo orbitInfo, vmml::Vector3d _center, std::shared_ptr<ge::Shader> _programForOrbits, vmml::Vector3f _orbitColor
86 ,
unsigned int _id,
unsigned int _groupuid);
87 void createOrbit(
OrbitInfo orbitInfo, vmml::Vector3d _center, std::shared_ptr<ge::Shader> _programForOrbits, vmml::Vector3f _orbitColor,
88 unsigned int _id,
unsigned int _groupuid,
bool _smallBodiesAsPointCloud,
bool _isRealScale);
90 void drawOrbit(std::shared_ptr<ge::Camera> _cam);
93 std::shared_ptr<Orbit>
const&
getOrbit()
const;
113 std::shared_ptr<Orbit> orbit;
114 std::shared_ptr<Body> parent;
115 std::vector<std::shared_ptr<Body>> satellites;
118 vmml::Vector3d currentRotation;
119 double rotationAngle;
120 double dateOfLastRotationUpdate;
double getRadiusInKm()
Definition: Body.cpp:159
~Body()
Definition: Body.cpp:10
bool hasSatellites()
Definition: Body.cpp:122
double age
Definition: Body.h:34
void addSatellite(std::shared_ptr< Body > _satellite)
Definition: Body.cpp:118
double mantleDepth
Definition: Body.h:21
double transittime
Definition: Body.h:32
double getCrustDepthInKm()
Definition: Body.cpp:147
double scaleBody(double _value) const
Definition: Body.cpp:126
double radius
Definition: Body.h:28
void createOrbit(OrbitInfo orbitInfo, vmml::Vector3d _center, std::shared_ptr< ge::Shader > _programForOrbits, vmml::Vector3f _orbitColor, unsigned int _id, unsigned int _groupuid)
Definition: Body.cpp:69
void updateOrbit(double _date)
Definition: Body.cpp:81
bool hasCoreView()
Definition: Body.cpp:139
void setBodyInfo(BodyInfo _info)
Definition: Body.cpp:163
const BodyInfo & getBodyInfo() const
Definition: Body.cpp:167
double axisTilt
Definition: Body.h:31
const OrbitInfo & getOrbitData()
Definition: Body.cpp:106
double rotationPeriod
Definition: Body.h:30
std::vector< std::shared_ptr< Body > > getSatellites() const
Definition: Body.cpp:114
void setBodyAttributes(BodyInfo _data, double _scaleSize)
Definition: Body.cpp:31
const BodyCompositionInfo & getCrustInfo() const
Definition: Body.cpp:143
void drawOrbit(std::shared_ptr< ge::Camera > _cam)
Definition: Body.cpp:93
Definition: AstroCommon.h:18
Body()
Definition: Body.cpp:5
bool hasOrbit() const
Definition: Body.cpp:99
BodyInfo(const std::shared_ptr< BodyInfo > copy)
Definition: Body.h:51
double getRadiusScaled(bool _scaled=false) const
Definition: Body.cpp:135
double coreDepth
Definition: Body.h:22
BodyInfo()
Definition: Body.h:37
void updateRotation(double _currentDateInDays)
Definition: Body.cpp:44
double temperature
Definition: Body.h:33
double getCoreDepthInKm()
Definition: Body.cpp:155
void setParent(std::shared_ptr< Body > _parent)
Definition: Body.cpp:171
double getMantleDepthInKm()
Definition: Body.cpp:151
std::string name
Definition: Body.h:27
void clear()
Definition: Body.cpp:14
BodyCompositionInfo structure
Definition: Body.h:35
double crustDepth
Definition: Body.h:20
const vmml::Vector3d & getCurrentRotation() const
Definition: Body.cpp:175
double mass
Definition: Body.h:29
std::shared_ptr< Orbit > const & getOrbit() const
Definition: Body.cpp:110